@@ -36,6 +36,11 @@ public class LiveChannel extends BaseEntity { | |||
*/ | |||
private String name; | |||
/** | |||
* 无人机直播视频原地址 | |||
*/ | |||
private String playUrl; | |||
/** | |||
*无人机推流地址 | |||
*/ |
@@ -12,18 +12,7 @@ public class LiveChannelVo { | |||
/** | |||
* 直播地址 | |||
*/ | |||
private String aipullUrl; | |||
/** | |||
* 直播地址 | |||
*/ | |||
private String pullUrl; | |||
/** | |||
* AI识别后视频地址 | |||
*/ | |||
private String aiVideoUrl; | |||
private String playUrl; | |||
/** | |||
* 回放视频地址 |
@@ -12,7 +12,7 @@ public class VideoUrlVo { | |||
/** | |||
* 直播视频url | |||
*/ | |||
private String pullUrl; | |||
private String playUrl; | |||
/** | |||
* 机场外部监控地址 |
@@ -9,7 +9,7 @@ public enum QueryVideoServiceEnum { | |||
QUERY_IS_FAILED(1230700, "获取数据失败"), | |||
INSPECTION_ID_IS_NULL(1230701, "任务id为空"), | |||
LIVE_CHANNEL_IS_NOT_EXIST(1230702, "直播通道为空"), | |||
PULL_URL_IS_NULL(1230703, "直播地址为空"), | |||
PLAY_URL_IS_NULL(1230703, "直播地址为空"), | |||
VIDEO_URL_IS_NULL(1230704, "回放地址为空"), | |||
DRONE_ID_IS_NULL(1230705, "无人机id为空"), | |||
INSPECTION_IS_NOT_EXIST(1230706, "任务不存在"); |
@@ -10,6 +10,7 @@ import com.tuoheng.admin.entity.domain.User; | |||
import com.tuoheng.admin.entity.vo.airport.AirPortStatusVO; | |||
import com.tuoheng.admin.entity.vo.inspection.InspectionScrollbarVo; | |||
import com.tuoheng.admin.enums.InspectionStatusEnum; | |||
import com.tuoheng.admin.enums.InspectionTypeEnum; | |||
import com.tuoheng.admin.enums.MarkEnum; | |||
import com.tuoheng.admin.mapper.InspectionMapper; | |||
import com.tuoheng.admin.utils.CurrentUserUtil; | |||
@@ -49,6 +50,7 @@ public class QueryInspectionAndAirportStatusService { | |||
List<Inspection> inspectionList = inspectionMapper.selectList(Wrappers.<Inspection>lambdaQuery() | |||
.eq(Inspection::getTenantId, tenantId) | |||
.eq(Inspection::getMark, MarkEnum.VALID.getCode()) | |||
.notIn(Inspection::getInspectionType, InspectionTypeEnum.MABNNEDFLIGHT.getCode()) | |||
.in(Inspection::getStatus, InspectionStatusEnum.IN_FLIGHT.getCode(), InspectionStatusEnum.PREPARING.getCode())); | |||
if(CollectionUtils.isEmpty(inspectionList) || inspectionList.size() == 0){ | |||
log.info("任务列表为空"); |
@@ -71,11 +71,13 @@ public class QueryVideoService { | |||
if (ObjectUtil.isNull(liveChannel)) { | |||
return JsonResult.error(QueryVideoServiceEnum.LIVE_CHANNEL_IS_NOT_EXIST.getCode(), QueryVideoServiceEnum.LIVE_CHANNEL_IS_NOT_EXIST.getMsg()); | |||
} | |||
if (StringUtils.isEmpty(liveChannel.getPullUrl())) { | |||
return JsonResult.error(QueryVideoServiceEnum.PULL_URL_IS_NULL.getCode(), QueryVideoServiceEnum.PULL_URL_IS_NULL.getMsg()); | |||
if (StringUtils.isEmpty(liveChannel.getPlayUrl())) { | |||
return JsonResult.error(QueryVideoServiceEnum.PLAY_URL_IS_NULL.getCode(), QueryVideoServiceEnum.PLAY_URL_IS_NULL.getMsg()); | |||
} | |||
liveChannelVo.setAipullUrl(liveChannel.getAipullUrl()); | |||
liveChannelVo.setPullUrl(liveChannel.getPullUrl()); | |||
if(StringUtils.isNotEmpty(liveChannel.getPlayUrl())){ | |||
liveChannelVo.setPlayUrl(liveChannel.getPlayUrl()); | |||
} | |||
} | |||
if (15 == inspection.getStatus()) { | |||
@@ -84,7 +86,6 @@ public class QueryVideoService { | |||
return JsonResult.error(QueryVideoServiceEnum.VIDEO_URL_IS_NULL.getCode(), QueryVideoServiceEnum.VIDEO_URL_IS_NULL.getMsg()); | |||
} | |||
liveChannelVo.setVideoUrl(CommonConfig.videoURL + inspection.getVideoUrl()); | |||
liveChannelVo.setAiVideoUrl(CommonConfig.videoURL + inspection.getAiVideoUrl()); | |||
} | |||
return JsonResult.success(liveChannelVo); | |||
} | |||
@@ -117,8 +118,8 @@ public class QueryVideoService { | |||
.eq(LiveChannel::getInspectionId, inspection.getId()) | |||
.eq(LiveChannel::getStatus, 1)); | |||
if (ObjectUtil.isNotNull(liveChannel)) { | |||
if (StringUtils.isNotEmpty(liveChannel.getPullUrl())) { | |||
vo.setPullUrl(liveChannel.getPullUrl()); | |||
if (StringUtils.isNotEmpty(liveChannel.getPlayUrl())) { | |||
vo.setPlayUrl(liveChannel.getPullUrl()); | |||
} | |||
} | |||
//获取机场内外部视频 |
@@ -49,7 +49,8 @@ public class GetLiveStatusService { | |||
if (liveChannelDto == null || org.apache.commons.lang3.StringUtils.isEmpty(liveChannelDto.getCode()) | |||
|| liveChannelDto.getStatus() == null | |||
|| org.apache.commons.lang3.StringUtils.isEmpty(liveChannelDto.getPushUrl()) | |||
|| org.apache.commons.lang3.StringUtils.isEmpty(liveChannelDto.getPullUrl())) { | |||
|| org.apache.commons.lang3.StringUtils.isEmpty(liveChannelDto.getPullUrl()) | |||
|| org.apache.commons.lang3.StringUtils.isEmpty(liveChannelDto.getPullM3u8())) { | |||
log.error("获取通道状态信息不完整!"); | |||
throw new ServiceException(HttpStatus.BAD_REQUEST.value(), "获取通道状态信息不完整!"); | |||
} |
@@ -116,6 +116,12 @@ public class OnlineIdentifService { | |||
map3.put("ename", "pull_url"); | |||
map3.put("evalue", dto.getPullUrl()); | |||
reqMapList.add(map3); | |||
Map<String,Object> playUrlMap = new HashMap<>(); | |||
playUrlMap.put("ename","play_url"); | |||
playUrlMap.put("evalue",dto.getPullM3u8()); | |||
reqMapList.add(playUrlMap); | |||
paramMap.put("serviceInstReqList", reqMapList); | |||
log.info(String.format("DSP入参:%s", paramMap)); | |||
@@ -146,6 +152,7 @@ public class OnlineIdentifService { | |||
// 修改通道名 | |||
liveChannel.setName(dto.getName()); | |||
liveChannel.setTenantId(inspection.getTenantId()); | |||
liveChannel.setPlayUrl(dspCallbackVo.getPlayUrl()); | |||
liveChannel.setPushUrl(dspCallbackVo.getPushUrl()); | |||
liveChannel.setPullUrl(dspCallbackVo.getPlayUrl()); | |||
liveChannel.setAipushUrl(dspCallbackVo.getAipushUrl()); |