Browse Source

扫码报警 处置记录

develop
lau572 11 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);
dcEventProcessService.insertDcEventProcess(dcEventProcess);
return AjaxResult.success(UniversalEnum.OPERATION_FAILURE.getValue());
}
if (StringUtils.isNotEmpty(dcEvent.getStringEventSource()) && dcEvent.getStringEventSource().equals("扫码报警")){
//扫码报警 处置记录
HashMap<String, Object> 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<String, Object> 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());
}

Loading…
Cancel
Save