| | |
| | | ArrayList<NyShuttleHttpCommand> commands = new ArrayList<>(); |
| | | |
| | | //计算起点到目标点命令 |
| | | NyShuttleOperaResult result = getStartToTargetCommands(shuttleNo, wrkNo, startPoint, targetPoint); |
| | | NyShuttleOperaResult result = getStartToTargetCommands(shuttleNo, wrkNo, startPoint, targetPoint, NavigationMapType.DFX.id); |
| | | if (result == null) { |
| | | //计算结果必须不为空,否则计算失败 |
| | | return null; |
| | |
| | | |
| | | if (!startPoint.equals(middlePoint)) {//起点和中间点不一致,需要计算起点到中间点路径 |
| | | //计算起点到中间点命令 |
| | | NyShuttleOperaResult result1 = getStartToTargetCommands(shuttleNo, wrkNo, startPoint, middlePoint); |
| | | NyShuttleOperaResult result1 = getStartToTargetCommands(shuttleNo, wrkNo, startPoint, middlePoint, NavigationMapType.NORMAL.id); |
| | | if (result1 == null) { |
| | | //计算结果必须不为空,否则计算失败 |
| | | return null; |
| | |
| | | } |
| | | |
| | | //计算中间点到目标点命令 |
| | | NyShuttleOperaResult result2 = getStartToTargetCommands(shuttleNo, wrkNo, middlePoint, targetPoint); |
| | | NyShuttleOperaResult result2 = getStartToTargetCommands(shuttleNo, wrkNo, middlePoint, targetPoint, NavigationMapType.DFX.id); |
| | | if (result2 == null) { |
| | | //计算结果必须不为空,否则计算失败 |
| | | return null; |
| | |
| | | /** |
| | | * 获取起点到目标点行走命令 |
| | | */ |
| | | public static NyShuttleOperaResult getStartToTargetCommands(Integer shuttleNo, Integer wrkNo, String startPoint, String targetPoint) { |
| | | public static NyShuttleOperaResult getStartToTargetCommands(Integer shuttleNo, Integer wrkNo, String startPoint, String targetPoint, Integer mapType) { |
| | | //计算起点到目标点行走节点 |
| | | List<NavigateNode> calc = NavigateUtils.calc(startPoint, targetPoint, NavigationMapType.NORMAL.id, Utils.getShuttlePoints(shuttleNo, Utils.getLev(startPoint))); |
| | | List<NavigateNode> calc = NavigateUtils.calc(startPoint, targetPoint, mapType, Utils.getShuttlePoints(shuttleNo, Utils.getLev(startPoint))); |
| | | if (calc == null) { |
| | | return null; |
| | | } |