|
|
@ -111,14 +111,16 @@ public class SDKWaylineService extends AbstractWaylineService { |
|
|
|
.completedTime(LocalDateTime.now()) |
|
|
|
.mediaCount(output.getExt().getMediaCount()) |
|
|
|
.build(); |
|
|
|
Optional<OsdDockDrone> deviceOsd = deviceRedisService.getDeviceOsd(deviceOpt.get().getChildDeviceSn(), OsdDockDrone.class); |
|
|
|
Integer totalFlightSorties = deviceOsd.get().getTotalFlightSorties(); |
|
|
|
Float totalFlightTime = deviceOsd.get().getTotalFlightTime(); |
|
|
|
DeviceFlightRecordsEntity deviceFlightRecords = new DeviceFlightRecordsEntity(); |
|
|
|
deviceFlightRecords.setDeviceSn(response.getGateway()); |
|
|
|
deviceFlightRecords.setFlyCount(totalFlightSorties); |
|
|
|
deviceFlightRecords.setFlyAccTime(totalFlightTime.intValue()); |
|
|
|
deviceFlightRecordsService.saveDeviceFlight(deviceFlightRecords); |
|
|
|
//Optional<OsdDockDrone> deviceOsd = deviceRedisService.getDeviceOsd(deviceOpt.get().getChildDeviceSn(), OsdDockDrone.class);
|
|
|
|
|
|
|
|
// Integer totalFlightSorties = deviceOsd.get().getTotalFlightSorties();
|
|
|
|
// Float totalFlightTime = deviceOsd.get().getTotalFlightTime();
|
|
|
|
// DeviceFlightRecordsEntity deviceFlightRecords = new DeviceFlightRecordsEntity();
|
|
|
|
// deviceFlightRecords.setDeviceSn(response.getGateway());
|
|
|
|
// deviceFlightRecords.setFlyCount(totalFlightSorties);
|
|
|
|
// deviceFlightRecords.setFlyAccTime(totalFlightTime.intValue());
|
|
|
|
// deviceFlightRecordsService.saveDeviceFlight(deviceFlightRecords);
|
|
|
|
|
|
|
|
// record the update of the media count.
|
|
|
|
if (Objects.nonNull(job.getMediaCount()) && job.getMediaCount() != 0) { |
|
|
|
mediaRedisService.setMediaCount(response.getGateway(), job.getJobId(), |
|
|
|