| | |
| | | .eq(StringUtils.hasText(param.getWorkspaceId()), |
| | | DeviceEntity::getWorkspaceId, param.getWorkspaceId()) |
| | | .eq(param.getBoundStatus() != null, DeviceEntity::getBoundStatus, param.getBoundStatus()) |
| | | .eq(param.getReserveId() != null, DeviceEntity::getReserveId, param.getReserveId()) |
| | | .orderBy(param.isOrderBy(), |
| | | param.isAsc(), DeviceEntity::getId)) |
| | | .stream() |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<DeviceDTO> getDevicesTopoForWeb(String workspaceId) { |
| | | public List<DeviceDTO> getDevicesTopoForWeb(String workspaceId, String reserveId) { |
| | | List<DeviceDTO> devicesList = this.getDevicesByParams( |
| | | DeviceQueryParam.builder() |
| | | .workspaceId(workspaceId) |
| | | .reserveId(reserveId) |
| | | .domains(List.of(DeviceDomainEnum.GATEWAY.getVal(), DeviceDomainEnum.DOCK.getVal())) |
| | | .build()); |
| | | |
| | |
| | | waylineJobQueryParam.setDockSn(deviceDTO.getDeviceSn()); |
| | | WaylineJobEntity latestJob = waylineJobService.getLatestJob(workspaceId, waylineJobQueryParam); |
| | | deviceDTO.setLatestWaylineJob(latestJob); |
| | | deviceDTO.setOnlineStatus(true); |
| | | OsdDockReceiver osdDockReceiver = (OsdDockReceiver) RedisOpsUtils.get("osd:" + deviceDTO.getDeviceSn()); |
| | | deviceDTO.setLatitude(osdDockReceiver!=null? osdDockReceiver.getLatitude():null); |
| | | deviceDTO.setLongitude(osdDockReceiver!=null? osdDockReceiver.getLongitude():null); |
| | | }); |
| | | |
| | | return devicesList; |
| | |
| | | if (deviceOpt.isEmpty()) { |
| | | deviceOpt = this.getDeviceBySn(from); |
| | | if (deviceOpt.isEmpty()) { |
| | | log.error("Please restart the drone."); |
| | | log.error("请重新启动无人机."); |
| | | return; |
| | | } |
| | | |