Inspection inspection = inspectionMapper.selectOne(new LambdaQueryWrapper<Inspection>() | Inspection inspection = inspectionMapper.selectOne(new LambdaQueryWrapper<Inspection>() | ||||
.eq(Inspection::getEmergencyDataInspectionId, accident.getInspectionId()) | .eq(Inspection::getEmergencyDataInspectionId, accident.getInspectionId()) | ||||
.eq(Inspection::getMark, MarkEnum.VALID.getCode())); | .eq(Inspection::getMark, MarkEnum.VALID.getCode())); | ||||
if (ObjectUtil.isNull(inspection)) { | |||||
if (ObjectUtil.isNotNull(inspection)) { | |||||
throw new ServiceException("该事故关联的任务已被处理,不能在核实"); | throw new ServiceException("该事故关联的任务已被处理,不能在核实"); | ||||
} | } | ||||
return JsonResult.success(accident); | return JsonResult.success(accident); |
.eq(Inspection::getId, inspectionId) | .eq(Inspection::getId, inspectionId) | ||||
.eq(Inspection::getTenantId, business.getTenantId())); | .eq(Inspection::getTenantId, business.getTenantId())); | ||||
if (ObjectUtil.isNull(inspection)) { | if (ObjectUtil.isNull(inspection)) { | ||||
log.info("任务不存在"); | |||||
log.info("任务不存在, inspectionId={}", inspectionId); | |||||
throw new ServiceException(0, "巡检任务不存在"); | throw new ServiceException(0, "巡检任务不存在"); | ||||
} | } | ||||
log.info("巡检任务查询成功,分析状态为:{}", dspCallbackRequest.getAnalyseStatus()); | log.info("巡检任务查询成功,分析状态为:{}", dspCallbackRequest.getAnalyseStatus()); |