Selaa lähdekoodia

Merge branch 'develop' of gitadmin/tuoheng_air_monitor into release

pull/101/head
wanjing 8 kuukautta sitten
vanhempi
commit
cecfee70d1
1 muutettua tiedostoa jossa 11 lisäystä ja 13 poistoa
  1. +11
    -13
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryVideoService.java

+ 11
- 13
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryVideoService.java Näytä tiedosto

@@ -50,7 +50,6 @@ public class QueryVideoService {
@Autowired
private TenantMapper tenantMapper;


public JsonResult getVideoById(String id) {
if (StringUtils.isEmpty(id)) {
return JsonResult.error(QueryVideoServiceEnum.INSPECTION_ID_IS_NULL.getCode(), QueryVideoServiceEnum.INSPECTION_ID_IS_NULL.getMsg());
@@ -74,15 +73,13 @@ public class QueryVideoService {
if (StringUtils.isEmpty(liveChannel.getPlayUrl())) {
return JsonResult.error(QueryVideoServiceEnum.PLAY_URL_IS_NULL.getCode(), QueryVideoServiceEnum.PLAY_URL_IS_NULL.getMsg());
}
if(StringUtils.isNotEmpty(liveChannel.getPlayUrl())){
if (StringUtils.isNotEmpty(liveChannel.getPlayUrl())) {
liveChannelVo.setPlayUrl(liveChannel.getPlayUrl());
}


}
if (15 == inspection.getStatus()) {
//任务状态为任务飞行完成15视频回放
if (StringUtils.isEmpty(inspection.getAiVideoUrl())) {
if (StringUtils.isEmpty(inspection.getVideoUrl())) {
return JsonResult.success(QueryVideoServiceEnum.VIDEO_URL_IS_NULL.getCode(), QueryVideoServiceEnum.VIDEO_URL_IS_NULL.getMsg());
}
liveChannelVo.setVideoUrl(CommonConfig.videoURL + inspection.getVideoUrl());
@@ -92,6 +89,7 @@ public class QueryVideoService {

/**
* 根据任务id和无人机id获取直播和机场内外部视频
*
* @param inspectionId
* @param droneId
* @return
@@ -145,9 +143,9 @@ public class QueryVideoService {
String records = dataObject.get("records").toString();
List<Airport> airportList = JSONObject.parseArray(records, Airport.class);
//log.info("获取records中的数据为:airportList={}", airportList);
if(CollectionUtil.isNotEmpty(airportList) || airportList.size() != 0){
if (CollectionUtil.isNotEmpty(airportList) || airportList.size() != 0) {
Airport airport = airportList.get(0);
if(ObjectUtil.isNotNull(airport)){
if (ObjectUtil.isNotNull(airport)) {
vo.setInternalMonitorUrl(airport.getInternalMonitorUrl());
vo.setExternalMonitorUrl(airport.getExternalMonitorUrl());
vo.setFlvExternalMonitorUrl(airport.getFlvExternalMonitorUrl());
@@ -155,16 +153,16 @@ public class QueryVideoService {
}
}

return JsonResult.success(vo);
}
return JsonResult.success(vo);
}


private JsonResult check(String userId, String tenantId, String inspectionId, Integer droneId) {
if(StringUtils.isEmpty(inspectionId)){
return JsonResult.error(QueryVideoServiceEnum.INSPECTION_ID_IS_NULL.getCode(),QueryVideoServiceEnum.INSPECTION_ID_IS_NULL.getMsg());
if (StringUtils.isEmpty(inspectionId)) {
return JsonResult.error(QueryVideoServiceEnum.INSPECTION_ID_IS_NULL.getCode(), QueryVideoServiceEnum.INSPECTION_ID_IS_NULL.getMsg());
}
if(null == droneId){
return JsonResult.error(QueryVideoServiceEnum.DRONE_ID_IS_NULL.getCode(),QueryVideoServiceEnum.DRONE_ID_IS_NULL.getMsg());
if (null == droneId) {
return JsonResult.error(QueryVideoServiceEnum.DRONE_ID_IS_NULL.getCode(), QueryVideoServiceEnum.DRONE_ID_IS_NULL.getMsg());
}
return JsonResult.success();
}

Loading…
Peruuta
Tallenna