From be6c4a362a7dec697733cf07734f441e58dff46d Mon Sep 17 00:00:00 2001 From: zrg <z18737863051@163.com> Date: 星期二, 06 八月 2024 17:30:15 +0800 Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API --- WebAPI/Controllers/BaseSet/Gy_ModelTypeController.cs | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/WebAPI/Controllers/BaseSet/Gy_ModelTypeController.cs b/WebAPI/Controllers/BaseSet/Gy_ModelTypeController.cs index 600e113..43cab7d 100644 --- a/WebAPI/Controllers/BaseSet/Gy_ModelTypeController.cs +++ b/WebAPI/Controllers/BaseSet/Gy_ModelTypeController.cs @@ -1,4 +1,5 @@ 锘縰sing DBUtility; +using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; @@ -34,8 +35,10 @@ { try { + List<object> a = new List<object>(); if (!DBUtility.ClsPub.Security_Log(ModRightNameSelect, 1, false, user)) { + objJsonResult.code = "0"; objJsonResult.count = 0; objJsonResult.Message = "娌℃湁鏌ョ湅鏉冮檺"; @@ -43,6 +46,12 @@ return objJsonResult; } ds = oCN.RunProcReturn("select HItemID,HParentID,HNumber,HName,HLevel, case when HEndFlag<>0 then 'Y'else ' 'end HEndFlag,case when HStopFlag <> 0 then 'Y'else ' 'end HStopFlag, HRemark, HUseFlag from Gy_MouldType where 1=1 " + sWhere+ " order by HNumber", "Gy_MouldType"); + foreach (DataColumn col in ds.Tables[0].Columns) + { + Type dataType = col.DataType; + string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; + a.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕 + } //if (ds.Tables[0].Rows.Count != 0 || ds != null) //{ @@ -50,6 +59,7 @@ objJsonResult.count = 1; objJsonResult.Message = "Sucess锛�"; objJsonResult.data = ds.Tables[0]; + objJsonResult.list = a; return objJsonResult; //} //else -- Gitblit v1.9.1