From 60994422d1ff27c24ed8bdf1076f50166ca638db Mon Sep 17 00:00:00 2001
From: 肖洋 <cathay_xy@163.com>
Date: 星期二, 07 一月 2025 18:21:25 +0800
Subject: [PATCH] 修复和优化多个服务及配置

---
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
index 931a2e7..d5e3a87 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Dt_TaskService.cs
@@ -204,8 +204,8 @@
                     await DeleteStockInfoAsync(stock.Id);
                     await DeleteStockInfoDetailsAsync(stock.StockInfoDetails);
                     await AddStockInfoHtyAsync(stockInfo_Hty);
+                    await UpdateLocationAsync(loc); //璐ㄦ浠诲姟闇�瑕佹寔缁攣瀹氬簱浣�
                 }
-                await UpdateLocationAsync(loc);
                 await DeleteTaskAsync(task.TaskId);
                 await AddTaskHtyAsync(taskHty);
             });
@@ -1383,6 +1383,10 @@
             {
                 return content.Error("鏈煡璇㈠埌瀵瑰簲鐨勫簱瀛樹俊鎭�");
             }
+            if (stockInfo.LocationInfo.LocationStatus != (int)LocationEnum.InStock)
+            {
+                return content.Error("璇ヨ揣浣嶇姸鎬佷笉绛変簬銆愭湁璐с�戣鏌ョ湅鏄惁宸茬粡鏈変换鍔★紒");
+            }
 
             var task = await BaseDal.QueryFirstAsync(x => x.PalletCode == palletCode);
             if (task != null)
@@ -1403,9 +1407,12 @@
             }
             else
             {
-                if (stockInfo.LocationInfo.RoadwayNo == "JZSC1")
+                if (stockInfo.LocationInfo.RoadwayNo.Contains("JZSC"))
                 {
-                    task = CreateTask(stockInfo, "002-021-001", taskType);
+                    var targetAddress = "002-021-001";
+                    if (stockInfo.LocationInfo.RoadwayNo == "JZSC4")
+                        targetAddress = "001-021-001";
+                    task = CreateTask(stockInfo, targetAddress, taskType);
                 }
             }
             //var taskId = await BaseDal.AddDataAsync(task);

--
Gitblit v1.9.3