From 5898d7f62ec4b29f313a018c7526ce100e9d30a6 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期三, 09 四月 2025 15:02:05 +0800
Subject: [PATCH] 加日志

---
 WebAPI/Controllers/SCGL/Sc_ProductionReturnBillController.cs |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/WebAPI/Controllers/SCGL/Sc_ProductionReturnBillController.cs b/WebAPI/Controllers/SCGL/Sc_ProductionReturnBillController.cs
index 1922813..ae1c5fc 100644
--- a/WebAPI/Controllers/SCGL/Sc_ProductionReturnBillController.cs
+++ b/WebAPI/Controllers/SCGL/Sc_ProductionReturnBillController.cs
@@ -8,6 +8,7 @@
 using WebAPI.Models;
 using Model;
 using Newtonsoft.Json.Linq;
+using Newtonsoft.Json;
 
 namespace WebAPI.Controllers.SCGL
 {
@@ -75,6 +76,7 @@
         {
             try
             {
+                List<object> columnNameList = new List<object>();  //瀹氫箟澹版槑鍙橀噺 锛屾妸閫氳繃 new List<object>()鍒涘缓鐨� 瀹炰緥锛岃祴鍊肩粰鍙橀噺
                 //鍒ゆ柇鏄惁鏈夋煡璇㈢殑鏉冮檺
                 if (!DBUtility.ClsPub.Security_Log("Kf_ProductionReturnBill_Query", 1, false, user))
                 {
@@ -94,6 +96,12 @@
                     string sql = "select * from h_v_IF_ProductionReturnList where 1 = 1 " + sWhere + " order by hmainid desc";
                     ds = oCN.RunProcReturn(sql, "h_v_IF_ProductionReturnList");
                 }
+                foreach (DataColumn col in ds.Tables[0].Columns)//閬嶅巻ds涓涓�涓〃锛圱ables[0]锛夌殑鎵�鏈夊垪锛圕olumns锛夋瘡娆″惊鐜腑锛宑ol鍙橀噺浼氭寔鏈夊綋鍓嶅垪鐨勫紩鐢�
+                {
+                    Type dataType = col.DataType; //鑾峰彇褰撳墠鏁版嵁绫诲瀷浼犲叆 鑷畾涔夊彉閲廳atadataType
+                    string ColmString = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}"; //瀛楃涓叉嫾鎺�         // 灏嗗垪鍚嶅拰鏁版嵁绫诲瀷淇℃伅鎷兼帴鎴愪竴涓狫SON鏍煎紡鐨勫瓧绗︿覆
+                    columnNameList.Add(JsonConvert.DeserializeObject(ColmString));//鑾峰彇鍒癉ataColumn鍒楀璞$殑鍒楀悕
+                }
 
                 //if (ds.Tables[0].Rows.Count != 0 || ds != null)
                 //{
@@ -101,6 +109,7 @@
                 objJsonResult.count = 1;
                 objJsonResult.Message = "Sucess锛�";
                 objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = columnNameList;
                 return objJsonResult;
                 //}
                 //else

--
Gitblit v1.9.1