This commit is contained in:
孙小云 2026-01-31 11:51:16 +08:00
parent ff3fbce1f3
commit 5797fa6c76
1 changed files with 7 additions and 6 deletions

View File

@ -213,12 +213,13 @@ public class BufferDeviceImpl implements IBufferDeviceService
// 飞行时长 - total_flight_time 获取秒数并转换为天
telemetryMap.get(DeviceTelemetry.Total_Flight_Time)
.ifPresent(telemetryValue -> {
Integer seconds = telemetryValue.getValue();
if (seconds != null) {
// 将秒转换为天 / (60 * 60 * 24)
Integer days = seconds / (60 * 60 * 24);
dto.setFlightDuration(days);
}
dto.setFlightDuration(telemetryValue.getValue());
// Integer seconds = telemetryValue.getValue();
// if (seconds != null) {
// // 将秒转换为天 / (60 * 60 * 24)
// Integer days = seconds / (60 * 60 * 24);
// dto.setFlightDuration(days);
// }
});
return dto;