From b2feeabc23454a2c9e161aa3b26d0edf938e55bd Mon Sep 17 00:00:00 2001
From: huangxiaoqiang <huangxiaoqiang@hnkhzn.com>
Date: 星期二, 22 七月 2025 15:03:17 +0800
Subject: [PATCH] 增加超时设置,更新依赖注入和查询逻辑

---
 CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs |   20 ++++++++++++--------
 1 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs
index 306512f..453fc91 100644
--- a/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs
+++ b/CodeManagement/WCS/WIDESEAWCS_Server/WIDESEAWCS_TaskInfoService/Partial/TaskService.cs
@@ -7,6 +7,7 @@
 using WIDESEAWCS_Common.TaskEnum;
 using WIDESEAWCS_Core;
 using WIDESEAWCS_Core.Helper;
+using WIDESEAWCS_Core.LogHelper;
 using WIDESEAWCS_DTO.TaskInfo;
 using WIDESEAWCS_Model.Models;
 using WIDESEAWCS_QuartzJob.Models;
@@ -430,6 +431,15 @@
                             }
                         }
                     }
+                    else if (task.TaskType == (int)TaskOutboundTypeEnum.InToOut&& taskDTO.RoadWay.Contains("CW"))
+                    {
+                        var stationinfo = _stationManagerRepository.QueryFirst(x => x.stationPLC == "1006" && 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);
@@ -438,10 +448,6 @@
                         task.NextAddress = stationinfo.stationChildCode;
                         task.SourceAddress = taskDTO.SourceAddress;
                         task.TargetAddress = taskDTO.TargetAddress;
-                        //if (taskDTO.TaskType == (int)TaskOutboundTypeEnum.InToOut)
-                        //{
-                        //    task.TaskState = (int)TaskInStatusEnum.Line_InFinish;
-                        //}
                     }
                 }
                 else if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup)
@@ -656,12 +662,10 @@
             catch (Exception ex)
             {
                 content = WebResponseContent.Instance.Error($"浠诲姟瀹屾垚寮傚父,浠诲姟鍙�:銆恵taskNum}銆�");
+                QuartzLogger.WriteLogToFile($"Info_鍒嗗浠诲姟瀹屾垚", $"浠诲姟瀹屾垚寮傚父,浠诲姟鍙�:銆恵taskNum}銆戝紓甯镐俊鎭�恵ex.StackTrace}銆憑Environment.NewLine}{Environment.NewLine}");
             }
+            QuartzLogger.WriteLogToFile($"Info_鍒嗗浠诲姟瀹屾垚", $"浠诲姟瀹屾垚,浠诲姟鍙�:銆恵taskNum}銆戣繑鍥炲弬鏁般�恵JsonConvert.SerializeObject(content)}銆憑Environment.NewLine}{Environment.NewLine}");
             return content;
         }
-        //public override WebResponseContent DeleteData(Dt_Task entity)
-        //{
-        //    return base.DeleteData(entity);
-        //}
     }
 }
\ No newline at end of file

--
Gitblit v1.9.3