From e7864a4dcecba72ccbb06dfb6a3d4a77c65f2a3c Mon Sep 17 00:00:00 2001
From: Demo <Demo@DESKTOP-CPA90BF>
Date: 星期四, 07 三月 2024 11:25:38 +0800
Subject: [PATCH] 合并代码

---
 Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs |   21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
index 93f165c..334564f 100644
--- a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
+++ b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
@@ -2288,7 +2288,16 @@
 
                         //鑾峰彇鍌ㄤ綅淇℃伅
                         var locat = Db.Queryable<SysStorageLocat>().First(a => a.IsDel == "0" && a.WareHouseNo == "W01" && a.LocatNo == task.StartLocat);
-
+                        //鑾峰彇绉诲簱浠诲姟瀵瑰簲鐩爣鍌ㄤ綅淇℃伅
+                        SysStorageLocat endlocat = new SysStorageLocat();
+                        if (task.Type == "2")
+                        {
+                            endlocat = Db.Queryable<SysStorageLocat>().First(a => a.IsDel == "0" && a.WareHouseNo == "W03" && a.LocatNo == task.EndLocat);
+                            if (endlocat == null)
+                            {
+                                throw new Exception("鏈煡璇㈠埌鐩爣鍌ㄤ綅淇℃伅");
+                            }
+                        }
                         if (locat == null)
                         {
                             Db.RollbackTran();
@@ -2296,6 +2305,11 @@
                         }
                         locat.Status = "1"; //鏈夌墿鍝�
                         Db.Updateable(locat).ExecuteCommand();
+                        if (endlocat != null)
+                        {
+                            endlocat.Status = "0"; //绌哄偍浣� 0
+                            Db.Updateable(endlocat).ExecuteCommand();
+                        }
 
                         if (noticeDetail.FactQty == 0)
                         {
@@ -2804,6 +2818,11 @@
                         d.Status = "0";
                         d.UpdateUser = userId;
                         d.UpdateTime = DateTime.Now;
+
+                        if (notice.Type == "1" || notice.Type == "5" || notice.Type == "6" || notice.Type == "7" || notice.Type == "8")//1锛氶鏂欏嚭搴撱��
+                        {
+                            d.LotNo = "";
+                        }
                     }
                     notice.Status = "0";
                     notice.UpdateUser = userId;

--
Gitblit v1.8.0