This commit is contained in:
parent
e3f58244be
commit
80f22702b1
|
|
@ -62,8 +62,11 @@ public class DockController extends BaseController
|
|||
@GetMapping("/detail/{dockId}")
|
||||
public R<DockDetailVO> getDockDetail(@PathVariable("dockId") Long dockId)
|
||||
{
|
||||
|
||||
DockDetailDTO dockDetailDTO = bufferDeviceService.getDockDetailById(dockId);
|
||||
if (dockDetailDTO == null) {
|
||||
return R.fail("机场不存在: dockId=" + dockId);
|
||||
}
|
||||
|
||||
DockDetailVO result = new DockDetailVO();
|
||||
BeanUtils.copyProperties(dockDetailDTO, result);
|
||||
return R.ok(result);
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@ public class BufferDeviceImpl implements IBufferDeviceService
|
|||
.ifPresent(telemetryValue -> {
|
||||
var batteryData = telemetryValue.getValue();
|
||||
if (batteryData != null && !CollectionUtils.isEmpty(batteryData.getBatteries())) {
|
||||
log.info("batteries {}",JSON.toJSONString(batteryData));
|
||||
// log.info("batteries {}",JSON.toJSONString(batteryData));
|
||||
String batterySn = batteryData.getBatteries().get(0).getSn();
|
||||
dto.setVoltage(batteryData.getBatteries().get(0).getVoltage());
|
||||
dto.setBatteryLevel(batteryData.getBatteries().get(0).getCapacityPercent());
|
||||
|
|
@ -341,7 +341,7 @@ public class BufferDeviceImpl implements IBufferDeviceService
|
|||
attributeMap.get(DeviceAttributes.Latitude)
|
||||
.ifPresentOrElse(
|
||||
latitude -> {
|
||||
log.info("获取到纬度数据: {}", latitude);
|
||||
// log.info("获取到纬度数据: {}", latitude);
|
||||
dto.setLatitude(latitude);
|
||||
},
|
||||
() -> log.warn("未获取到纬度数据,dockerDeviceIotId: {}", dockerDeviceIotId)
|
||||
|
|
|
|||
Loading…
Reference in New Issue