From ea0628889f64f802768c4fdf17d2223424e5e29f Mon Sep 17 00:00:00 2001
From: hutongqing <hutongqing@hnkhzn.com>
Date: 星期三, 30 十月 2024 11:13:22 +0800
Subject: [PATCH] 1
---
WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs | 31 ++++++++++++++++---------------
1 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs b/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
index d46c554..b1f3bab 100644
--- a/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
+++ b/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs
@@ -36,7 +36,7 @@
namespace WIDESEAWCS_Tasks
{
[DisallowConcurrentExecution]
- public class CommonConveyorLineJob : IJob
+ public class CommonConveyorLineJob : JobBase, IJob
{
private readonly ITaskService _taskService;
private readonly ITaskExecuteDetailService _taskExecuteDetailService;
@@ -65,23 +65,23 @@
{
//Task task = Task.Run(() =>
//{
- ConveyorLineTaskCommand command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand>(childDeviceCode);
- if (command != null)
+ ConveyorLineTaskCommand command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand>(childDeviceCode);
+ if (command != null)
+ {
+ DeviceProtocolDetailDTO? deviceProtocolDetail = conveyorLine.DeviceProtocolDetailDTOs.FirstOrDefault(x => x.ProtocalDetailValue == command.InteractiveSignal.ToString() && x.DeviceProParamName == nameof(ConveyorLineTaskCommand.InteractiveSignal));
+ if (deviceProtocolDetail != null)
{
- DeviceProtocolDetailDTO? deviceProtocolDetail = conveyorLine.DeviceProtocolDetailDTOs.FirstOrDefault(x => x.ProtocalDetailValue == command.InteractiveSignal.ToString() && x.DeviceProParamName == nameof(ConveyorLineTaskCommand.InteractiveSignal));
- if (deviceProtocolDetail != null)
+ MethodInfo? method = GetType().GetMethod(deviceProtocolDetail.ProtocolDetailType);
+ if (method != null)
{
- MethodInfo? method = GetType().GetMethod(deviceProtocolDetail.ProtocolDetailType);
- if (method != null)
- {
- method.Invoke(this, new object[] { conveyorLine, command, childDeviceCode });
- }
- else
- {
- //todo 鏈壘鍒版柟娉曟椂
- }
+ method.Invoke(this, new object[] { conveyorLine, command, childDeviceCode });
+ }
+ else
+ {
+ //todo 鏈壘鍒版柟娉曟椂
}
}
+ }
//});
//tasks.Add(task);
}
@@ -96,6 +96,7 @@
}
finally
{
+ WriteDebug("CommonConveyorLineJob", "test");
//Console.Out.WriteLine(DateTime.Now);
}
return Task.CompletedTask;
@@ -107,7 +108,7 @@
/// <param name="conveyorLine">杈撻�佺嚎瀹炰緥瀵硅薄</param>
/// <param name="command">璇诲彇鐨勮姹備俊鎭�</param>
/// <param name="childDeviceCode">瀛愯澶囩紪鍙�</param>
- public void RequestInbound(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command,string childDeviceCode)
+ public void RequestInbound(CommonConveyorLine conveyorLine, ConveyorLineTaskCommand command, string childDeviceCode)
{
if (_taskService.RequestWMSTask(command.Barcode, childDeviceCode).Status)
{
--
Gitblit v1.9.3