From 4e877317e999eb4f821db14e4d32801db16d1ac4 Mon Sep 17 00:00:00 2001
From: 肖洋 <cathay_xy@163.com>
Date: 星期一, 09 十二月 2024 10:19:48 +0800
Subject: [PATCH] 分容回流空托盘逻辑更改

---
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs
index 54b8336..a92dfca 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob_GW/GWTask/RequestInbound.cs
@@ -162,7 +162,7 @@
                 case 1:
                     if (stationManager.stationArea.Contains("GW"))
                     {
-                        var taskGW = _taskRepository.QueryFirst(x => x.TargetAddress == childDeviceCode && x.TaskState == (int)TaskOutStatusEnum.OutFinish);
+                        var taskGW = _taskRepository.QueryFirst(x => x.TargetAddress == childDeviceCode && (x.TaskState == (int)TaskOutStatusEnum.OutFinish|| x.TaskState == (int)TaskOutStatusEnum.OutPending));
                         if (taskGW != null)
                         {
                             command.ConveyorLineBarcode = taskGW.PalletCode;
@@ -281,7 +281,7 @@
         /// </summary>
         private async void RequestWmsTask(CommonConveyorLine_GW conveyorLine, ConveyorLineTaskCommand_After command, string childDeviceCode)
         {
-            var taskGW = _taskRepository.QueryFirst(x => x.TargetAddress == childDeviceCode && x.TaskState == (int)TaskOutStatusEnum.OutFinish);
+            var taskGW = _taskRepository.QueryFirst(x => x.TargetAddress == childDeviceCode && (x.TaskState == (int)TaskOutStatusEnum.OutFinish || x.TaskState == (int)TaskOutStatusEnum.OutPending));
             if (taskGW != null)
                 _taskRepository.DeleteData(taskGW);
             var content = await _taskService.RequestWMSTask(command.ConveyorLineBarcode, childDeviceCode);

--
Gitblit v1.9.3