From f679f58dba34055bd579a603762c13fbe1650c9b Mon Sep 17 00:00:00 2001
From: Admin <Admin@ADMIN>
Date: 星期一, 23 三月 2026 13:14:20 +0800
Subject: [PATCH] 最新
---
项目代码/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 53 insertions(+), 6 deletions(-)
diff --git "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs" "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs"
index 817830d..57b2a03 100644
--- "a/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs"
+++ "b/\351\241\271\347\233\256\344\273\243\347\240\201/WIDESEAWCS_Server/WIDESEAWCS_Tasks/ConveyorLineJob/CommonConveyorLineJob.cs"
@@ -1,6 +1,6 @@
锘�/*#region << 鐗� 鏈� 娉� 閲� >>
-*//*----------------------------------------------------------------
- * 鍛藉悕绌洪棿锛歐IDESEAWCS_Tasks.ConveyorLineJob
+----------------------------------------------------------------
+ *鍛藉悕绌洪棿锛歐IDESEAWCS_Tasks.ConveyorLineJob
* 鍒涘缓鑰咃細鑳$搴�
* 鍒涘缓鏃堕棿锛�2024/8/2 16:13:36
* 鐗堟湰锛歏1.0.0
@@ -12,8 +12,8 @@
* 鐗堟湰锛歏1.0.1
* 淇敼璇存槑锛�
*
- *----------------------------------------------------------------*//*
-#endregion << 鐗� 鏈� 娉� 閲� >>
+ *----------------------------------------------------------------
+#endregion << 鐗� 鏈� 娉� 閲� >>*/
using AutoMapper;
using Newtonsoft.Json;
@@ -36,8 +36,10 @@
using WIDESEAWCS_Communicator;
using WIDESEAWCS_Core;
using WIDESEAWCS_Core.Helper;
+using WIDESEAWCS_ISystemServices;
using WIDESEAWCS_ITaskInfoService;
using WIDESEAWCS_Model.Models;
+using WIDESEAWCS_Model.Models.System;
using WIDESEAWCS_QuartzJob;
using WIDESEAWCS_QuartzJob.DeviceBase;
using WIDESEAWCS_QuartzJob.DTO;
@@ -56,19 +58,64 @@
private readonly ITaskExecuteDetailService _taskExecuteDetailService;
private readonly IRouterService _routerService;
private readonly IMapper _mapper;
+ private readonly IDt_PlatformStationService _PlatformStationService;
- public CommonConveyorLineJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IMapper mapper)
+ public CommonConveyorLineJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IMapper mapper, IDt_PlatformStationService dt_PlatformStation)
{
_taskService = taskService;
_taskExecuteDetailService = taskExecuteDetailService;
_routerService = routerService;
_mapper = mapper;
+ _PlatformStationService = dt_PlatformStation;
}
public Task Execute(IJobExecutionContext context)
{
+ Console.Out.WriteLine(DateTime.Now);
+ try
+ {
+ CommonConveyorLine conveyorLine = (CommonConveyorLine)context.JobDetail.JobDataMap.Get("JobParams");
+ if (conveyorLine != null)
+ {
+
+ /*List<Dt_PlatformStation> childDeviceCodes = _PlatformStationService.getStatiomList(conveyorLine.DeviceCode);
+ foreach (Dt_PlatformStation childDeviceCode in childDeviceCodes)
+ {
+ ConveyorLineTaskCommand command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand>(childDeviceCode.Station_code);
+ if (command != 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)
+ {
+ method.Invoke(this, new object[] { conveyorLine, command, childDeviceCode });
+ }
+ else
+ {
+ //todo 鏈壘鍒版柟娉曟椂
+ }
+ }
+ }
+ //});
+ //tasks.Add(task);
+ }*/
+ }
+
+ }
+ catch (Exception ex)
+ {
+ Console.Out.WriteLine(nameof(CommonConveyorLineJob) + ":" + ex.ToString());
+ }
+ finally
+ {
+ Console.Out.WriteLine(DateTime.Now);
+ }
return Task.CompletedTask;
}
+
+
+
}
}
-*/
\ No newline at end of file
--
Gitblit v1.9.3