From 1e34350948622e80b512e1dae17daa27e96013b0 Mon Sep 17 00:00:00 2001 From: lau572 <1010031226@qq.com> Date: Mon, 25 Nov 2024 12:16:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=AB=E7=A0=81=E6=8A=A5=E8=AD=A6=20?= =?UTF-8?q?=E5=A4=84=E7=BD=AE=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/DcEventServiceImpl.java | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) 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()); }