From 14c2d309afcc77c8f0873977d46a5c7af2e67c7f Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期四, 23 四月 2026 16:48:25 +0800
Subject: [PATCH] Merge branch 'dev' into xiaoyang

---
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService/TaskService.Query.cs |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService/TaskService.Query.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService/TaskService.Query.cs
index ef54770..a633f79 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService/TaskService.Query.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService/TaskService.Query.cs
@@ -34,6 +34,21 @@
     }
 
     /// <summary>
+    /// 鏌ヨ鏄惁鏈夋鍦ㄦ墽琛岀殑鍘诲線鎸囧畾 TargetAddress 鐨勮緭閫佺嚎浠诲姟
+    /// </summary>
+    /// <param name="roadway">宸烽亾鍙�</param>
+    /// <param name="targetAddress">鐩爣鍦板潃</param>
+    /// <returns>瀛樺湪杩斿洖 true</returns>
+    public bool HasExecutingTaskToTarget(string roadway, string targetAddress)
+    {
+        return BaseDal.QueryFirst(x =>
+            x.Roadway == roadway &&
+            x.TargetAddress == targetAddress &&
+            x.TaskStatus == (int)TaskOutStatusEnum.Line_OutExecuting,
+            TaskOrderBy) != null;
+    }
+
+    /// <summary>
     /// 鏍规嵁浠诲姟鍙枫�佸綋鍓嶅湴鍧�鏌ヨ杈撻�佺嚎瀹屾垚鐨勪换鍔�
     /// </summary>
     /// <param name="taskNum">浠诲姟鍙�</param>
@@ -149,7 +164,7 @@
     public Dt_Task QueryManualInboundTask(string sourceAddress)
     {
         return BaseDal.QueryFirst(x =>
-            x.TaskType == (int)TaskInboundTypeEnum.Inbound &&
+            (x.TaskType == (int)TaskInboundTypeEnum.Inbound || x.TaskType == (int)TaskInboundTypeEnum.InEmpty) &&
             x.TaskStatus == (int)TaskInStatusEnum.InNew &&
             x.SourceAddress == sourceAddress);
     }

--
Gitblit v1.9.3