From c34e85eda515636993b37a752b52c0f43ae6e17b Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期四, 09 一月 2025 09:17:18 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs | 99 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 99 insertions(+), 0 deletions(-) diff --git a/WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs index 97be4fa..999c60d 100644 --- a/WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs +++ b/WebAPI/Controllers/MJGL/Sc_MouldUpperBillController.cs @@ -9,6 +9,7 @@ using Newtonsoft.Json; using Model; using DBUtility; +using SyntacticSugar.constant; namespace WebAPI.Controllers.MJGL { @@ -61,6 +62,55 @@ objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "Exception锛�" + e.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + + #region 涓婃ā鍗� 鍒楄〃鍒嗛〉鏌ヨ + [Route("Sc_MouldUpperBill/Sc_MouldUpperBillListPage")] + [HttpGet] + public object Sc_MouldUpperBillListPage(string sWhere, string user, int page, int size) + { + try + { + List<object> columnNameList = new List<object>(); + + //鏌ョ湅鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("Sc_MouldUpperBill_Query", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + sWhere = sWhere.Replace("'", "''"); + ds = oCN.RunProcReturn("exec h_p_Sc_MouldUpperBillList " + page + "," + size + ",'" + sWhere + "'", "h_p_Sc_MouldUpperBillList"); + + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + + objJsonResult.code = CodeConstant.SUCCEED; + objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString()); + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + catch (Exception ex) + { + objJsonResult.code = CodeConstant.FAIL; + objJsonResult.count = CountConstant.FAIL; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString(); objJsonResult.data = null; return objJsonResult; } @@ -857,6 +907,55 @@ } #endregion + #region 涓嬫ā鍗� 鍒楄〃鍒嗛〉鏌ヨ + [Route("Sc_MouldUpperBill/Sc_MouldLowerBillListPage")] + [HttpGet] + public object Sc_MouldLowerBillListPage(string sWhere, string user, int page, int size) + { + try + { + List<object> columnNameList = new List<object>(); + + //鏌ョ湅鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("Sc_MouldLowerBill_Query", 1, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鏃犳煡鐪嬫潈闄愶紒"; + objJsonResult.data = null; + return objJsonResult; + } + + sWhere = sWhere.Replace("'", "''"); + ds = oCN.RunProcReturn("exec h_p_Sc_MouldLowerBillList " + page + "," + size + ",'" + sWhere + "'", "h_p_Sc_MouldLowerBillList"); + + //娣诲姞鍒楀悕 + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } + + + objJsonResult.code = CodeConstant.SUCCEED; + objJsonResult.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString()); + objJsonResult.Message = "Sucess锛�"; + objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; + } + catch (Exception ex) + { + objJsonResult.code = CodeConstant.FAIL; + objJsonResult.count = CountConstant.FAIL; + objJsonResult.Message = "娌℃湁杩斿洖浠讳綍璁板綍锛�" + ex.ToString(); + objJsonResult.data = null; + return objJsonResult; + } + } + #endregion + #region 涓嬫ā鍗� 淇濆瓨鍓嶃�佷繚瀛樺悗鎺у埗 //淇濆瓨鍓嶆帶鍒� -- Gitblit v1.9.1