*/ | */ | ||||
private String aipullUrl; | private String aipullUrl; | ||||
/** | |||||
* 直播地址 | |||||
*/ | |||||
private String pullUrl; | |||||
/** | /** | ||||
* AI识别后视频地址 | * AI识别后视频地址 | ||||
*/ | */ | ||||
private String aiVideoUrl; | private String aiVideoUrl; | ||||
/** | |||||
* 回放视频地址 | |||||
*/ | |||||
private String videoUrl; | |||||
} | } |
/** | /** | ||||
* 直播视频url | * 直播视频url | ||||
*/ | */ | ||||
private String aipullUrl; | |||||
private String pullUrl; | |||||
/** | /** | ||||
* 机场外部监控地址 | * 机场外部监控地址 |
QUERY_IS_FAILED(1230700, "获取数据失败"), | QUERY_IS_FAILED(1230700, "获取数据失败"), | ||||
INSPECTION_ID_IS_NULL(1230701, "任务id为空"), | INSPECTION_ID_IS_NULL(1230701, "任务id为空"), | ||||
LIVE_CHANNEL_IS_NOT_EXIST(1230702, "直播通道为空"), | LIVE_CHANNEL_IS_NOT_EXIST(1230702, "直播通道为空"), | ||||
AIPULL_URL_IS_NULL(1230703, "直播地址为空"), | |||||
AIVIDEO_URL_IS_NULL(1230704, "回放地址为空"), | |||||
PULL_URL_IS_NULL(1230703, "直播地址为空"), | |||||
VIDEO_URL_IS_NULL(1230704, "回放地址为空"), | |||||
DRONE_ID_IS_NULL(1230705, "无人机id为空"), | DRONE_ID_IS_NULL(1230705, "无人机id为空"), | ||||
INSPECTION_IS_NOT_EXIST(1230706, "任务不存在"); | INSPECTION_IS_NOT_EXIST(1230706, "任务不存在"); | ||||
if (ObjectUtil.isNull(liveChannel)) { | if (ObjectUtil.isNull(liveChannel)) { | ||||
return JsonResult.error(QueryVideoServiceEnum.LIVE_CHANNEL_IS_NOT_EXIST.getCode(), QueryVideoServiceEnum.LIVE_CHANNEL_IS_NOT_EXIST.getMsg()); | return JsonResult.error(QueryVideoServiceEnum.LIVE_CHANNEL_IS_NOT_EXIST.getCode(), QueryVideoServiceEnum.LIVE_CHANNEL_IS_NOT_EXIST.getMsg()); | ||||
} | } | ||||
if (StringUtils.isEmpty(liveChannel.getAipullUrl())) { | |||||
return JsonResult.error(QueryVideoServiceEnum.AIPULL_URL_IS_NULL.getCode(), QueryVideoServiceEnum.AIPULL_URL_IS_NULL.getMsg()); | |||||
if (StringUtils.isEmpty(liveChannel.getPullUrl())) { | |||||
return JsonResult.error(QueryVideoServiceEnum.PULL_URL_IS_NULL.getCode(), QueryVideoServiceEnum.PULL_URL_IS_NULL.getMsg()); | |||||
} | } | ||||
liveChannelVo.setAipullUrl(liveChannel.getAipullUrl()); | liveChannelVo.setAipullUrl(liveChannel.getAipullUrl()); | ||||
liveChannelVo.setPullUrl(liveChannel.getPullUrl()); | |||||
} | } | ||||
if (15 == inspection.getStatus()) { | if (15 == inspection.getStatus()) { | ||||
//任务状态为任务飞行完成15视频回放 | //任务状态为任务飞行完成15视频回放 | ||||
if (StringUtils.isEmpty(inspection.getAiVideoUrl())) { | if (StringUtils.isEmpty(inspection.getAiVideoUrl())) { | ||||
return JsonResult.error(QueryVideoServiceEnum.AIVIDEO_URL_IS_NULL.getCode(), QueryVideoServiceEnum.AIVIDEO_URL_IS_NULL.getMsg()); | |||||
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()); | liveChannelVo.setAiVideoUrl(CommonConfig.videoURL + inspection.getAiVideoUrl()); | ||||
} | } | ||||
return JsonResult.success(liveChannelVo); | return JsonResult.success(liveChannelVo); | ||||
.eq(LiveChannel::getInspectionId, inspection.getId()) | .eq(LiveChannel::getInspectionId, inspection.getId()) | ||||
.eq(LiveChannel::getStatus, 1)); | .eq(LiveChannel::getStatus, 1)); | ||||
if (ObjectUtil.isNotNull(liveChannel)) { | if (ObjectUtil.isNotNull(liveChannel)) { | ||||
if (StringUtils.isNotEmpty(liveChannel.getAipullUrl())) { | |||||
vo.setAipullUrl(liveChannel.getAipullUrl()); | |||||
if (StringUtils.isNotEmpty(liveChannel.getPullUrl())) { | |||||
vo.setPullUrl(liveChannel.getPullUrl()); | |||||
} | } | ||||
} | } | ||||
//获取机场内外部视频 | //获取机场内外部视频 |
} | } | ||||
queryWrapper.eq("mark", MarkEnum.VALID.getCode()); | queryWrapper.eq("mark", MarkEnum.VALID.getCode()); | ||||
//queryWrapper.orderByAsc("sort"); | //queryWrapper.orderByAsc("sort"); | ||||
queryWrapper.orderByAsc("create_time"); | |||||
queryWrapper.orderByDesc("create_time"); | |||||
queryWrapper.ne("id", "1"); | queryWrapper.ne("id", "1"); | ||||
// 查询分页数据 | // 查询分页数据 | ||||
IPage<Role> pageData = roleMapper.selectPage(page, queryWrapper); | IPage<Role> pageData = roleMapper.selectPage(page, queryWrapper); |
import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
import org.springframework.stereotype.Service; | import org.springframework.stereotype.Service; | ||||
import java.util.Comparator; | |||||
import java.util.List; | import java.util.List; | ||||
import java.util.Map; | import java.util.Map; | ||||
import java.util.function.Function; | import java.util.function.Function; | ||||
} | } | ||||
} | } | ||||
} | } | ||||
//对list排序 | |||||
userPageListVoList = userPageListVoList.stream().sorted(Comparator.comparing(UserPageListVo::getCreateTime).reversed()).collect(Collectors.toList()); | |||||
return userPageListVoList; | return userPageListVoList; | ||||
} | } | ||||
vo.setWspd(parmJson.getString("WSPD") + "m/s") | vo.setWspd(parmJson.getString("WSPD") + "m/s") | ||||
.setWdir(parmJson.getString("WDIRNAME")) | .setWdir(parmJson.getString("WDIRNAME")) | ||||
.setHpa(parmJson.getString("Hpa") + "Mpa") | .setHpa(parmJson.getString("Hpa") + "Mpa") | ||||
.setHum(parmJson.getString("Hum") + "rh") | |||||
.setRainfull(parmJson.getString("Rainfull")) | |||||
.setHum(parmJson.getString("Hum") + "%rh") | |||||
.setRainfull(parmJson.getString("Rainfull") + "mm") | |||||
.setTmp(parmJson.getString("Tmp") + "℃"); | .setTmp(parmJson.getString("Tmp") + "℃"); | ||||
} | } | ||||
JSONObject tahJson = dataObject.getJSONObject("TAH"); | JSONObject tahJson = dataObject.getJSONObject("TAH"); | ||||
if (Objects.nonNull(tahJson)) { | if (Objects.nonNull(tahJson)) { | ||||
JSONObject parmJson = tahJson.getJSONObject("parmNew"); | JSONObject parmJson = tahJson.getJSONObject("parmNew"); | ||||
vo.setHum(parmJson.getString("Hum") + "rh") | |||||
vo.setHum(parmJson.getString("Hum") + "%rh") | |||||
.setTmp(parmJson.getString("Tmp") + "℃"); | .setTmp(parmJson.getString("Tmp") + "℃"); | ||||
} | } |
//直播 大气飞手任务只有直播 | //直播 大气飞手任务只有直播 | ||||
pilotTaskRequest.setIsLive(1); | pilotTaskRequest.setIsLive(1); | ||||
//pilotTaskRequest.setIsLive(inspection.getIsLive()); | |||||
//经纬度 | //经纬度 | ||||
pilotTaskRequest.setStartLatitude(inspection.getStartLatitude()); | pilotTaskRequest.setStartLatitude(inspection.getStartLatitude()); |