From db94e0405f124e189530a5b0ee454960dddd111d Mon Sep 17 00:00:00 2001
From: yxj <1qaz@123>
Date: 星期五, 06 一月 2023 16:58:57 +0800
Subject: [PATCH] 条码系统增加单据日期是否取界面递入日期系统参数,销售出库、生产入库上传方法日期递入值修改

---
 WebAPI/Controllers/LMESController.cs |   36 +++++++++++++++++++++++-------------
 1 files changed, 23 insertions(+), 13 deletions(-)

diff --git a/WebAPI/Controllers/LMESController.cs b/WebAPI/Controllers/LMESController.cs
index d039b77..a0df8cc 100644
--- a/WebAPI/Controllers/LMESController.cs
+++ b/WebAPI/Controllers/LMESController.cs
@@ -1,4 +1,5 @@
-锘縰sing Newtonsoft.Json.Linq;
+锘縰sing Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
 using Pub_Class;
 using System;
 using System.Collections;
@@ -59,6 +60,7 @@
             DataSet ds;
             try
             {
+                List<object> columnNameList = new List<object>();
                 //鍒ゆ柇鏄惁鏈夋煡璇㈡潈闄�
                 //if (!DBUtility.ClsPub.Security_Log("Sc_ProcessExchangeBill_Query", 1, false, user))
                 //{
@@ -72,22 +74,20 @@
                 SQLHelper.ClsCN oCN = new SQLHelper.ClsCN();
                 ds = oCN.RunProcReturn("select * from h_v_Sc_ProcessExchangeBillQuery where 1 = 1 " + sWhere + " order by hmainid desc ", "h_v_Sc_ProcessExchangeBillQuery");
 
-                //if (ds.Tables[0].Rows.Count != 0 || ds != null)
-                //{
+                //娣诲姞鍒楀悕
+                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.list = columnNameList;
                 objJsonResult.data = ds.Tables[0];
                 return objJsonResult;
-                //}
-                //else
-                //{
-                //objJsonResult.code = "0";
-                //objJsonResult.count = 0;
-                //objJsonResult.Message = "鏃犳暟鎹�";
-                //objJsonResult.data = null;
-                //return objJsonResult;
-                //}
             }
             catch (Exception e)
             {
@@ -115,6 +115,7 @@
                 string sql = "select * from h_v_Sc_ProcessExchangeBillQuerySub where hmainid = ";
                 string sql1 = sql + sWhere;
                 ds = oCN.RunProcReturn(sql1 + " order by cast(宸ュ簭鍙� as int)", "h_v_Sc_ProcessExchangeBillQuerySub");
+                return GetObjectJson(ds);
             }
             catch (Exception e)
             {
@@ -124,7 +125,6 @@
                 objJsonResult.data = null;
                 return objJsonResult;
             }
-            return GetObjectJson(ds);
         }
 
         #region 宸ュ簭娴佽浆鍗★紙涓嬭揪锛�
@@ -599,11 +599,21 @@
         {
             try
             {
+                List<object> columnNameList = new List<object>();
                 //if (ds.Tables[0].Rows.Count != 0 || ds != null)
                 //{
+                //娣诲姞鍒楀悕
+                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.list = columnNameList;
                 objJsonResult.data = ds.Tables[0];
                 return objJsonResult;
                 //}

--
Gitblit v1.9.1