From b691bff6fc5b24e56e1587e0cecfad58396fc061 Mon Sep 17 00:00:00 2001
From: 肖洋 <cathay_xy@163.com>
Date: 星期二, 26 十一月 2024 17:57:10 +0800
Subject: [PATCH] 改了一堆,忘记改了些啥了
---
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs | 16 +++++++++++-----
1 files changed, 11 insertions(+), 5 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 246cca2..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,14 +227,14 @@
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;
}
else
{
- taskCommand.TargetAddress = 0;
+ taskCommand.TargetAddress = 1000;
}
conveyorLine.SendCommand(taskCommand, childDeviceCode);
@@ -269,7 +275,7 @@
taskOutboundTypeEnum = TaskOutboundTypeEnum.OutTray;
else
taskOutboundTypeEnum = TaskOutboundTypeEnum.Outbound;
- await CheckAndCreateTask(taskOutboundTypeEnum, childDeviceCode, index, platform.Stacker.Split(',')[0], platform.Stacker.Split(',').ToList());
+ await CheckAndCreateTask(taskOutboundTypeEnum, childDeviceCode, index, platform.Stacker);
}
catch (Exception)
{
--
Gitblit v1.9.3