From 165e90b5b1a6ac057cf0ace591f8fd66244742d7 Mon Sep 17 00:00:00 2001 From: yusijie <ysj@hz-kingdee.com> Date: 星期四, 27 十月 2022 15:10:24 +0800 Subject: [PATCH] 动态列(物料、仓库、工位、职员、部门、辅助属性、组织、计量单位、货币、月度设置、客户、供应商、订单等级、订单反馈状态、工艺参数、工艺参数单位、工艺参数对应表、包装方式、故障类别) --- WebAPI/Controllers/Sc_MouldRepairInBillListController.cs | 55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 54 insertions(+), 1 deletions(-) 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) -- Gitblit v1.9.1