Browse Source

扫码报警 处置记录

develop
lau572 15 hours ago
parent
commit
1e34350948
  1. 30
      zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java

30
zc-business/src/main/java/com/zc/business/service/impl/DcEventServiceImpl.java

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

Loading…
Cancel
Save