| | |
| | | //当前二维码 |
| | | shuttleProtocol.setCurrentCode(data.getString("groundCode") == null ? "0" : data.getString("groundCode")); |
| | | //电池电量 |
| | | shuttleProtocol.setBatteryPower(data.getString("battery") == null ? "0%" : data.getString("battery")); |
| | | shuttleProtocol.setBatteryPower(data.getString("battery") == null ? "0" : data.getString("battery")); |
| | | //故障 |
| | | shuttleProtocol.setErrorCode(deviceStatus == 6 ? "1" : "0"); |
| | | |
| | |
| | | if (shuttleService == null) { |
| | | return false; |
| | | } |
| | | BasShuttle basShuttle = shuttleService.getById(this.device.getDeviceNo()); |
| | | BasShuttle basShuttle = shuttleService.getOne(new LambdaQueryWrapper<BasShuttle>().eq(BasShuttle::getDeviceId, this.device.getId())); |
| | | if (basShuttle == null) { |
| | | return false; |
| | | } |
| | |
| | | } |
| | | |
| | | @Override |
| | | public boolean requestWaiting() { |
| | | if (this.shuttleProtocol.getProtocolStatusType().equals(ShuttleProtocolStatusType.IDLE)) { |
| | | this.shuttleProtocol.setProtocolStatus(ShuttleProtocolStatusType.WAITING); |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | @Override |
| | | public ShuttleCommand getMoveCommand(Integer taskNo, String startCodeNum, String distCodeNum, Integer allDistance, Integer runDirection, Integer runSpeed, List<NavigateNode> nodes) { |
| | | HashMap<String, Object> body = new HashMap<>(); |
| | | body.put("messageName", "runOrder"); |