diff --git a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java index 6e7c0f96..7da836f0 100644 --- a/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java +++ b/zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java @@ -2020,25 +2020,27 @@ public class DcEventServiceImpl extends ServiceImpl impl dcEventProcess.setContext("事件解除,处置完毕,处置时长:" + datePoor); dcEventProcessService.insertDcEventProcess(dcEventProcess); - return AjaxResult.success(UniversalEnum.OPERATION_FAILURE.getValue()); - } - if (StringUtils.isNotEmpty(dcEvent.getStringEventSource()) && dcEvent.getStringEventSource().equals("扫码报警")){ - //扫码报警 处置记录 - HashMap warningInfo = dcWarningMapper.selectDcWarningById(eventId); - if (warningInfo != null && Objects.nonNull(warningInfo.get("warningSource")) && "5".equals(warningInfo.get("warningSource").toString())){ - com.alibaba.fastjson.JSONObject otherConfig = com.alibaba.fastjson.JSONObject.parseObject(warningInfo.get("otherConfig").toString()); - String alarmId = otherConfig.getString("id"); - if (org.apache.commons.lang3.StringUtils.isNotBlank(alarmId)) { - try { - //扫码报警接警反馈 - dcWarningService.addCodeScanningProcess(alarmId,"事件处置完成"); - } catch (IOException | HttpException e) { - e.printStackTrace(); + if (StringUtils.isNotEmpty(dcEvent.getStringEventSource()) && dcEvent.getStringEventSource().equals("扫码报警")){ + //扫码报警 处置记录 + HashMap warningInfo = dcWarningMapper.selectDcWarningById(eventId); + if (warningInfo != null && Objects.nonNull(warningInfo.get("warningSource")) && "5".equals(warningInfo.get("warningSource").toString())){ + com.alibaba.fastjson.JSONObject otherConfig = com.alibaba.fastjson.JSONObject.parseObject(warningInfo.get("otherConfig").toString()); + String alarmId = otherConfig.getString("id"); + if (org.apache.commons.lang3.StringUtils.isNotBlank(alarmId)) { + try { + //扫码报警接警反馈 + dcWarningService.addCodeScanningProcess(alarmId,"事件处置完成"); + } catch (IOException | HttpException e) { + e.printStackTrace(); + } } } } + return AjaxResult.success(UniversalEnum.OPERATION_FAILURE.getValue()); } + + return AjaxResult.error(UniversalEnum.SUCCESSFUL_OPERATION.getValue()); }