| | |
| | | |
| | | for (NavigateNode node : sectionNodes) { |
| | | HashMap<String, Object> map = new HashMap<>(); |
| | | map.put("nodexX", node.getX()); |
| | | map.put("nodexY", node.getY()); |
| | | map.put("nodexZ", node.getZ()); |
| | | map.put("nodeX", node.getX()); |
| | | map.put("nodeY", node.getY()); |
| | | map.put("nodeZ", node.getZ()); |
| | | if (flag) { |
| | | map.put("oper", oper); |
| | | flag = false; |
| | |
| | | param.put("messageName", "runRoute"); |
| | | param.put("msgTime", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); |
| | | param.put("deviceNo", device.getDeviceNo()); |
| | | param.put("taskId", taskNo); |
| | | param.put("taskId", generateDeviceTaskNo(taskNo)); |
| | | param.put("nodeNum", nodes.size()); |
| | | param.put("modes", modes); |
| | | String response = new HttpHandler.Builder() |
| | |
| | | } |
| | | |
| | | @Override |
| | | public int generateDeviceTaskNo(int taskNo) { |
| | | int no = taskNo % 255; |
| | | if (no <= 1) { |
| | | no = 2; |
| | | } |
| | | return no; |
| | | } |
| | | |
| | | @Override |
| | | public ShuttleCommand getMoveCommand(Integer taskNo, String startCodeNum, String distCodeNum, Integer allDistance, Integer runDirection, Integer runSpeed) { |
| | | HashMap<String, Object> body = new HashMap<>(); |
| | | body.put("messageName", "runOrder"); |
| | | body.put("msgTime", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date())); |
| | | body.put("deviceNo", Integer.parseInt(this.device.getDeviceNo())); |
| | | body.put("taskId", taskNo); |
| | | body.put("taskId", generateDeviceTaskNo(taskNo)); |
| | | |
| | | LocService locService = SpringUtils.getBean(LocService.class); |
| | | Loc loc = locService.getOne(new LambdaQueryWrapper<Loc>() |