From a07e4702be045efa9b04b49a561463875dd28e0a Mon Sep 17 00:00:00 2001
From: 肖洋 <cathay_xy@163.com>
Date: 星期六, 04 一月 2025 16:18:33 +0800
Subject: [PATCH] 更新配置文件和事件总线逻辑,修复任务处理逻辑

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

diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
index 9ba2a5b..0bcc2a8 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/TaskService.cs
@@ -25,6 +25,7 @@
 using WIDESEAWCS_QuartzJob.Models;
 using WIDESEAWCS_QuartzJob.Repository;
 using WIDESEAWCS_QuartzJob.Service;
+using WIDESEAWCS_TaskInfoRepository;
 
 namespace WIDESEAWCS_TaskInfoService
 {
@@ -227,8 +228,7 @@
                     _Task.TaskState = (int)TaskInStatusEnum.InNew;
                     _Task.CurrentAddress = task.SourceAddress;
                     _Task.NextAddress = station.stationNGChildCode;
-                    _Task.TargetAddress = station.stationNGLocation;
-                    _Task.Roadway = station.Roadway;
+                    _Task.TargetAddress = task.TargetAddress;
 
                     BaseDal.AddData(_Task);
                     _taskExecuteDetailService.AddTaskExecuteDetail(_Task.TaskNum, "鎺ユ敹WMS浠诲姟");
@@ -504,6 +504,14 @@
                         BaseDal.DeleteData(task);
                         _taskHtyRepository.AddData(task_Hty);
                     }
+
+
+                    if (task.TaskState == (int)TaskOutStatusEnum.SC_OutFinish)
+                    {
+                        content = StackCraneTaskCompleted(task.TaskNum);
+                        return content;
+                    }
+
                 }
                 else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)
                 {
@@ -554,6 +562,13 @@
                     }
                     else if (task.TaskState == (int)TaskInStatusEnum.SC_InFinish)
                     {
+                        if (App.User.UserId > 0)
+                        {
+                            content = StackCraneTaskCompleted(task.TaskNum);
+                            return content;
+                        }
+
+
                         task.ModifyDate = DateTime.Now;
                         task.Modifier = "System";
 

--
Gitblit v1.9.3