添加运行时长的数据

This commit is contained in:
孙小云 2026-01-21 17:32:03 +08:00
parent fcd6628923
commit 8dabee82ac
1 changed files with 12 additions and 0 deletions

View File

@ -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;
}