|
|
@@ -1,5 +1,6 @@ |
|
|
|
package com.tuoheng.admin.service.inspection.query; |
|
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil; |
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
import com.tuoheng.admin.entity.Inspection; |
|
|
|
import com.tuoheng.admin.entity.LiveChannel; |
|
|
@@ -37,7 +38,7 @@ public class QueryVideoService { |
|
|
|
} |
|
|
|
//根据id查询对应的任务 |
|
|
|
Inspection inspection = inspectionMapper.selectById(id); |
|
|
|
if (null == inspection) { |
|
|
|
if (ObjectUtil.isNull(inspection)) { |
|
|
|
return JsonResult.error(QueryVideoServiceEnum.INSPECTION_IS_NOT_EXIST.getCode(), QueryVideoServiceEnum.INSPECTION_IS_NOT_EXIST.getMsg()); |
|
|
|
|
|
|
|
} |
|
|
@@ -48,10 +49,10 @@ public class QueryVideoService { |
|
|
|
.eq(LiveChannel::getMark, 1) |
|
|
|
.eq(LiveChannel::getInspectionId, inspection.getId()) |
|
|
|
.eq(LiveChannel::getStatus, 1)); |
|
|
|
if (null == liveChannel) { |
|
|
|
if (ObjectUtil.isNull(liveChannel)) { |
|
|
|
return JsonResult.error(QueryVideoServiceEnum.LIVE_CHANNEL_IS_NOT_EXIST.getCode(), QueryVideoServiceEnum.LIVE_CHANNEL_IS_NOT_EXIST.getMsg()); |
|
|
|
} |
|
|
|
if (liveChannel.getAipullUrl() == null) { |
|
|
|
if (StringUtils.isEmpty(liveChannel.getAipullUrl())) { |
|
|
|
return JsonResult.error(QueryVideoServiceEnum.AIPULL_URL_IS_NOT_NULL.getCode(), QueryVideoServiceEnum.AIPULL_URL_IS_NOT_NULL.getMsg()); |
|
|
|
} |
|
|
|
liveChannelVo.setAipullUrl(liveChannel.getAipullUrl()); |
|
|
@@ -59,7 +60,7 @@ public class QueryVideoService { |
|
|
|
} |
|
|
|
if (15 == inspection.getStatus()) { |
|
|
|
//任务状态为任务飞行完成15视频回放 |
|
|
|
if (inspection.getAiVideoUrl() == null) { |
|
|
|
if (StringUtils.isEmpty(inspection.getAiVideoUrl())) { |
|
|
|
return JsonResult.error(QueryVideoServiceEnum.AIVIDEO_URL_IS_NOT_NULL.getCode(), QueryVideoServiceEnum.AIVIDEO_URL_IS_NOT_NULL.getMsg()); |
|
|
|
} |
|
|
|
liveChannelVo.setAiVideoUrl(CommonConfig.videoURL + inspection.getAiVideoUrl()); |