|
|
|
|
|
|
|
|
private ThInspectionMapper inspectionMapper; |
|
|
private ThInspectionMapper inspectionMapper; |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
private QuestionMapper questionMapper; |
|
|
|
|
|
|
|
|
private QuestionMapper questionMapper; |
|
|
|
|
|
|
|
|
@Autowired |
|
|
@Autowired |
|
|
private IQuestionTypeService questionTypeService; |
|
|
private IQuestionTypeService questionTypeService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* 获取任务 |
|
|
* 获取任务 |
|
|
|
|
|
* |
|
|
* @param requestId |
|
|
* @param requestId |
|
|
* @return |
|
|
* @return |
|
|
*/ |
|
|
*/ |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* |
|
|
|
|
|
* 设置dsp回调返回的数据 |
|
|
* 设置dsp回调返回的数据 |
|
|
* 1、DSP分析状态 |
|
|
|
|
|
* 2、DSP分析完成,设置视频地址 |
|
|
|
|
|
|
|
|
* 1、DSP分析状态 |
|
|
|
|
|
* 2、DSP分析完成,设置视频地址 |
|
|
* |
|
|
* |
|
|
* @param callbackRequest |
|
|
* @param callbackRequest |
|
|
* @param thMissionUpdate |
|
|
* @param thMissionUpdate |
|
|
|
|
|
|
|
|
warning.setCreateUser(question.getCreateUser()); |
|
|
warning.setCreateUser(question.getCreateUser()); |
|
|
warning.setCreateTime(question.getCreateTime()); |
|
|
warning.setCreateTime(question.getCreateTime()); |
|
|
warning.setMark(MarkTypeEnum.VALID.getCode()); |
|
|
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()); |
|
|
String gaodeAddress = GaodeUtil.getGaodeAddress(question.getLng(), question.getLat()); |
|
|
warning.setLocation(gaodeAddress); |
|
|
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); |
|
|
warningList.add(warning); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |