From 76e698b1f23dc868f527f8ca0209e5dcdb8e1465 Mon Sep 17 00:00:00 2001 From: 沈泽 <211959439@qq.com> Date: 星期三, 15 九月 2021 08:22:35 +0800 Subject: [PATCH] 1 --- WebAPI/Controllers/Sc_MouldOtherInBillController.cs | 133 +++++++++++++++++++++++++++++++++++++------- 1 files changed, 111 insertions(+), 22 deletions(-) diff --git a/WebAPI/Controllers/Sc_MouldOtherInBillController.cs b/WebAPI/Controllers/Sc_MouldOtherInBillController.cs index 9e51174..4b5a1f4 100644 --- a/WebAPI/Controllers/Sc_MouldOtherInBillController.cs +++ b/WebAPI/Controllers/Sc_MouldOtherInBillController.cs @@ -13,7 +13,7 @@ public class Sc_MouldOtherInBillController : ApiController { private json objJsonResult = new json(); - public DataSet ds = new DataSet(); + DataSet ds; public WebServer webserver = new WebServer(); SQLHelper.ClsCN oCN = new SQLHelper.ClsCN(); @@ -21,35 +21,23 @@ /// 鏍规嵁鍖呰鍗� 杩斿洖姝ゅ寘瑁呭崟鍐呯殑鐩稿叧淇℃伅 /// </summary> /// <returns></returns> + /// - /// <summary> - /// 妯″叿鍏朵粬鍏ュ簱鍗曞垪琛� - /// </summary> - /// <returns></returns> + #region 妯″叿鍏朵粬鍏ュ簱鍗曞垪琛� + [Route("Sc_MouldOtherInBill/GetMouldOtherInBillList")] [HttpGet] - public object GetMouldOtherInBillList(string sWhere) + public object GetMouldProdOutBill(string sWhere) { try { ds = Sc_MouldOtherInBillList_s(sWhere); - if (ds == null || ds.Tables[0].Rows.Count <= 0) - { - objJsonResult.code = "0"; - objJsonResult.count = 0; - objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; - objJsonResult.data = null; - return objJsonResult; - } - else - { - objJsonResult.code = "1"; - objJsonResult.count = 1; - objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; - objJsonResult.data = ds.Tables[0]; - return objJsonResult; - } + objJsonResult.code = "1"; + objJsonResult.count = 1; + objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; + objJsonResult.data = ds.Tables[0]; + return objJsonResult; } catch (Exception ex) { @@ -61,6 +49,107 @@ } } + public static DataSet Sc_GetMouldProdOutBill(string sWhere) + { + if (sWhere == null || sWhere.Equals("")) + { + return new SQLHelper.ClsCN().RunProcReturn("select * from h_v_Sc_MouldOtherInBillList ", "h_v_Sc_MouldOtherInBillList"); + } + else + { + string sql1 = "select * from h_v_Sc_MouldOtherInBillList where 1 = 1 "; + string sql = sql1 + sWhere; + return new SQLHelper.ClsCN().RunProcReturn(sql, "h_v_Sc_MouldOtherInBillList"); + } + + } + #endregion + ///// <summary> + ///// 杩斿洖妯″叿鍏朵粬鍏ュ簱鍗曞垪琛� + /////鍙傛暟锛歴tring sql銆� + /////杩斿洖鍊硷細object銆� + ///// </summary> + //[Route("Sc_MouldOtherInBill/GetMouldOtherInBillList")] + //[HttpGet] + //public object list(string sWhere) + //{ + // try + // { + // if (sWhere == null || sWhere.Equals("")) + // { + // ds = oCN.RunProcReturn("select * from Sc_MouldStockBillMain " + sWhere, "Sc_MouldStockBillMain"); + // } + // else + // { + // string sql1 = "select * from Sc_MouldStockBillMain where 1 = 1 "; + // string sql = sql1 + sWhere; + // ds = oCN.RunProcReturn(sql, "Sc_MouldStockBillMain"); + // } + // if (ds == null || ds.Tables[0].Rows.Count == 0) + // { + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "false锛�"; + // objJsonResult.data = null; + // return objJsonResult; + // } + // else + // { + // objJsonResult.code = "1"; + // objJsonResult.count = 1; + // objJsonResult.Message = "Sucess锛�"; + // objJsonResult.data = ds.Tables[0]; + // return objJsonResult; + // } + // } + // catch (Exception e) + // { + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "Exception锛�" + e.ToString(); + // objJsonResult.data = null; + // return objJsonResult; + // } + //} + ///// <summary> + ///// 妯″叿鍏朵粬鍏ュ簱鍗曞垪琛� + ///// </summary> + ///// <returns></returns> + //[Route("Sc_MouldOtherInBill/GetMouldOtherInBillList")] + //[HttpGet] + //public object GetMouldOtherInBillList(string sWhere) + //{ + // try + // { + + // ds = Sc_MouldOtherInBillList_s(sWhere); + // if (ds == null || ds.Tables[0].Rows.Count <= 0) + // { + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�"; + // objJsonResult.data = null; + // return objJsonResult; + // } + // else + // { + // objJsonResult.code = "1"; + // objJsonResult.count = 1; + // objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; + // objJsonResult.data = ds.Tables[0]; + // return objJsonResult; + // } + // } + // catch (Exception ex) + // { + // objJsonResult.code = "0"; + // objJsonResult.count = 0; + // objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString(); + // objJsonResult.data = null; + // return objJsonResult; + // } + //} + #region sql璇彞 -- Gitblit v1.9.1