| | |
| | | Dt_Task taskOld = BaseDal.QueryFirst(x => x.PalletCode == containerFlowDTO.ContainerCode); |
| | | if (taskOld !=null && taskOld.PalletCode == containerFlowDTO.ContainerCode && taskOld.TaskType == TaskTypeEnum.Inbound.ObjToInt() && taskOld.TaskState == TaskStatusEnum.CL_Executing.ObjToInt() && taskOld.DeviceCode == deviceCode) |
| | | { |
| | | Thread.Sleep(500); |
| | | return content.OK(); |
| | | } |
| | | if (taskOld != null && taskOld.PalletCode == containerFlowDTO.ContainerCode && taskOld.TaskType == TaskTypeEnum.Inbound.ObjToInt() && taskOld.TaskState == TaskStatusEnum.CL_Executing.ObjToInt() && taskOld.DeviceCode != deviceCode) |
| | |
| | | _taskExecuteDetailService.AddTaskExecuteDetail(new List<int>() { taskOld.TaskNum }, $"{oldSlotCode}æ¢è³{containerFlowDTO.SlotCode}å
¥åº"); |
| | | return content.OK(); |
| | | } |
| | | else if(taskOld != null) |
| | | else if (taskOld != null) |
| | | { |
| | | throw new Exception($"æç®±å·{containerFlowDTO.ContainerCode}" + (taskOld.TaskType == TaskTypeEnum.Inbound.ObjToInt() ? "å
¥åºAGVæ§è¡ä¸": "åºåºAGVæ§è¡ä¸")); |
| | | throw new Exception($"æç®±å·{containerFlowDTO.ContainerCode}" + (taskOld.TaskType == TaskTypeEnum.Inbound.ObjToInt() ? "å
¥åºAGVæ§è¡ä¸" : "åºåºAGVæ§è¡ä¸")); |
| | | } |
| | | Dt_LocationInfo? noInLocation = locationInfos.FirstOrDefault(x => x.LocationStatus == LocationStatusEnum.Free.ObjToInt() && x.EnableStatus == EnableStatusEnum.Normal.ObjToInt()); |
| | | if (noInLocation == null) throw new Exception($"å¯ç¨è´§ä½ä¸è¶³!"); |
| | |
| | | task.TaskState = TaskStatusEnum.CL_Executing.ObjToInt(); |
| | | |
| | | //æ·»å ä»»å¡ |
| | | BaseDal.AddData(task); |
| | | int taskId = BaseDal.AddData(task); |
| | | if (type > 0) |
| | | { |
| | | _taskExecuteDetailService.AddTaskExecuteDetail(new List<int>() { task.TaskNum }, "æå¨æé®å
¥åº"); |