| | |
| | | using SqlSugar.Extensions; |
| | | using WIDESEAWCS_Tasks.ConveyorLineJob; |
| | | using WIDESEAWCS_QuartzJob.Repository; |
| | | using WIDESEAWCS_QuartzJob.DTO; |
| | | using WIDESEAWCS_QuartzJob.StackerCrane; |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | |
| | | { |
| | | commonStackerCrane.StackerCraneTaskCompletedEventHandler += CommonStackerCrane_StackerCraneTaskCompletedEventHandler;//订é
ä»»å¡å®æäºä»¶ |
| | | } |
| | | commonStackerCrane.CheckStackerCraneTaskCompleted();//鲿¢ä»»å¡å®æäºä»¶çæµè¶
æ¶ï¼åæå¨è§¦å䏿¬¡ |
| | | if (commonStackerCrane.StackerCraneAutoStatusValue == StackerCraneAutoStatus.Automatic && commonStackerCrane.StackerCraneStatusValue == StackerCraneStatus.Normal && commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.Standby) |
| | | //commonStackerCrane.CheckStackerCraneTaskCompleted();//鲿¢ä»»å¡å®æäºä»¶çæµè¶
æ¶ï¼åæå¨è§¦å䏿¬¡ |
| | | //è·åå½åå åæºç¶æ |
| | | if (commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.WorkCompleted) |
| | | { |
| | | StackerCraneTaskCompletedEventArgs e = new StackerCraneTaskCompletedEventArgs(commonStackerCrane.CurrentTaskNum); |
| | | CommonStackerCrane_StackerCraneTaskCompletedEventHandler(commonStackerCrane, e); |
| | | } |
| | | else if (commonStackerCrane.StackerCraneAutoStatusValue == StackerCraneAutoStatus.Automatic && commonStackerCrane.StackerCraneStatusValue == StackerCraneStatus.Normal && commonStackerCrane.StackerCraneWorkStatusValue == StackerCraneWorkStatus.Standby)//夿ä¸å |
| | | { |
| | | short stackerError = commonStackerCrane.Communicator.Read<short>("DB1000.54.0"); |
| | | if (stackerError==0) |
| | |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void CommonStackerCrane_StackerCraneTaskCompletedEventHandler(object? sender, WIDESEAWCS_QuartzJob.StackerCrane.StackerCraneTaskCompletedEventArgs e) |
| | | private void CommonStackerCrane_StackerCraneTaskCompletedEventHandler(object? sender, StackerCraneTaskCompletedEventArgs e) |
| | | { |
| | | CommonStackerCrane? commonStackerCrane = sender as CommonStackerCrane; |
| | | if (commonStackerCrane != null) |
| | |
| | | _taskService.UpdateTaskExceptionMessage(taskNum, $"è¾é线åºåºç«ç¹æªé
ç½®,{task.NextAddress}"); |
| | | return WebResponseContent.Instance.Error($"è¾é线åºåºç«ç¹æªé
ç½®,{task.NextAddress}"); |
| | | } |
| | | Dt_Router router = _routerRepository.QueryFirst(x => x.InOutType == task.TaskType && x.StartPosi == stationManger.StationCode && x.ChildPosi == stationManger.StationDeviceCode); |
| | | bool depth = false; |
| | | if (task.Grade>0 && task.TaskType==TaskTypeEnum.PrintYLOutbound.ObjToInt()) |
| | | { |
| | | depth = true; |
| | | } |
| | | Dt_Router router = _routerRepository.QueryFirst(x => x.InOutType == task.TaskType && x.StartPosi == stationManger.StationCode && x.ChildPosi == stationManger.StationDeviceCode && (depth ? x.Depth == 2 : true)); |
| | | if (router == null) |
| | | { |
| | | _taskService.UpdateTaskExceptionMessage(taskNum, $"æªæ¾å°è·¯ç±ä¿¡æ¯,{task.NextAddress}"); |
| | |
| | | /// <returns></returns> |
| | | private Dt_Task? GetTask(CommonStackerCrane commonStackerCrane) |
| | | { |
| | | //夿æ¯å¦ææ£æ§è¡çä»»å¡ï¼å¦ææåä¸ä¸å |
| | | Dt_Task? taskOld = _taskRepository.QueryFirst(x => x.DeviceCode == commonStackerCrane.DeviceCode && x.Roadway == commonStackerCrane.DeviceCode && x.TaskState == TaskStatusEnum.SC_Executing.ObjToInt()); |
| | | if (taskOld != null) |
| | | { |
| | | return null; |
| | | } |
| | | |
| | | Dt_Task? task; |
| | | if (commonStackerCrane.LastTaskType == null) |
| | | { |