Browse Source

取消负载控制验证

pull/6/head
吴远 3 months ago
parent
commit
7fdf677a8a
  1. 18
      dk-modules/sample/src/main/java/org/dromara/sample/wayline/service/impl/SDKWaylineService.java

18
dk-modules/sample/src/main/java/org/dromara/sample/wayline/service/impl/SDKWaylineService.java

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

Loading…
Cancel
Save