From 0dadc3bdd5b21fcf06f20e0d9e4074df870ed930 Mon Sep 17 00:00:00 2001
From: Administrator <Administrator@DESKTOP-5BIMHQ3>
Date: 星期五, 15 三月 2024 11:19:14 +0800
Subject: [PATCH] 问题修改

---
 Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs |   27 +++++++++++++++++++--------
 1 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs b/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
index 8a95a3a..4f904b5 100644
--- a/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
+++ b/Wms/WMS.BLL/BllAsnServer/PalletBindServer.cs
@@ -586,7 +586,7 @@
                    .And(m => m.AreaNo.Contains(categoryAreaNo))
                    .ToExpression();//娉ㄦ剰 杩欎竴鍙� 涓嶈兘灏�
                 var total = 0;
-                var list = Db.Queryable<SysStorageLocat>().Where(item)
+                var list = Db.Queryable<SysStorageLocat>().Where(item).OrderByDescending(a=>a.Depth).OrderBy(a=>a.Column)
                     .Select(a => new LocatDto()
                     {
                         Id = a.Id,
@@ -637,7 +637,7 @@
                 
 
                 //鍒ゆ柇褰撳墠鎵樼洏鏄惁瀛樺湪缁戝畾淇℃伅
-                if (bind.LocatNo != null)
+                if (!string.IsNullOrWhiteSpace(bind.LocatNo))
                 {
                     //鍒嗗壊宸茬粦鍌ㄤ綅涓庢柊鍌ㄤ綅
                     //宸茬粦鍌ㄤ綅
@@ -1639,13 +1639,21 @@
                                 IsBelt = item.IsBelt,
                                 Demo = item.Demo,
 
-                                OwnerNo = ownerNo,
-                                OwnerName = ownerName,
-
                                 IsDel = "0",
                                 CreateUser = 0,
                                 CreateTime = comTime
                             };
+                            //缁存姢搴撳瓨鏄庣粏璐т富/渚涘簲鍟嗕俊鎭�
+                            if (notice.Type == "0" || notice.Type == "2" || notice.Type == "4" || notice.Type == "6" || notice.Type == "7")//0:鎴愬搧鍏ュ簱锛�2:涓棿鍝佸叆搴�,4:杞﹂棿浣欐枡鍏ュ簱,6:浠e偍鍏ュ簱,7:瀵勫瓨鍏ュ簱
+                            {
+                                sd.OwnerNo = notice.CustomerNo;//璐т富缂栫爜
+                                sd.OwnerName = notice.CustomerName;//璐т富鍚嶇О
+                            }
+                            else if (notice.Type == "1" || notice.Type == "5")//1:閲囪喘鍏ュ簱,2:鍏跺畠鍏ュ簱
+                            { 
+                                sd.SupplierNo= notice.CustomerNo;//渚涘簲鍟嗙紪鐮�
+                                sd.SupplierName = notice.CustomerName;//渚涘簲鍟嗗悕绉�
+                            }
 
                             //if (quality.Count() > 0)
                             //{
@@ -1730,13 +1738,16 @@
                                     LockQty = 0,
                                     FrozenQty = 0,
 
-                                    OwnerNo = ownerNo,
-                                    OwnerName = ownerName,
-
                                     IsDel = "0",
                                     CreateUser = userId,
                                     CreateTime = comTime
                                 };
+                                //缁存姢搴撳瓨璐т富淇℃伅
+                                if (notice.Type == "0" || notice.Type == "2" || notice.Type == "4" || notice.Type == "6" || notice.Type == "7")//0:鎴愬搧鍏ュ簱锛�2:涓棿鍝佸叆搴�,4:杞﹂棿浣欐枡鍏ュ簱,6:浠e偍鍏ュ簱,7:瀵勫瓨鍏ュ簱
+                                {
+                                    stock.OwnerNo = notice.CustomerNo;//璐т富缂栫爜
+                                    stock.OwnerName = notice.CustomerName;//璐т富鍚嶇О
+                                }
                                 Db.Insertable(stock).ExecuteCommand();
                             }
                             #endregion

--
Gitblit v1.8.0