| | |
| | | |
| | | //移动命令,锁定路径 |
| | | if (command.getMode() == ShuttleCommandModeType.MOVE.id) { |
| | | TrafficControlThread trafficControlThread = (TrafficControlThread) SlaveConnection.get(SlaveType.TrafficControl, 1); |
| | | if (trafficControlThread == null) { |
| | | return false; |
| | | } |
| | | |
| | | List<NavigateNode> nodes = JSON.parseArray(JSON.toJSONString(command.getNodes()), NavigateNode.class); |
| | | //申请管制 |
| | | boolean apply = applyTrafficControl(commands, nodes, shuttleNo, taskNo); |
| | |
| | | if (!result) { |
| | | News.error("{} device can't lock path!", shuttleNo); |
| | | shuttleThread.offerSystemMsg("{} device can't lock path!", shuttleNo); |
| | | trafficControlThread.trafficReportError(shuttleNo, taskNo); |
| | | return false;//路径锁定失败 |
| | | } |
| | | } |
| | |
| | | return false; |
| | | } |
| | | if (targetPoints.contains(Utils.getRow(currentLocNo) + "-" + Utils.getBay(currentLocNo))) { |
| | | command.setComplete(true); |
| | | boolean result = navigateMapUtils.writeNavigateNodeToRedisMap(Utils.getLev(shuttleProtocol.getCurrentLocNo()), shuttleProtocol.getShuttleNo(), nodes, false);//解锁路径 |
| | | if (!result) { |
| | | return false;//解锁失败 |
| | | } |
| | | command.setComplete(true); |
| | | }else { |
| | | return false; |
| | | } |