添加运行时长的数据
This commit is contained in:
parent
fcd6628923
commit
8dabee82ac
|
|
@ -156,6 +156,18 @@ public class BufferDeviceImpl implements IBufferDeviceService
|
|||
telemetryMap.get(DeviceTelemetry.Alternate_land_point_Latitude)
|
||||
.ifPresent(telemetryValue -> dto.setBackupLatitude(telemetryValue.getValue()));
|
||||
|
||||
// 从 acc_time 获取运行时间,转换为天为单位
|
||||
// acc_time 单位是秒,需要转换为天:秒 / (60 * 60 * 24)
|
||||
telemetryMap.get(DeviceTelemetry.Acc_Time)
|
||||
.ifPresent(telemetryValue -> {
|
||||
Integer seconds = telemetryValue.getValue();
|
||||
if (seconds != null) {
|
||||
// 将秒转换为天
|
||||
Integer days = seconds / (60 * 60 * 24);
|
||||
dto.setRunningDuration(days);
|
||||
}
|
||||
});
|
||||
|
||||
return dto;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue