| | |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using WIDESEAWCS_Common.TaskEnum; |
| | | using WIDESEAWCS_Core; |
| | | using WIDESEAWCS_Core.Enums; |
| | | using WIDESEAWCS_Core.Helper; |
| | | using WIDESEAWCS_IBasicInfoRepository; |
| | | using WIDESEAWCS_ITaskInfoRepository; |
| | | using WIDESEAWCS_ITaskInfoService; |
| | |
| | | |
| | | namespace WIDESEAWCS_Tasks |
| | | { |
| | | /// <summary> |
| | | /// 油墨ä»å åæº |
| | | /// </summary> |
| | | [DisallowConcurrentExecution] |
| | | public class StackerCraneJob_YM : JobBase, IJob |
| | | { |
| | |
| | | if (sendFlag) |
| | | { |
| | | commonStackerCrane.LastTaskType = task.TaskType; |
| | | _taskService.UpdateTaskStatusToNext(task.TaskNum); |
| | | int oldState = task.TaskState; |
| | | if (task.TaskType.GetTaskTypeGroup() == TaskTypeGroup.InboundGroup) |
| | | { |
| | | task.TaskState = TaskInStatusEnum.SC_InExecuting.ObjToInt(); |
| | | } |
| | | else |
| | | { |
| | | task.TaskState = TaskOutStatusEnum.SC_OutExecuting.ObjToInt(); |
| | | } |
| | | _taskRepository.UpdateData(task); |
| | | _taskExecuteDetailService.AddTaskExecuteDetail(task.TaskId, $"ç³»ç»èªå¨æµç¨ï¼ä»»å¡ç¶æä»ã{oldState}ã转å°ã{task.TaskState}ã"); |
| | | } |
| | | } |
| | | } |
| | |
| | | CommonStackerCrane? commonStackerCrane = sender as CommonStackerCrane; |
| | | if (commonStackerCrane != null) |
| | | { |
| | | WriteInfo(commonStackerCrane.DeviceName, $"读åå°ä»»å¡å®æä¿¡å·,{e.TaskNum}"); |
| | | if (commonStackerCrane.GetValue<StackerCraneDBName, short>(StackerCraneDBName.WorkType) != 5) |
| | | { |
| | | Console.Out.WriteLine("TaskCompleted" + e.TaskNum); |
| | | _taskService.StackCraneTaskCompleted(e.TaskNum); |
| | | Dt_Task task = _taskRepository.QueryFirst(x => x.TaskNum == e.TaskNum); |
| | | if (task != null) |
| | | { |
| | | |
| | | } |
| | | else |
| | | { |
| | | WriteInfo(commonStackerCrane.DeviceName, $"读åå°ä»»å¡å®æä¿¡å·,æªæ¾å°å¯¹åºçä»»å¡ä¿¡æ¯,{e.TaskNum}"); |
| | | } |
| | | commonStackerCrane.SetValue(StackerCraneDBName.WorkType, 5); |
| | | } |
| | | } |