From 7ee54f365833d7858c7196ce6b7ebaf81fdfb068 Mon Sep 17 00:00:00 2001
From: yuyou_x <2336760928@qq.com>
Date: 星期四, 07 三月 2024 11:17:09 +0800
Subject: [PATCH] 增加取消移库任务对储位的修改

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

diff --git a/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs b/Wms/WMS.BLL/BllSoServer/ExportNoticeServer.cs
index 93f165c..a77991b 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)
                         {

--
Gitblit v1.8.0