| | |
| | | } |
| | | |
| | | StationCommand command = stationThread.getCommand(StationCommandType.MOVE, taskNo, stationId, targetStationId, 0); |
| | | if (command == null) { |
| | | return R.error("生成输送命令失败,路径为空或不可达"); |
| | | } |
| | | MessageQueue.offer(SlaveType.Devp, devpNo, new Task(2, command)); |
| | | return R.ok(); |
| | | } |
| | |
| | | if (commandType == StationCommandType.MOVE) { |
| | | if (!stationId.equals(targetStationId)) { |
| | | List<Integer> path = calcPathStationIds(stationId, targetStationId); |
| | | if (path == null || path.isEmpty()) { |
| | | log.warn("输送线命令生成失败,路径为空,taskNo={}, stationId={}, targetStationId={}", |
| | | taskNo, stationId, targetStationId); |
| | | return null; |
| | | } |
| | | stationCommand.setNavigatePath(path); |
| | | } |
| | | } |
| | |
| | | liftTransferPath.add(stationNo); |
| | | } |
| | | } |
| | | if (path.isEmpty()) { |
| | | log.warn("输送线命令生成失败,路径为空,taskNo={}, stationId={}, targetStationId={}", |
| | | taskNo, stationId, targetStationId); |
| | | return null; |
| | | } |
| | | stationCommand.setNavigatePath(path); |
| | | stationCommand.setLiftTransferPath(liftTransferPath); |
| | | } |
| | |
| | | liftTransferPath.add(stationNo); |
| | | } |
| | | } |
| | | if (path.isEmpty()) { |
| | | log.warn("输送线命令生成失败,路径为空,taskNo={}, stationId={}, targetStationId={}", |
| | | taskNo, stationId, targetStationId); |
| | | return null; |
| | | } |
| | | stationCommand.setNavigatePath(path); |
| | | stationCommand.setLiftTransferPath(liftTransferPath); |
| | | } |