Pārlūkot izejas kodu

根据机场返航

tags/v1.2.0^2
chengwang pirms 1 gada
vecāks
revīzija
2d67485e46
3 mainītis faili ar 23 papildinājumiem un 12 dzēšanām
  1. +1
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/verify/AccidentVerifyService.java
  2. +21
    -12
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/GetDroneDataByIdService.java
  3. +1
    -0
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/PointFlightService.java

+ 1
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/accident/verify/AccidentVerifyService.java Parādīt failu

@@ -129,6 +129,7 @@ public class AccidentVerifyService {
inspection.setRoadName("");
inspection.setSectionId("");
inspection.setSectionName("");
inspection.setIsLive(1);
Integer count = inspectionMapper.insert(inspection);
if (count <= 0) {
log.info("创建应急任务失败");

+ 21
- 12
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/GetDroneDataByIdService.java Parādīt failu

@@ -71,18 +71,27 @@ public class GetDroneDataByIdService {
log.info("获取无人机数据信息,数据为空");
JsonResult.success("数据为空");
}
List<DroneDataVo> droneDataVoList = new ArrayList<>();
for (FlightData flightData : flightDataList) {
DroneDataVo droneDataVo = new DroneDataVo();
droneDataVo.setInspectionId(flightData.getInspectionId());
droneDataVo.setUavPower(79 + "%");
droneDataVo.setRange(6 + "km");
double dist = Integer.valueOf(flightData.getDistHome())/1000d;
droneDataVo.setTargetLocation(dist+ "km");
droneDataVo.setYsingal(flightData.getYsingal() + "%");
droneDataVoList.add(droneDataVo);
}
//取最新的一条数据给前端
FlightData flightData = flightDataList.get(0);
DroneDataVo droneDataVo = new DroneDataVo();
droneDataVo.setInspectionId(flightData.getInspectionId());
droneDataVo.setUavPower(79 + "%");
droneDataVo.setRange(6 + "km");
double dist = Integer.valueOf(flightData.getDistHome())/1000d;
droneDataVo.setTargetLocation(dist+ "km");
droneDataVo.setYsingal(flightData.getYsingal() + "%");
// List<DroneDataVo> droneDataVoList = new ArrayList<>();
// for (FlightData flightData2 : flightDataList) {
// DroneDataVo droneDataVo = new DroneDataVo();
// droneDataVo.setInspectionId(flightData.getInspectionId());
// droneDataVo.setUavPower(79 + "%");
// droneDataVo.setRange(6 + "km");
// double dist = Integer.valueOf(flightData.getDistHome())/1000d;
// droneDataVo.setTargetLocation(dist+ "km");
// droneDataVo.setYsingal(flightData.getYsingal() + "%");
// droneDataVoList.add(droneDataVo);
// }

return JsonResult.success(droneDataVoList);
return JsonResult.success(droneDataVo);
}
}

+ 1
- 0
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/third/airport/PointFlightService.java Parādīt failu

@@ -140,6 +140,7 @@ public class PointFlightService {
inspection.setCreateUser(user.getId());
inspection.setCreateTime(DateUtils.now());
inspection.setAccidentTask(1);
inspection.setIsLive(1);
int result = inspectionMapper.insert(inspection);
if(result<=0){
log.info("创建应急任务失败");

Notiek ielāde…
Atcelt
Saglabāt