From e235d94e5987d43117439837e3a0ee2e316e91d2 Mon Sep 17 00:00:00 2001
From: yl <ykxkd@outlook.com>
Date: 星期三, 22 三月 2023 17:19:00 +0800
Subject: [PATCH] 获取标签接口修改、过滤器修改、用户清单导入班组字段

---
 VueWebApi/DLL/DAL/AppPurchManagementDAL.cs |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/VueWebApi/DLL/DAL/AppPurchManagementDAL.cs b/VueWebApi/DLL/DAL/AppPurchManagementDAL.cs
index 711b69a..3b05d98 100644
--- a/VueWebApi/DLL/DAL/AppPurchManagementDAL.cs
+++ b/VueWebApi/DLL/DAL/AppPurchManagementDAL.cs
@@ -143,10 +143,10 @@
                     mes.data = null;
                     return mes;
                 }
-                //Lambda琛ㄨ揪寮忚繃婊よ幏鍙栭璁″埌璐ф棩鏈熴�侀儴闂ㄣ�佷緵搴斿晢
-                string hacceptdate = json.Select(p => p.hacceptdate).ToList().Distinct().ToString(); //棰勮鍒拌揣鏃ユ湡
-                string dpartment = json.Select(p => p.hdepartmentcode).ToList().Distinct().ToString(); //閮ㄩ棬
-                string customercode = json.Select(p => p.hcustomercode).ToList().Distinct().ToString(); //渚涘簲鍟�
+                //Lambda琛ㄨ揪寮忚繃婊よ幏鍙栭璁″埌璐ф棩鏈熴�侀儴闂ㄣ�佷緵搴斿晢鍙栫涓�涓�
+                string hacceptdate = json.Select(p => p.hacceptdate).Distinct().ToList().First().ToString(); //棰勮鍒拌揣鏃ユ湡
+                string dpartment = json.Select(p => p.hdepartmentcode).Distinct().ToList().First().ToString(); //閮ㄩ棬
+                string customercode = json.Select(p => p.hcustomercode).Distinct().ToList().First().ToString(); //渚涘簲鍟�
                 //鍐欏叆閲囪喘鍒拌揣鍗曚富琛�
                 sql = @"insert into T_PurchaseArrivalOrder(hbillno,hdate,hacceptdate,hbillstaus,hdepartmentcode,hcustomercode,hsourcebillno,lm_user,lm_date) 
                         values(@hbillno,@hdate,@hacceptdate,@hbillstaus,@hdepartmentcode,@hcustomercode,@hsourcebillno,@lm_user,@lm_date)";
@@ -157,7 +157,7 @@
                     {
                         hbillno = djwo,
                         hdate = DateTime.Now.ToString(),
-                        hacceptdate = Convert.ToDateTime(hacceptdate),
+                        hacceptdate =hacceptdate==""?null:hacceptdate,
                         hbillstaus = orderstaus,
                         hdepartmentcode = dpartment,
                         hcustomercode = customercode,
@@ -182,7 +182,7 @@
                             hpartcode = json[i].hpartcode,
                             hplanqty = decimal.Parse(json[i].hplanqty),
                             hqty = decimal.Parse(json[i].hqty),
-                            hacceptdate = Convert.ToDateTime(hacceptdate),
+                            hacceptdate = hacceptdate == "" ? null : hacceptdate,
                             hischeck = json[i].hischeck,
                             hbatchno = json[i].hbatchno
                         }

--
Gitblit v1.9.3