| | |
| | | using System.Reflection; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Common; |
| | | using WIDESEAWCS_Common.LocationEnum; |
| | | using WIDESEAWCS_Common.TaskEnum; |
| | | using WIDESEAWCS_Communicator; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_IBasicInfoService; |
| | | using WIDESEAWCS_ITaskInfoService; |
| | | using WIDESEAWCS_Model.Models; |
| | | using WIDESEAWCS_QuartzJob; |
| | | using WIDESEAWCS_QuartzJob.DeviceBase; |
| | | using WIDESEAWCS_QuartzJob.DTO; |
| | | using WIDESEAWCS_QuartzJob.StackerCrane.Enum; |
| | | using WIDESEAWCS_TaskInfoService; |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | | [DisallowConcurrentExecution] |
| | | public class TestJob : JobBase, IJob |
| | | public partial class TestJob : JobBase, IJob |
| | | { |
| | | private readonly ITaskService _taskService; |
| | | public TestJob(ITaskService taskService) |
| | | private readonly IStationMangerService _stationMangerService; |
| | | public TestJob(ITaskService taskService, IStationMangerService stationMangerService) |
| | | { |
| | | _taskService = taskService;//注å
¥ |
| | | _stationMangerService = stationMangerService; |
| | | } |
| | | |
| | | public Task Execute(IJobExecutionContext context) |
| | |
| | | if (flag && value != null) |
| | | { |
| | | OtherDevice device = (OtherDevice)value; |
| | | //Example |
| | | //device.GetValue 读å |
| | | //device.SetValue åå
¥ |
| | | // _taskService.Repository ä»å¨å±ï¼è¿è¡æ°æ®åºè®¿é®- |
| | | try |
| | | { |
| | | //Example |
| | | //device.GetValue 读å |
| | | //device.SetValue åå
¥ |
| | | // _taskService.Repository ä»å¨å±ï¼è¿è¡æ°æ®åºè®¿é® |
| | | SXCTasks(device); |
| | | |
| | | WriteInfo(device.DeviceName, "infoLog"); |
| | | KHTasks(device); |
| | | |
| | | WriteDebug(device.DeviceName, "debugLog"); |
| | | |
| | | //WriteInfo(device.DeviceName, "infoLog"); |
| | | |
| | | //WriteDebug(device.DeviceName, "debugLog"); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | { |
| | | WriteError(nameof(TestJob), "åæ°é误,æªä¼ é设å¤åæ°æè®¾å¤ç±»åé误"); |
| | | } |
| | | |
| | | |
| | | return Task.CompletedTask; |
| | | } |
| | | } |