| | |
| | | using WIDESEAWCS_DTO.TaskInfo; |
| | | using WIDESEAWCS_Core.Caches; |
| | | using AutoMapper; |
| | | using WIDESEAWCS_Tasks.PPä»; |
| | | using HslCommunication.WebSocket; |
| | | using WIDESEAWCS_Tasks.å¹²èä»; |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | |
| | | private readonly ITaskService _taskService; |
| | | private readonly ITaskExecuteDetailService _taskExecuteDetailService; |
| | | private readonly ITaskRepository _taskRepository; |
| | | public static PPReadData pPReadData = new PPReadData(); |
| | | private readonly IRouterService _routerService; |
| | | private readonly IStationMangerRepository _stationMangerRepository; |
| | | private List<Dt_ApiInfo> apiInfos; |
| | | private WebSocketServer _webSocketServer; |
| | | |
| | | public StackerCraneJob_PP(IMapper mapper, ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IStationMangerRepository stationMangerRepository, ICacheService cacheService) |
| | | public StackerCraneJob_PP(IMapper mapper, ITaskService taskService, ITaskExecuteDetailService taskExecuteDetailService, ITaskRepository taskRepository, IRouterService routerService, IStationMangerRepository stationMangerRepository, ICacheService cacheService,WebSocketServer webSocketServer) |
| | | { |
| | | _taskService = taskService; |
| | | _taskExecuteDetailService = taskExecuteDetailService; |
| | |
| | | _stationMangerRepository = stationMangerRepository; |
| | | _cacheService = cacheService; |
| | | _mapper=mapper; |
| | | _webSocketServer = webSocketServer; |
| | | |
| | | string? apiInfoStr = _cacheService.Get("apiInfos"); |
| | | if (!string.IsNullOrEmpty(apiInfoStr)) |
| | |
| | | } |
| | | } |
| | | } |
| | | pPReadData.R_PP_Status = ((short)commonStackerCrane.StackerCraneStatusValue); |
| | | pPReadData.R_PP_AutoStatus = ((short)commonStackerCrane.StackerCraneAutoStatusValue); |
| | | pPReadData.R_PP_WorkStatus = ((short)commonStackerCrane.StackerCraneWorkStatusValue); |
| | | pPReadData.R_PP_TaskNum = commonStackerCrane.CurrentTaskNum.ObjToInt(); |
| | | pPReadData.R_PP_WorkType = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType); |
| | | pPReadData.R_PP_TrayType = commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.TrayType); |
| | | string pPData = JsonConvert.SerializeObject(pPReadData); |
| | | _webSocketServer.PublishAllClientPayload(pPData); |
| | | } |
| | | } |
| | | catch (Exception ex) |