From a833526d6f9d396df0249066f8057c6d5c51b86d Mon Sep 17 00:00:00 2001
From: xxyy <cathay_xy@163.com>
Date: 星期四, 27 二月 2025 13:36:26 +0800
Subject: [PATCH] 修复 Dt_TaskService.cs 中 locations 检查逻辑

---
 Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs
index 28c4737..b95bab5 100644
--- a/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs
+++ b/Code Management/WMS/WIDESEA_WMSServer/WIDESEA_StorageTaskServices/Task/Partial/Dt_TaskService.cs
@@ -459,6 +459,10 @@
             else
             {
                 locations = await _locationRepository.QueryDataAsync(x => x.LocationStatus == (int)LocationEnum.Distribute && x.RoadwayNo == requestTask.Roadways && x.EnalbeStatus == 1 && x.LocationType == 1);
+                if (locations == null)
+                {
+                    locations = await _locationRepository.QueryDataAsync(x => x.LocationStatus == (int)LocationEnum.Free && x.RoadwayNo == requestTask.Roadways && x.EnalbeStatus == 1 && x.LocationType == 1);
+                }
             }
 
             if (locations == null)
@@ -974,11 +978,10 @@
         WebResponseContent content = new WebResponseContent();
         try
         {
-
             //LogFactory.GetLog("甯告俯3鍑哄簱鑷冲寘瑁�").Info(true, $"甯告俯3鍑哄簱鑷冲寘瑁呬紶鍏ュ弬鏁帮細" + JsonConvert.SerializeObject(json, Formatting.Indented));
 
             Dt_StationManager station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == json.Position && x.stationType == 12 && x.stationArea == "Call");
-            if(station == null) { throw new Exception($"鏈壘鍒板寘瑁呯珯鍙颁俊鎭紝璇锋鏌ヤ紶鍏ュ弬鏁皗json.Position}"); }
+            if (station == null) { throw new Exception($"鏈壘鍒板寘瑁呯珯鍙颁俊鎭紝璇锋鏌ヤ紶鍏ュ弬鏁皗json.Position}"); }
 
             //LogFactory.GetLog("甯告俯3鍑哄簱鑷冲寘瑁�").Info(true, $"甯告俯3鍑哄簱鑷冲寘瑁呬紶鍏ュ弬鏁帮細" + JsonConvert.SerializeObject(json, Formatting.Indented));
             var stockInfo = _stockInfoRepository.Db.Queryable<DtStockInfo>()

--
Gitblit v1.9.3