From 0c75581f4f388a0d3e221aa04b3ccf0fd10c9cf5 Mon Sep 17 00:00:00 2001
From: 刘磊 <1161824510@qq.com>
Date: 星期二, 26 十一月 2024 10:05:15 +0800
Subject: [PATCH] 1
---
Code Management/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 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..1cf58a8 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);
}
@@ -228,7 +234,7 @@
}
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