From 554ebff8616f1ed2fc578cde80642791cfaff476 Mon Sep 17 00:00:00 2001
From: wangxinhui <wangxinhui@hnkhzn.com>
Date: 星期四, 02 一月 2025 09:29:04 +0800
Subject: [PATCH] 出库完成等代码更新

---
 代码管理/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs" "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
index a872ab6..759f4e4 100644
--- "a/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
+++ "b/\344\273\243\347\240\201\347\256\241\347\220\206/WMS/WIDESEA_WMSServer/WIDESEA_TaskInfoService/TaskService_Inbound.cs"
@@ -44,7 +44,7 @@
                 {
                     return WebResponseContent.Instance.Error($"鏈壘鍒扮粍鐩樹俊鎭�");
                 }
-                if (stockInfo.StockStatus != StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt())
+                if (stockInfo.StockStatus != StockStatusEmun.缁勭洏鏆傚瓨.ObjToInt() && stockInfo.StockStatus != StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt())
                 {
                     return WebResponseContent.Instance.Error($"璇ユ墭鐩樼姸鎬佷笉姝g‘,涓嶅彲鐢宠鍏ュ簱");
                 }
@@ -72,9 +72,15 @@
                     PalletType = stockInfo.PalletType
                 };
 
-                stockInfo.StockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt();
-
-                _unitOfWorkManage.BeginTran();
+                if (stockInfo.StockStatus == StockStatusEmun.鎵嬪姩缁勭洏鏆傚瓨.ObjToInt())
+                {
+                    stockInfo.StockStatus = StockStatusEmun.鎵嬪姩缁勭洏鍏ュ簱纭.ObjToInt();
+                }
+                else
+                {
+                    stockInfo.StockStatus = StockStatusEmun.鍏ュ簱纭.ObjToInt();
+                }
+                    _unitOfWorkManage.BeginTran();
                 int taskId = BaseDal.AddData(newTask);
                 newTask.TaskId = taskId;
                 _stockRepository.StockInfoRepository.UpdateData(stockInfo);

--
Gitblit v1.9.3