Browse Source

Merge branch 'develop' of gitadmin/tuoheng_telecomumale into release

tags/v1.3.1
wanjing 1 year ago
parent
commit
9fdfa99498
2 changed files with 6 additions and 7 deletions
  1. +2
    -2
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/dto/AirportDto.java
  2. +4
    -5
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/tzhl/service/fly/log/FlyLogBySuccessService.java

+ 2
- 2
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/dto/AirportDto.java View File

/** /**
* 无人机推流视频 * 无人机推流视频
*/ */
private String uvaPushUrl;
private String uavPushUrl;


/** /**
* 无人机播放视频 * 无人机播放视频
*/ */
private String uvaPlayUrl;
private String uavPlayUrl;


/** /**
* 方舱外推流视频 * 方舱外推流视频

+ 4
- 5
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/tzhl/service/fly/log/FlyLogBySuccessService.java View File

private IDspService dspService; private IDspService dspService;


public void getFlyLog(Inspection inspection, TZHLFlyLogResponse flyLogResponse) { 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()) { if (InspectionStatusEnum.IN_FLIGHT.getCode() == inspection.getStatus()) {
log.info("获取飞行日志,该任务状态已经改是飞行中,inspectionid={}", inspection.getId()); log.info("获取飞行日志,该任务状态已经改是飞行中,inspectionid={}", inspection.getId());
return; return;
} }
log.info("获取飞行日志,status=success,title={}", flyLogResponse.getTitle());
inspection.setStatus(InspectionStatusEnum.IN_FLIGHT.getCode()); inspection.setStatus(InspectionStatusEnum.IN_FLIGHT.getCode());
inspection.setUpdateUser(""); inspection.setUpdateUser("");
inspection.setUpdateTime(DateUtils.now()); inspection.setUpdateTime(DateUtils.now());
inspectionMapper.updateStatus(inspection); 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()); AirportDto airportDto = tzhlGetAirportListService.getAirport(inspection.getAirportId());
if (ObjectUtil.isEmpty(airportDto)) { if (ObjectUtil.isEmpty(airportDto)) {
return; return;
} }


if (StringUtils.isEmpty(airportDto.getUvaPushUrl())) {
if (StringUtils.isEmpty(airportDto.getUavPushUrl())) {
log.info("获取飞行日志,获取推流地址为空,inspectionId={}", inspection.getId()); log.info("获取飞行日志,获取推流地址为空,inspectionId={}", inspection.getId());
return; return;
} }


// 通知DSP // 通知DSP
JsonResult result = dspService.startAI(inspection, airportDto.getUvaPushUrl(), airportDto.getUvaPushUrl());
JsonResult result = dspService.startAI(inspection, airportDto.getUavPushUrl(), airportDto.getUavPushUrl());
if (0 != result.getCode()) { if (0 != result.getCode()) {
log.info("获取飞行日志,获取推流地址,通知DSP失败"); log.info("获取飞行日志,获取推流地址,通知DSP失败");
inspection.setStatus(InspectionStatusEnum.FLIGHT_FAILED.getCode()); inspection.setStatus(InspectionStatusEnum.FLIGHT_FAILED.getCode());

Loading…
Cancel
Save