From c40039183a5c7f9a09953c19f60cf3b45110c2cb Mon Sep 17 00:00:00 2001
From: duhe <226547893@qq.com>
Date: 星期四, 14 九月 2023 17:31:40 +0800
Subject: [PATCH] 生产领料单:新增或复制保存时,后端不再重新生成单据内码

---
 WebAPI/Controllers/GG_NoticeController.cs |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/WebAPI/Controllers/GG_NoticeController.cs b/WebAPI/Controllers/GG_NoticeController.cs
index 365de48..6d253d8 100644
--- a/WebAPI/Controllers/GG_NoticeController.cs
+++ b/WebAPI/Controllers/GG_NoticeController.cs
@@ -1,4 +1,5 @@
 锘縰sing DBUtility;
+using Newtonsoft.Json;
 using Newtonsoft.Json.Linq;
 using System;
 using System.Collections.Generic;
@@ -28,6 +29,7 @@
         {
             try
             {
+                List<object> columnNameList = new List<object>();
                 //缂栬緫鏉冮檺
                 //if (!DBUtility.ClsPub.Security_Log_second("Sc_MouldRepairChangeBillList", 1, false, user))
                 //{
@@ -40,12 +42,21 @@
 
                 ds = Get_GG_NoticeBillList(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
@@ -69,8 +80,8 @@
 
         public static DataSet Get_GG_NoticeBillList(string sWhere)
         {
-            var sql = "select A.HInterID,b.HEntryID,A.HBillNo,A.HContext,A.HDeptID,D.HName HDeptName, A.HSendMan, B.HReceiveMan,A.HLevel,A.HDescription,case when B.HReadFlag=0 then '鏈槄' when B.HReadFlag=1 then '宸查槄' end HReadFlag, A.HMaker,A.HMakeDate,A.HUpDater,A.HUpDateDate" +
-               " from OA_InformBillMain A inner join  OA_InformBillSub B on A.HInterID=B.HInterID left join Gy_Department D on A.HDeptID=D.HItemID where 1=1 " + sWhere+ "  order by HInterID desc";
+            var sql = "select A.HInterID 涓诲唴鐮�,b.HEntryID 瀛愬唴鐮�,A.HBillNo 鍗曟嵁鍙�,A.HContext 涓婚,A.HDeptID,D.HName 鍙戦�侀儴闂�, A.HSendMan 鍙戦�佷汉, B.HReceiveMan 鎺ユ敹浜�,A.HLevel 绱ф�ョ▼搴�,A.HDescription 璇︾粏鍐呭,case when B.HReadFlag=0 then '鏈槄' when B.HReadFlag=1 then '宸查槄' end 鐘舵��, A.HMaker 鍒跺崟浜�,A.HMakeDate 鍒跺崟鏃ユ湡,A.HUpDater 淇敼浜�,A.HUpDateDate 淇敼鏃ユ湡" +
+               " from OA_InformBillMain A inner join  OA_InformBillSub B on A.HInterID=B.HInterID left join Gy_Department D on A.HDeptID=D.HItemID where 1=1 " + sWhere+ "  order by 涓诲唴鐮� desc";
             return new SQLHelper.ClsCN().RunProcReturn(sql, "OA_InformBillMain");
         }
 

--
Gitblit v1.9.1