|
|
@@ -29,18 +29,17 @@ public class FlyLogBySuccessService { |
|
|
|
private IDspService dspService; |
|
|
|
|
|
|
|
public void getFlyLog(Inspection inspection, TZHLFlyLogResponse flyLogResponse) { |
|
|
|
log.info("获取飞行日志,status=success,title={}", flyLogResponse.getTitle()); |
|
|
|
log.info("获取飞行日志,status=success,inspectionId={}, title={}", inspection.getId(), flyLogResponse.getTitle()); |
|
|
|
if (InspectionStatusEnum.IN_FLIGHT.getCode() == inspection.getStatus()) { |
|
|
|
log.info("获取飞行日志,该任务状态已经改是飞行中,inspectionid={}", inspection.getId()); |
|
|
|
return; |
|
|
|
} |
|
|
|
log.info("获取飞行日志,status=success,title={}", flyLogResponse.getTitle()); |
|
|
|
inspection.setStatus(InspectionStatusEnum.IN_FLIGHT.getCode()); |
|
|
|
inspection.setUpdateUser(""); |
|
|
|
inspection.setUpdateTime(DateUtils.now()); |
|
|
|
inspectionMapper.updateStatus(inspection); |
|
|
|
|
|
|
|
log.info("获取飞行日志,status=success,修改任务状态,status={}", inspection.getStatus()); |
|
|
|
log.info("获取飞行日志,status=success,修改任务状态,inspectionId={}, status={}", inspection.getId(), inspection.getStatus()); |
|
|
|
|
|
|
|
AirportDto airportDto = tzhlGetAirportListService.getAirport(inspection.getAirportId()); |
|
|
|
if (ObjectUtil.isEmpty(airportDto)) { |
|
|
@@ -48,13 +47,13 @@ public class FlyLogBySuccessService { |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
if (StringUtils.isEmpty(airportDto.getUvaPushUrl())) { |
|
|
|
if (StringUtils.isEmpty(airportDto.getUavPushUrl())) { |
|
|
|
log.info("获取飞行日志,获取推流地址为空,inspectionId={}", inspection.getId()); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// 通知DSP |
|
|
|
JsonResult result = dspService.startAI(inspection, airportDto.getUvaPushUrl(), airportDto.getUvaPushUrl()); |
|
|
|
JsonResult result = dspService.startAI(inspection, airportDto.getUavPushUrl(), airportDto.getUavPushUrl()); |
|
|
|
if (0 != result.getCode()) { |
|
|
|
log.info("获取飞行日志,获取推流地址,通知DSP失败"); |
|
|
|
inspection.setStatus(InspectionStatusEnum.FLIGHT_FAILED.getCode()); |