From ed80467e957a5ae62f2e7a4df1e794a24eb36af3 Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期三, 21 九月 2022 09:12:16 +0800 Subject: [PATCH] LAYUI列表列名改为动态加载模式( 器具保养规程单维护,器具寿命调整单维护,器具保养记录单维护,器具点检记录单维护,器具故障登记单维护,器具维修记录单维护,设备点检规程单维护,设备保养规程单维护,设备保养记录单维护,设备点检记录单维护,设备故障登记单维护,设备维修记录单维护,班组职员清单维护 ) --- WebAPI/Controllers/SBGL/Sb_EquipMaintainRuleBillController.cs | 12 +++ WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs | 12 +++ WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs | 13 ++++ WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs | 13 +++ WebAPI/Controllers/Sc_MouldRepairInBillListController.cs | 55 ++++++++++++++++++ WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs | 23 +++++++ WebAPI/Controllers/工资管理/Gy_GroupEmpBillController.cs | 13 ++++ WebAPI/Controllers/Sb_CheckEqpRepairWorkBillController.cs | 23 +++++++ 8 files changed, 155 insertions(+), 9 deletions(-) diff --git a/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs b/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs index aa4c080..3e51d5e 100644 --- a/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs +++ b/WebAPI/Controllers/MJGL/Sc_MouldMaintainRuleBillController.cs @@ -1,4 +1,5 @@ -锘縰sing Newtonsoft.Json.Linq; +锘縰sing Newtonsoft.Json; +using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Data; @@ -20,6 +21,14 @@ public DAL.ClsSc_MouldMaintainRuleBill BillNew = new DAL.ClsSc_MouldMaintainRuleBill(); //瀵瑰簲鍗曟嵁绫� public DAL.ClsSc_MouldMaintainRuleBill BillOld = new DAL.ClsSc_MouldMaintainRuleBill(); //瀵瑰簲鍗曟嵁绫� + + //public class HlpBill + //{ + // public int HSouceInterID = 0; + // public int HSourceEntryID = 0; + // public int Type = 0; + // public string user { get; set; } + //} #region 鍣ㄥ叿淇濆吇瑙勭▼鍗曞垪琛� [Route("Sc_MouldMaintainRuleBill/GetMouldMaintainRuleList")] [HttpGet] @@ -27,6 +36,9 @@ { try { + List<object> columnNameList = new List<object>(); + //鍙嶅簭鍒楀寲浼犻�掔殑鍊� + //HlpBill com = JsonConvert.DeserializeObject<HlpBill>(sWhere.ToString()); //缂栬緫鏉冮檺 if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainRuleBillList", 1, false, user)) { @@ -48,12 +60,21 @@ ds = oCN.RunProcReturn(sql, "h_v_Sc_MouldMaintainRuleBillList"); } + //娣诲姞鍒楀悕 + 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鍒楀璞$殑鍒楀悕 + } + //if (ds.Tables[0].Rows.Count != 0 || ds != null) //{ objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess锛�"; objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; return objJsonResult; //} //else diff --git a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs index f9afe77..b3468e2 100644 --- a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs +++ b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckBillController.cs @@ -1,4 +1,5 @@ -锘縰sing Newtonsoft.Json.Linq; +锘縰sing Newtonsoft.Json; +using Newtonsoft.Json.Linq; using Pub_Class; using System; using System.Collections.Generic; @@ -28,6 +29,7 @@ { try { + List<object> columnNameList = new List<object>(); if (!DBUtility.ClsPub.Security_Log("Sb_EquipDotCheckBillList", 1, false, user)) { objJsonResult.code = "0"; @@ -46,13 +48,20 @@ string sql = sql1 + sWhere + " order by hmainid desc"; ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckBillList"); } - + //娣诲姞鍒楀悕 + 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鍒楀璞$殑鍒楀悕 + } //if (ds.Tables[0].Rows.Count != 0 || ds != null) //{ objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess锛�"; objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; return objJsonResult; //} //else diff --git a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs index e63541b..1b8df03 100644 --- a/WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs +++ b/WebAPI/Controllers/SBGL/Sb_EquipDotCheckRuleBillController.cs @@ -1,4 +1,5 @@ -锘縰sing Newtonsoft.Json.Linq; +锘縰sing Newtonsoft.Json; +using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Data; @@ -27,6 +28,7 @@ { try { + List<object> columnNameList = new List<object>(); if (!DBUtility.ClsPub.Security_Log("Sb_EquipDotCheckRuleBillList", 1, false, user)) { objJsonResult.code = "0"; @@ -47,12 +49,20 @@ ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipDotCheckRuleList"); } + //娣诲姞鍒楀悕 + 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鍒楀璞$殑鍒楀悕 + } //if (ds.Tables[0].Rows.Count != 0 || ds != null) //{ objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess锛�"; objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; return objJsonResult; //} //else diff --git a/WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs index e394350..e6b4811 100644 --- a/WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs +++ b/WebAPI/Controllers/SBGL/Sb_EquipMaintainBillController.cs @@ -1,4 +1,5 @@ -锘縰sing Newtonsoft.Json.Linq; +锘縰sing Newtonsoft.Json; +using Newtonsoft.Json.Linq; using Pub_Class; using System; using System.Collections.Generic; @@ -29,6 +30,7 @@ { try { + List<object> columnNameList = new List<object>(); if (!DBUtility.ClsPub.Security_Log("Sb_EquipMaintainBillList", 1, false, user)) { objJsonResult.code = "0"; @@ -48,12 +50,21 @@ ds = oCN.RunProcReturn(sql, "h_v_Sc_EquipMaintain"); } + //娣诲姞鍒楀悕 + 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鍒楀璞$殑鍒楀悕 + } + //if (ds.Tables[0].Rows.Count != 0 || ds != null) //{ objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess锛�"; objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; return objJsonResult; //} //else diff --git a/WebAPI/Controllers/SBGL/Sb_EquipMaintainRuleBillController.cs b/WebAPI/Controllers/SBGL/Sb_EquipMaintainRuleBillController.cs index 5da67af..0467e3a 100644 --- a/WebAPI/Controllers/SBGL/Sb_EquipMaintainRuleBillController.cs +++ b/WebAPI/Controllers/SBGL/Sb_EquipMaintainRuleBillController.cs @@ -1,4 +1,5 @@ -锘縰sing Newtonsoft.Json.Linq; +锘縰sing Newtonsoft.Json; +using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Data; @@ -26,6 +27,7 @@ { try { + List<object> columnNameList = new List<object>(); if (!DBUtility.ClsPub.Security_Log("Sb_EquipMaintainRuleBillList", 1, false, user)) { objJsonResult.code = "0"; @@ -46,12 +48,20 @@ ds = oCN.RunProcReturn(sql, "h_v_Sb_EquipMaintainRuleList"); } + //娣诲姞鍒楀悕 + 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鍒楀璞$殑鍒楀悕 + } //if (ds.Tables[0].Rows.Count != 0 || ds != null) //{ objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess锛�"; objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; return objJsonResult; //} //else diff --git a/WebAPI/Controllers/Sb_CheckEqpRepairWorkBillController.cs b/WebAPI/Controllers/Sb_CheckEqpRepairWorkBillController.cs index bed3260..20e9a95 100644 --- a/WebAPI/Controllers/Sb_CheckEqpRepairWorkBillController.cs +++ b/WebAPI/Controllers/Sb_CheckEqpRepairWorkBillController.cs @@ -1,4 +1,5 @@ -锘縰sing Newtonsoft.Json.Linq; +锘縰sing Newtonsoft.Json; +using Newtonsoft.Json.Linq; using Pub_Class; using System; using System.Collections.Generic; @@ -35,6 +36,7 @@ { try { + List<object> columnNameList = new List<object>(); if (!DBUtility.ClsPub.Security_Log("Sb_EquipRepairWorkBillList", 1, false, user)) { objJsonResult.code = "0"; @@ -46,10 +48,19 @@ ds = Sb_EquipRepairWorkBill_s(sWhere); + //娣诲姞鍒楀悕 + 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 = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; return objJsonResult; } catch (Exception ex) @@ -151,6 +162,7 @@ { try { + List<object> columnNameList = new List<object>(); if (!DBUtility.ClsPub.Security_Log("Sb_EquipConkBookBillList", 1, false, user)) { objJsonResult.code = "0"; @@ -162,10 +174,19 @@ ds = Sb_EqpConkBookBillList_s(sWhere); + //娣诲姞鍒楀悕 + 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 = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; return objJsonResult; } diff --git a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs index 8b371b4..a3149ea 100644 --- a/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs +++ b/WebAPI/Controllers/Sc_MouldRepairInBillListController.cs @@ -1,4 +1,5 @@ -锘縰sing Newtonsoft.Json.Linq; +锘縰sing Newtonsoft.Json; +using Newtonsoft.Json.Linq; using Pub_Class; using System; using System.Collections.Generic; @@ -188,6 +189,8 @@ { try { + List<object> columnNameList = new List<object>(); + if (!DBUtility.ClsPub.Security_Log("Sc_MouldMaintainBillList", 1, false, user)) { objJsonResult.code = "0"; @@ -199,12 +202,20 @@ ds = Sc_MouldMaintainBillList_s(sWhere); + //娣诲姞鍒楀悕 + 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鍒楀璞$殑鍒楀悕 + } //if (ds.Tables[0].Rows.Count != 0 || ds != null) //{ objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess锛�"; objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; return objJsonResult; //} //else @@ -315,6 +326,7 @@ { try { + List<object> columnNameList = new List<object>(); if (!DBUtility.ClsPub.Security_Log("Sc_MouldDotCheckBillList", 1, false, user)) { objJsonResult.code = "0"; @@ -325,12 +337,22 @@ } ds = Sc_MouldDotCheckBillList_s(sWhere); + //娣诲姞鍒楀悕 + 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鍒楀璞$殑鍒楀悕 + } + //if (ds.Tables[0].Rows.Count != 0 || ds != null) //{ objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess锛�"; objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; + return objJsonResult; //} //else @@ -479,6 +501,7 @@ { try { + List<object> columnNameList = new List<object>(); if (!DBUtility.ClsPub.Security_Log("Sc_MouldConkBookBillList", 1, false, user)) { objJsonResult.code = "0"; @@ -490,10 +513,19 @@ ds = Sc_MouldConkBookBillList_s(sWhere); + //娣诲姞鍒楀悕 + 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 = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess锛�"; objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; return objJsonResult; } catch (Exception ex) @@ -654,6 +686,7 @@ { try { + List<object> columnNameList = new List<object>(); if (!DBUtility.ClsPub.Security_Log("Sb_MouldRepairWorkBillList", 1, false, user)) { objJsonResult.code = "0"; @@ -665,12 +698,21 @@ ds = Sc_MouldRepairWorkBillList_s(sWhere); + //娣诲姞鍒楀悕 + 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鍒楀璞$殑鍒楀悕 + } + //if (ds.Tables[0].Rows.Count != 0 || ds != null) //{ objJsonResult.code = "1"; objJsonResult.count = 1; objJsonResult.Message = "Sucess锛�"; objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; return objJsonResult; //} //else @@ -5544,6 +5586,8 @@ { try { + List<object> columnNameList = new List<object>(); + if (!DBUtility.ClsPub.Security_Log("Sc_MouldLifeChangeBillList", 1, false, user)) { objJsonResult.code = "0"; @@ -5555,10 +5599,19 @@ ds = Sc_GetMouldLifeChangeBill(sWhere); + //娣诲姞鍒楀悕 + 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 = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; return objJsonResult; } catch (Exception ex) diff --git "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Gy_GroupEmpBillController.cs" "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Gy_GroupEmpBillController.cs" index a4e787c..3f587ac 100644 --- "a/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Gy_GroupEmpBillController.cs" +++ "b/WebAPI/Controllers/\345\267\245\350\265\204\347\256\241\347\220\206/Gy_GroupEmpBillController.cs" @@ -1,4 +1,5 @@ -锘縰sing Newtonsoft.Json.Linq; +锘縰sing Newtonsoft.Json; +using Newtonsoft.Json.Linq; using Pub_Class; using System; using System.Collections; @@ -32,6 +33,7 @@ { try { + List<object> columnNameList = new List<object>(); if (!DBUtility.ClsPub.Security_Log("Gy_Group", 1, false, user)) { objJsonResult.code = "0"; @@ -43,10 +45,19 @@ ds = Sc_GetGroupEmpBill(sWhere); + //娣诲姞鍒楀悕 + 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 = "1"; objJsonResult.count = 1; objJsonResult.Message = "杩斿洖璁板綍鎴愬姛锛�"; objJsonResult.data = ds.Tables[0]; + objJsonResult.list = columnNameList; return objJsonResult; } catch (Exception ex) -- Gitblit v1.9.1