| | |
| | | using WIDESEAWCS_Tasks.StackerCraneJob; |
| | | using WIDESEAWCS_Tasks; |
| | | using WIDESEAWCS_Core; |
| | | using SqlSugar.Extensions; |
| | | using WIDESEAWCS_Tasks.ConveyorLineJob; |
| | | using WIDESEAWCS_QuartzJob.Repository; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using HslCommunication.WebSocket; |
| | | using WIDESEAWCS_DTO.Equipment; |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | |
| | | private readonly IRouterService _routerService; |
| | | private readonly IRouterRepository _routerRepository; |
| | | private readonly IStationMangerRepository _stationMangerRepository; |
| | | private WebSocketServer _webSocketServer; |
| | | |
| | | public StackerCraneJob_YLSC3(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository) |
| | | public StackerCraneJob_YLSC3(ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IStationMangerRepository stationMangerRepository, IRouterRepository routerRepository,WebSocketServer webSocketServer) |
| | | { |
| | | _taskService = taskService; |
| | | _taskExecuteDetailService = taskExecuteDetailService; |
| | |
| | | _routerService = routerService; |
| | | _stationMangerRepository = stationMangerRepository; |
| | | _routerRepository = routerRepository; |
| | | _webSocketServer = webSocketServer; |
| | | } |
| | | |
| | | public Task Execute(IJobExecutionContext context) |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | #region 璋冪敤浜嬩欢鎬荤嚎閫氱煡鍓嶇 |
| | | |
| | | EquipmentDTO equipmentDTO = new EquipmentDTO(); |
| | | object obj = new |
| | | { |
| | | commonStackerCrane.DeviceName, |
| | | commonStackerCrane.DeviceCode, |
| | | StackerCraneAutoStatus.Automatic, |
| | | StackerCraneStatus.Normal, |
| | | StackerCraneWorkStatus.Standby, |
| | | TaskNum = commonStackerCrane.CurrentTaskNum, |
| | | WorkType = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType), |
| | | StackerAlarm = commonStackerCrane.Communicator.Read<short>("DB1000.54.0"), |
| | | }; |
| | | equipmentDTO.StackerDataJson = obj.Serialize(); |
| | | _webSocketServer.PublishAllClientPayload(equipmentDTO.Serialize()); |
| | | |
| | | #endregion |
| | | } |
| | | } |
| | | catch (Exception ex) |