From 663d9d2e658ab99a0c3598becd23b00b34b3e3d9 Mon Sep 17 00:00:00 2001
From: 肖洋 <cathay_xy@163.com>
Date: 星期五, 29 十一月 2024 13:55:22 +0800
Subject: [PATCH] 高常温逻辑

---
 Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 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 cf0c290..e15cb25 100644
--- a/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
+++ b/Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
@@ -4,6 +4,8 @@
 using Quartz;
 using SqlSugar;
 using System.Reflection;
+using WIDESEAWCS_BasicInfoRepository;
+using WIDESEAWCS_BasicInfoService;
 using WIDESEAWCS_Common;
 using WIDESEAWCS_Common.TaskEnum;
 using WIDESEAWCS_Core;
@@ -32,8 +34,10 @@
         private readonly IPlatFormRepository _platFormRepository;
         private readonly ISys_ConfigService _sys_ConfigService;
         private readonly IMapper _mapper;
+        private readonly IDt_StationManagerService _stationManagerService;
+        private readonly IDt_StationManagerRepository _stationManagerRepository;
 
-        public CommonConveyorLineJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IMapper mapper, ITaskRepository taskRepository, IPlatFormRepository platFormRepository, ISys_ConfigService sys_ConfigService)
+        public CommonConveyorLineJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IMapper mapper, ITaskRepository taskRepository, IPlatFormRepository platFormRepository, ISys_ConfigService sys_ConfigService, IDt_StationManagerService stationManagerService, IDt_StationManagerRepository stationManagerRepository)
         {
             _taskService = taskService;
             _taskExecuteDetailService = taskExecuteDetailService;
@@ -42,6 +46,8 @@
             _taskRepository = taskRepository;
             _platFormRepository = platFormRepository;
             _sys_ConfigService = sys_ConfigService;
+            _stationManagerService = stationManagerService;
+            _stationManagerRepository = stationManagerRepository;
         }
 
         public async Task Execute(IJobExecutionContext context)
@@ -156,7 +162,7 @@
                 var task = _taskService.QueryBarCodeConveyorLineTask(command.Barcode, childDeviceCode);
                 HandleTaskOut(conveyorLine, command, childDeviceCode, ProtocalDetailValue, task);
 
-                if (task == null && command.Barcode != "NoRead")
+                if (task == null && command.Barcode != "NoRead" && command.Barcode.IsNotEmptyOrNull())
                 {
                     HandleNewTask(conveyorLine, command, childDeviceCode, ProtocalDetailValue);
                 }
@@ -221,7 +227,7 @@
                 WebResponseContent content = new WebResponseContent();
                 ConveyorLineTaskCommand taskCommand = _mapper.Map<ConveyorLineTaskCommand>(task);
                 taskCommand.InteractiveSignal = command.InteractiveSignal;
-                if (task.PalletCode != command.Barcode)
+                if (task.PalletCode != command.Barcode || task.Remark != null)
                 {
                     var NGAddress = _platFormRepository.QueryFirst(x => x.PlatCode == task.TargetAddress).Capacity;
                     taskCommand.TargetAddress = NGAddress;

--
Gitblit v1.9.3