From d34d36d5c0478d1e5f56b92fc5b38fc5ca379e5c Mon Sep 17 00:00:00 2001
From: Administrator <Administrator@DESKTOP-5BIMHQ3>
Date: 星期四, 22 二月 2024 15:44:11 +0800
Subject: [PATCH] Merge branch 'wxw'

---
 Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs |   20 ++++++++++++++++----
 1 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs b/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
index fe0f1cc..9867faa 100644
--- a/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
+++ b/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
@@ -1438,12 +1438,19 @@
                             #endregion
 
                             break;
-                        case "0":
+                        case "0":                            
                             var noticeDetail = Db.Queryable<BllArrivalNoticeDetail>().First(m => m.IsDel == "0" && m.Id == item.ASNDetailNo);
                             if (noticeDetail == null)
                             {
                                 throw new Exception("鏈煡璇㈠埌鎵樼洏缁戝畾鐨勫叆搴撳崟鏄庣粏淇℃伅");
                             }
+                            var notice = Db.Queryable<BllArrivalNotice>().First(m => m.IsDel == "0" && m.ASNNo == noticeDetail.ASNNo);
+                            if (notice == null)
+                            {
+                                throw new Exception("鏈煡璇㈠埌鎵樼洏缁戝畾鐨勫叆搴撳崟淇℃伅");
+                            }
+                            string ownerNo = notice.CustomerNo;//璐т富缂栫爜
+                            string ownerName = notice.CustomerName;//璐т富鍚嶇О
 
                             var sku1 = Db.Queryable<SysMaterials>().First(m => m.IsDel == "0" && m.SkuNo == noticeDetail.SkuNo);
                             string isinspect = "0";
@@ -1460,7 +1467,7 @@
                             {
                                 LotNo = item.LotNo,
                                 LotText = noticeDetail.LotText,
-                                SupplierLot = noticeDetail.SupplierLot,
+                                SupplierLot = noticeDetail.SupplierLot,                                
                                 SkuNo = noticeDetail.SkuNo,
                                 SkuName = noticeDetail.SkuName,
                                 Standard = noticeDetail.Standard,
@@ -1488,6 +1495,9 @@
                                 PackagNo = noticeDetail.PackagNo,
                                 IsBale = item.IsBale,
                                 IsBelt = item.IsBelt,
+
+                                OwnerNo = ownerNo,
+                                OwnerName = ownerName,
 
                                 IsDel = "0",
                                 CreateUser = 0,
@@ -1577,6 +1587,9 @@
                                     LockQty = 0,
                                     FrozenQty = 0,
 
+                                    OwnerNo = ownerNo,
+                                    OwnerName = ownerName,
+
                                     IsDel = "0",
                                     CreateUser = userId,
                                     CreateTime = comTime
@@ -1598,8 +1611,7 @@
                             var asnDetailNum = Db.Queryable<BllArrivalNoticeDetail>()
                                 .Count(m => m.IsDel == "0" && m.ASNNo == noticeDetail.ASNNo && m.Status != "2");
                             if (asnDetailNum == 0)
-                            {
-                                var notice = Db.Queryable<BllArrivalNotice>().First(m => m.IsDel == "0" && m.ASNNo == noticeDetail.ASNNo);
+                            {                                
                                 notice.Status = "2";
                                 notice.CompleteTime = comTime;
                                 Db.Updateable(notice).ExecuteCommand();

--
Gitblit v1.8.0