| | |
| | | task = _taskService.QueryShuttleCarTask(shuttleCar.DeviceCode); |
| | | if (task != null) |
| | | { |
| | | if (task.TaskType == (int)TaskOutboundTypeEnum.Outbound && !task.SourceIsPickPlace) |
| | | if (_taskService.TaskOutboundTypes.Contains(task.TaskType) && !task.SourceIsPickPlace) |
| | | { |
| | | var ShuttleCar = _shuttleCarService.QueryShuttleCar(task.SourceAddress);//鍑哄簱浠诲姟鍒ゆ柇璧风偣鏄惁鏈夌┛姊溅 |
| | | if (ShuttleCar != null) SendTask(task); |
| | | else _taskService.AddRelocationCarTask("", task.SourceAddress); |
| | | if (ShuttleCar == null) _taskService.AddRelocationCarTask("", task.SourceAddress); |
| | | else |
| | | { |
| | | task.ShuttleCarCode = ShuttleCar.ShuttleCarCode; |
| | | SendTask(task); |
| | | } |
| | | } |
| | | else |
| | | SendTask(task); |
| | |
| | | // shuttleCarTaskCommand.TaskType = (short)GetCarTaskType(task.TaskType, shuttleCarTaskCommand.Direction); |
| | | } |
| | | } |
| | | else if (task.TaskType == (int)TaskOtherTypeEnum.RelocationCarCharging) |
| | | { |
| | | shuttleCarTaskCommand.TaskType = (short)GetCarTaskType(ShuttleCarTaskType.Charging.ToString()); |
| | | } |
| | | else |
| | | shuttleCarTaskCommand.TaskType = (short)GetCarTaskType(task.TaskType, shuttleCarTaskCommand.Direction); |
| | | //shuttleCarTaskCommand.TaskType = string.IsNullOrEmpty(task.Remark) ? (short)GetCarTaskType(task.TaskType, shuttleCarTaskCommand.Direction) : (short)GetCarTaskType(task.Remark); |
| | |
| | | switch (TaskType) |
| | | { |
| | | case (int)TaskInboundTypeEnum.Inbound: |
| | | case (int)TaskInboundTypeEnum.PalletInbound: |
| | | state = (int)TaskInStatusEnum.Car_InExecuting; |
| | | break; |
| | | case (int)TaskOutboundTypeEnum.Outbound: |
| | | case (int)TaskOutboundTypeEnum.PalletOutbound: |
| | | state = (int)TaskOutStatusEnum.Car_OutExecuting; |
| | | break; |
| | | case (int)TaskOtherTypeEnum.RelocationCar: |
| | | state = (int)TaskCarStatusEnum.ShuttleCar_Executing; |
| | | break; |
| | | case (int)TaskOtherTypeEnum.RelocationCarCharging: |
| | | state = (int)CarChargingTaskEnum.ShuttleCar_Charging; |
| | | break; |
| | | default: |
| | | break; |
| | | } |