From 64a2aa2301946f777659239247233e47ad1e3076 Mon Sep 17 00:00:00 2001
From: wanshenmean <cathay_xy@163.com>
Date: 星期日, 12 四月 2026 11:54:15 +0800
Subject: [PATCH] feat(事务管理): 添加异步事务处理方法

---
 Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs |   34 ++++++++++++++++++++++++++++++++++
 1 files changed, 34 insertions(+), 0 deletions(-)

diff --git a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
index 02204d3..c6c5522 100644
--- a/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
+++ b/Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -644,6 +644,40 @@
         {
             return BaseDal.QueryFirst(x => x.TaskNum == taskNum);
         }
+
+        /// <summary>
+        /// 鎺ユ敹WMS鎵嬪姩鍒涘缓鐨勪换鍔★紝鍒涘缓WCS浠诲姟
+        /// </summary>
+        /// <param name="taskDTOs">WMS浠诲姟瀵硅薄闆嗗悎</param>
+        /// <returns>杩斿洖澶勭悊缁撴灉</returns>
+        public WebResponseContent ReceiveManualTask([NotNull] List<WMSTaskDTO> taskDTOs)
+        {
+            WebResponseContent content = new WebResponseContent();
+            try
+            {
+                // 璋冪敤 ReceiveWMSTask 鍒涘缓 WCS 浠诲姟
+                content = ReceiveWMSTask(taskDTOs);
+                return content;
+            }
+            catch (Exception ex)
+            {
+                content = WebResponseContent.Instance.Error($"鎵嬪姩浠诲姟鎺ユ敹閿欒,閿欒淇℃伅:{ex.Message}");
+                return content;
+            }
+        }
+
+        /// <summary>
+        /// 鏌ヨ鎸囧畾璧风偣鍦板潃鐨勬柊寤烘墜鍔ㄥ叆搴撲换鍔�
+        /// </summary>
+        /// <param name="sourceAddress">璧风偣鍦板潃</param>
+        /// <returns>浠诲姟瀹炰綋</returns>
+        public Dt_Task QueryManualInboundTask(string sourceAddress)
+        {
+            return BaseDal.QueryFirst(x =>
+                x.TaskType == (int)TaskInboundTypeEnum.Inbound &&
+                x.TaskStatus == (int)TaskInStatusEnum.InNew &&
+                x.SourceAddress == sourceAddress);
+        }
     }
 
     public enum ConveyorLineDBNameNew

--
Gitblit v1.9.3