From b9a99677050687f60ec304906ac1e3c1899ea63a Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期五, 18 七月 2025 16:05:53 +0800
Subject: [PATCH] 增强日志信息以包含任务号和托盘号

---
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs |   24 ++++++++++++++++++------
 1 files changed, 18 insertions(+), 6 deletions(-)

diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs
index 00395f2..15cf98b 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs
@@ -443,12 +443,24 @@
 
                 if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup)
                 {
-                    var stationinfo = _stationManagerRepository.QueryFirst(x => x.stationLocation == taskDTO.TargetAddress && x.Roadway == taskDTO.RoadWay);
-                    task.TaskState = (int)TaskOutStatusEnum.OutNew;
-                    task.CurrentAddress = taskDTO.RoadWay;
-                    task.NextAddress = stationinfo.stationChildCode;
-                    task.SourceAddress = taskDTO.SourceAddress;
-                    task.TargetAddress = taskDTO.TargetAddress;
+                    if (task.TaskType == (int)TaskOutboundTypeEnum.InToOut && taskDTO.RoadWay.Contains("CW"))
+                    {
+                        var stationinfo = _stationManagerRepository.QueryFirst(x => x.stationPLC == "1017" && x.stationType == 10 && x.Roadway == taskDTO.RoadWay);
+                        task.TaskState = (int)TaskOutStatusEnum.OutNew;
+                        task.CurrentAddress = taskDTO.SourceAddress;
+                        task.NextAddress = stationinfo.stationChildCode;
+                        task.SourceAddress = taskDTO.SourceAddress;
+                        task.TargetAddress = taskDTO.TargetAddress;
+                    }
+                    else
+                    {
+                        var stationinfo = _stationManagerRepository.QueryFirst(x => x.stationLocation == taskDTO.TargetAddress && x.Roadway == taskDTO.RoadWay);
+                        task.TaskState = (int)TaskOutStatusEnum.OutNew;
+                        task.CurrentAddress = taskDTO.RoadWay;
+                        task.NextAddress = stationinfo.stationChildCode;
+                        task.SourceAddress = taskDTO.SourceAddress;
+                        task.TargetAddress = taskDTO.TargetAddress;
+                    }   
                 }
                 else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)
                 {

--
Gitblit v1.9.3