修改无人机的状态判断
This commit is contained in:
parent
5e9111e879
commit
a5e51849d9
|
|
@ -153,22 +153,21 @@ public class TuohengBufferDeviceImpl implements IBufferDeviceService {
|
||||||
dto.setAircraftManufacturer(device.getDeviceManufacturer());
|
dto.setAircraftManufacturer(device.getDeviceManufacturer());
|
||||||
|
|
||||||
// 查询无人机关联的机场,获取机场SN(用于从MachineStateManager获取状态)
|
// 查询无人机关联的机场,获取机场SN(用于从MachineStateManager获取状态)
|
||||||
// String dockSn = null;
|
String dockSn = null;
|
||||||
// List<DockAircraft> dockAircrafts = dockAircraftDomain.selectDockAircraftByAircraftId(aircraftId);
|
List<DockAircraft> dockAircrafts = dockAircraftDomain.selectDockAircraftByAircraftId(aircraftId);
|
||||||
// if (!CollectionUtils.isEmpty(dockAircrafts)) {
|
if (!CollectionUtils.isEmpty(dockAircrafts)) {
|
||||||
// DockAircraft dockAircraft = dockAircrafts.get(0);
|
DockAircraft dockAircraft = dockAircrafts.get(0);
|
||||||
// Dock dock = dockDomain.selectDockByDockId(dockAircraft.getDockId());
|
Dock dock = dockDomain.selectDockByDockId(dockAircraft.getDockId());
|
||||||
// if (dock != null) {
|
if (dock != null) {
|
||||||
// Device dockDevice = deviceDomain.selectDeviceByDeviceId(dock.getDeviceId());
|
Device dockDevice = deviceDomain.selectDeviceByDeviceId(dock.getDeviceId());
|
||||||
// if (dockDevice != null) {
|
if (dockDevice != null) {
|
||||||
// dockSn = dockDevice.getDeviceSn();
|
dockSn = dockDevice.getDeviceSn();
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
// 获取ThingsBoard数据并填充到DTO(传入机场SN用于获取状态)
|
// 获取ThingsBoard数据并填充到DTO(传入机场SN用于获取状态)
|
||||||
// 这边的SN号是通用的
|
fillTuohengAircraftDetail(dto, device.getIotDeviceId(), dockSn);
|
||||||
fillTuohengAircraftDetail(dto, device.getIotDeviceId(), device.getDeviceSn());
|
|
||||||
|
|
||||||
return dto;
|
return dto;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue