From ac2d164d9824bb678101dca79bd8c4e9c712d688 Mon Sep 17 00:00:00 2001
From: yangle <admin@YINMOU>
Date: 星期三, 21 九月 2022 13:54:44 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-API

---
 WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs |   25 ++++++++++++++++++-------
 1 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs b/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
index e66f202..4f2987d 100644
--- a/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
+++ b/WebAPI/Controllers/CJGL/Sc_ProcessExchangeBillController.cs
@@ -1,4 +1,5 @@
-锘縰sing Newtonsoft.Json.Linq;
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
 using Pub_Class;
 using System;
 using System.Collections;
@@ -384,18 +385,28 @@
                 //寰楀埌淇℃伅
                 ds = oCN.RunProcReturn("select top 1 * from h_v_Sc_ProcessExchangeBillQuerySub_Mould  where hmainid= " + HProcExchHinteID , "h_v_Sc_ProcessExchangeBillQuerySub_Mould");
                 //鍐欏叆淇℃伅
-                if (ds == null || ds.Tables[0].Rows.Count == 0)
+                //if (ds == null || ds.Tables[0].Rows.Count == 0)
+                //{
+                //    objJsonResult.code = "0";
+                //    objJsonResult.count = 0;
+                //    objJsonResult.Message = "鏈煡璇㈠埌鍑虹珯鍗曟槑缁嗕俊鎭紒";
+                //    objJsonResult.data = null;
+                //    return objJsonResult;
+                //}
+
+                List<object> listCol = new List<object>();
+                foreach (DataColumn col in ds.Tables[0].Columns)
                 {
-                    objJsonResult.code = "0";
-                    objJsonResult.count = 0;
-                    objJsonResult.Message = "鏈煡璇㈠埌鍑虹珯鍗曟槑缁嗕俊鎭紒";
-                    objJsonResult.data = null;
-                    return objJsonResult;
+                    Type dataType = col.DataType;
+                    string str = "{\"ColmCols\":\"" + col.ColumnName + "\",\"ColmType\":\"" + dataType.Name + "\"}";
+                    listCol.Add(JsonConvert.DeserializeObject(str));
                 }
+
                 objJsonResult.code = "0";
                 objJsonResult.count = 1;
                 objJsonResult.Message = "Sucess锛�";
                 objJsonResult.data = ds.Tables[0];
+                objJsonResult.list = listCol;
                 return objJsonResult;
             }
             catch (Exception e)

--
Gitblit v1.9.1