From fcfafddcbe3748beda400e1ecd21d329b2a25c81 Mon Sep 17 00:00:00 2001
From: 肖洋 <cathay_xy@163.com>
Date: 星期五, 13 十二月 2024 09:52:26 +0800
Subject: [PATCH] 添加定时任务处理高温库存出库逻辑

---
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs |   20 ++++++++++++++++++--
 1 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
index c1b02d2..a202a11 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
@@ -272,9 +272,25 @@
                 ConsoleHelper.WriteWarningLine($"銆恵conveyorLine._deviceName}銆戜换鍔″彿锛氥�恵command.TaskNum}銆�,鎵樼洏鏉$爜锛氥�恵command.Barcode}銆戝凡鍒拌揪銆恵childDeviceCode}銆戣緭閫佺嚎鍏ュ簱瀹屾垚,涓嬩竴鐩爣鍦板潃銆愮瓑寰呭垎閰嶈揣浣嶃��");
                 ConveyorLineSendFinish(conveyorLine, childDeviceCode, ProtocalDetailValue, true);
 
-                WebResponseContent content = _taskService.UpdateTaskStatusToNext(task);
+                if (task.TaskType == (int)TaskInboundTypeEnum.InNG)
+                {
+                    int nextStatus = task.TaskState.GetNextNotCompletedStatus<TaskInStatusEnum>();
 
-                Console.Out.WriteLine(content.Serialize());
+                    var station = _stationManagerRepository.QueryFirst(x => x.stationChildCode == task.SourceAddress);
+                    task.CurrentAddress = station.stationLocation;
+                    task.NextAddress = station.stationNGLocation;
+                    task.TargetAddress = task.NextAddress;
+                    task.TaskState = nextStatus; 
+                    task.ModifyDate = DateTime.Now;
+                    task.Modifier = "System";
+                    _taskRepository.UpdateData(task);
+                }
+                else
+                {
+                    WebResponseContent content = _taskService.UpdateTaskStatusToNext(task);
+                    Console.Out.WriteLine(content.ToJsonString());
+                }
+
             }
         }
 

--
Gitblit v1.9.3