From 4c1b91ae0cd1dc4084328d8d29635b79ba1bebf0 Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期四, 14 十一月 2024 22:29:39 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/品质管理/首件检验单/QC_FirstPieceCheckBillController.cs | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 56 insertions(+), 0 deletions(-) diff --git "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillController.cs" "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillController.cs" index e598d95..85039e8 100644 --- "a/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillController.cs" +++ "b/WebAPI/Controllers/\345\223\201\350\264\250\347\256\241\347\220\206/\351\246\226\344\273\266\346\243\200\351\252\214\345\215\225/QC_FirstPieceCheckBillController.cs" @@ -1,6 +1,7 @@ 锘縰sing Newtonsoft.Json; using Newtonsoft.Json.Linq; using Pub_Class; +using SyntacticSugar.constant; using System; using System.Collections; using System.Collections.Generic; @@ -136,6 +137,61 @@ } #endregion + #region 宸ヨ祫缁撶畻鍗�(涓汉)鍒嗛〉鍒楄〃 + [Route("QC_FirstPieceCheckBillMain/QC_FirstPieceCheckBillMainListPage")] + [HttpGet] + public json QC_FirstPieceCheckBillMainListPage(string sWhere, string user, int page, int size) + { + DataSet ds; + json res = new json(); + try + { + List<object> columnNameList = new List<object>(); + //鍒ゆ柇鏉冮檺 + if (!DBUtility.ClsPub.Security_Log("QC_FirstPieceCheckBill_Query", 3, false, user)) + { + objJsonResult.code = "0"; + objJsonResult.count = 0; + objJsonResult.Message = "鎮ㄦ病鏈夎妯″潡鏉冮檺,璇蜂笌绠$悊鍛樿仈绯伙紒"; + objJsonResult.data = null; + return objJsonResult; + } + sWhere = sWhere.Replace("'", "''"); + if (sWhere == null || sWhere.Equals("")) + { + ds = oCN.RunProcReturn("exec h_p_QC_FirstPieceCheckBillMainList " + page + "," + size + ",''", "h_p_QC_FirstPieceCheckBillMainList"); + } + else + { + ds = oCN.RunProcReturn("exec h_p_QC_FirstPieceCheckBillMainList " + page + "," + size + ",'" + sWhere + "'", "h_p_QC_FirstPieceCheckBillMainList"); + } + + //娣诲姞鍒楀悕 + 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鍒楀璞$殑鍒楀悕 + } + + res.code = CodeConstant.SUCCEED; + res.count = int.Parse(ds.Tables[1].Rows[0]["count"].ToString()); + res.Message = "Sucess锛�"; + res.list = columnNameList; + res.data = ds.Tables[0]; + return res; + } + catch (Exception e) + { + res.code = CodeConstant.FAIL; + res.count = CountConstant.FAIL; + res.Message = "Exception锛�" + e.ToString(); + res.data = null; + return res; + } + } + #endregion + #region 棣栦欢妫�楠屽崟缂栬緫鑾峰彇鏁版嵁 [Route("QC_FirstPieceCheckBill/QC_FirstPieceCheckBill_Edit")] [HttpGet] -- Gitblit v1.9.1