From 58a5a9af83492c5bbb4fba88b4443f08fa4becfc Mon Sep 17 00:00:00 2001
From: 刘磊 <1161824510@qq.com>
Date: 星期二, 17 十二月 2024 19:53:14 +0800
Subject: [PATCH] 解决冲突

---
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs |   14 ++++++++++++--
 1 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
index c22fd8a..3d3799d 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/StackerCraneJob/CommonStackerCraneJob.cs
@@ -11,6 +11,7 @@
 using WIDESEAWCS_Core.HttpContextUser;
 using WIDESEAWCS_DTO.MOM;
 using WIDESEAWCS_IProcessRepository;
+using WIDESEAWCS_ITaskInfo_HtyRepository;
 using WIDESEAWCS_ITaskInfoRepository;
 using WIDESEAWCS_ITaskInfoService;
 using WIDESEAWCS_Model;
@@ -37,8 +38,9 @@
         private readonly ICacheService _cacheService;
         private readonly INoticeService _noticeService;
         private readonly IDt_StationManagerRepository _stationManagerRepository;
+        private readonly ITask_HtyRepository _htyRepository;
 
-        public CommonStackerCraneJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IProcessRepository processRepository, ICacheService cacheService, INoticeService noticeService, IDt_StationManagerRepository stationManagerRepository)
+        public CommonStackerCraneJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IProcessRepository processRepository, ICacheService cacheService, INoticeService noticeService, IDt_StationManagerRepository stationManagerRepository, ITask_HtyRepository htyRepository)
         {
             _taskService = taskService;
             _taskExecuteDetailService = taskExecuteDetailService;
@@ -48,6 +50,7 @@
             _cacheService = cacheService;
             _noticeService = noticeService;
             _stationManagerRepository = stationManagerRepository;
+            _htyRepository = htyRepository;
         }
 
         public Task Execute(IJobExecutionContext context)
@@ -138,7 +141,8 @@
             CommonStackerCrane? commonStackerCrane = sender as CommonStackerCrane;
             if (commonStackerCrane != null)
             {
-                if (commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType) != 5)
+                //var x = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType);
+                //if (commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType) != 5)
                 {
                     //Console.Out.WriteLine("TaskCompleted" + e.TaskNum);
                     ConsoleHelper.WriteColorLine($"銆恵commonStackerCrane.DeviceName}銆戜换鍔″畬鎴�,浠诲姟鍙凤細銆恵e.TaskNum}銆�", ConsoleColor.Blue);
@@ -174,6 +178,12 @@
                         task = _taskRepository.QueryFirst(x => x.TaskNum == e.TaskNum);
                         Dt_Task? newTask = _taskService.UpdatePosition(task.TaskNum, task.CurrentAddress);
                     }
+                    if(task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.OutbondGroup && task.TargetAddress == "1359-4") 
+                    {
+                        var TASKHTY = task.Adapt<Dt_Task_Hty>();
+                        _taskRepository.DeleteData(task);
+                        _htyRepository.AddData(TASKHTY);
+                    }
                     commonStackerCrane.SetValue(StackerCraneDBName.WorkType, 5);
                 }
             }

--
Gitblit v1.9.3