|
|
@@ -39,7 +39,7 @@ public class DspCallBackService { |
|
|
|
private ThInspectionMapper inspectionMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private QuestionMapper questionMapper; |
|
|
|
private QuestionMapper questionMapper; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private IQuestionTypeService questionTypeService; |
|
|
@@ -73,6 +73,7 @@ public class DspCallBackService { |
|
|
|
|
|
|
|
/** |
|
|
|
* 获取任务 |
|
|
|
* |
|
|
|
* @param requestId |
|
|
|
* @return |
|
|
|
*/ |
|
|
@@ -90,10 +91,9 @@ public class DspCallBackService { |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* |
|
|
|
* 设置dsp回调返回的数据 |
|
|
|
* 1、DSP分析状态 |
|
|
|
* 2、DSP分析完成,设置视频地址 |
|
|
|
* 1、DSP分析状态 |
|
|
|
* 2、DSP分析完成,设置视频地址 |
|
|
|
* |
|
|
|
* @param callbackRequest |
|
|
|
* @param thMissionUpdate |
|
|
@@ -194,21 +194,20 @@ public class DspCallBackService { |
|
|
|
warning.setCreateUser(question.getCreateUser()); |
|
|
|
warning.setCreateTime(question.getCreateTime()); |
|
|
|
warning.setMark(MarkTypeEnum.VALID.getCode()); |
|
|
|
if(StringUtils.isNotEmpty(question.getLng()) && StringUtils.isNotEmpty(question.getLat())){ |
|
|
|
if (StringUtils.isNotEmpty(question.getLng()) && StringUtils.isNotEmpty(question.getLat())) { |
|
|
|
String gaodeAddress = GaodeUtil.getGaodeAddress(question.getLng(), question.getLat()); |
|
|
|
warning.setLocation(gaodeAddress); |
|
|
|
} |
|
|
|
//任务的应急类型根据任务类型进行判断 |
|
|
|
ThMission thMission = missionMapper.selectById(question.getMissionId()); |
|
|
|
if(ObjectUtils.isNotEmpty(thMission)){ |
|
|
|
if(thMission.getType() == AccidentTaskEnum.ACCIDENT_TASK.getCode()){ |
|
|
|
warning.setFlag(FlagEnum.ACCIDENT.getCode()); |
|
|
|
}else { |
|
|
|
warning.setFlag(FlagEnum.INSPECTION_ACCIDENT.getCode()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// 该巡检任务存在应急任务,将后面发现的预警直接设置为不展示 |
|
|
|
ThMission emergencyMission = missionMapper.selectOne(new LambdaQueryWrapper<ThMission>() |
|
|
|
.eq(ThMission::getEmergencyDataMissionId, question.getMissionId()) |
|
|
|
.eq(ThMission::getMark, MarkEnum.VALID.getCode())); |
|
|
|
if (ObjectUtils.isNotEmpty(emergencyMission)) { |
|
|
|
warning.setFlag(FlagEnum.ACCIDENT.getCode()); |
|
|
|
} else { |
|
|
|
warning.setFlag(FlagEnum.INSPECTION_ACCIDENT.getCode()); |
|
|
|
} |
|
|
|
warningList.add(warning); |
|
|
|
} |
|
|
|
} |