| | |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | | [DisallowConcurrentExecution] |
| | | //[DisallowConcurrentExecution] |
| | | public partial class CommonConveyorLine_GWJob : JobBase, IJob |
| | | { |
| | | public readonly ITaskService _taskService; |
| | |
| | | private readonly IDeviceInfoRepository _deviceInfoRepository; |
| | | private static List<string>? userTokenIds; |
| | | private static List<int>? userIds; |
| | | private static List<string> childCodeList = new List<string>(); |
| | | |
| | | public CommonConveyorLine_GWJob(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, IRouterService routerService, IMapper mapper, ITaskRepository taskRepository, IPlatFormRepository platFormRepository, ISys_ConfigService sys_ConfigService, IDt_StationManagerRepository stationManagerRepository, ICacheService cacheService, INoticeService noticeService, IDt_needBarcodeRepository needBarcodeRepository, IDeviceInfoRepository deviceInfoRepository) |
| | | { |
| | |
| | | |
| | | List<string> childDeviceCodes = _routerService.QueryAllPositions(conveyorLine.DeviceCode); |
| | | foreach (string childDeviceCode in childDeviceCodes) |
| | | { |
| | | if (childCodeList.Contains(childDeviceCode)) |
| | | { |
| | | continue; |
| | | } |
| | | childCodeList.Add(childDeviceCode); |
| | | |
| | | lock (this) |
| | | { |
| | | ConveyorLineTaskCommand_After command = conveyorLine.ReadCustomer<ConveyorLineTaskCommand_After>(childDeviceCode); |
| | | |
| | |
| | | |
| | | #endregion 调用事件总线通知前端 |
| | | |
| | | |
| | | childCodeList.Remove(childDeviceCode); |
| | | } |
| | | } |
| | | |
| | | #endregion 路由方式 |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Console.Out.WriteLine(nameof(CommonConveyorLine_GWJob) + ":" + ex.ToString()); |
| | | Console.Out.WriteLine(nameof(CommonConveyorLine_GWJob) + ":" + DateTime.Now + ":" + ex.ToString()); |
| | | } |
| | | finally |
| | | { |