| | |
| | | private Dt_Task? GetTask(SpeStackerCrane speStackerCrane) |
| | | { |
| | | Dt_Task? task; |
| | | string DeviceCode = speStackerCrane.DeviceCode.Contains("CP") ? "CP" : "FL"; |
| | | if (speStackerCrane.LastTaskType == null) |
| | | { |
| | | task = _taskService.QueryStackerCraneTask(speStackerCrane.DeviceCode); |
| | | task = _taskService.QueryStackerCraneTask(DeviceCode); |
| | | } |
| | | else |
| | | { |
| | | if (speStackerCrane.LastTaskType == TaskTypeEnum.Relocation.ObjToInt()) |
| | | { |
| | | task = _taskService.QueryStackerCraneTask(DeviceCode); |
| | | if (task != null) return task; |
| | | } |
| | | bool flag = speStackerCrane.LastTaskType == TaskTypeEnum.Inbound.ObjToInt() || speStackerCrane.LastTaskType == TaskTypeEnum.PalletInbound.ObjToInt(); |
| | | if (flag == false) |
| | | { |