| | |
| | | */ |
| | | public String waterInfoNotHandle(String arg1, String arg2) { |
| | | String templateId = "2431012216668"; |
| | | String adCode = "421303000000"; |
| | | String uuid = templateId + UUID.randomUUID().toString(); |
| | | // 查询当前策略对应的告警规则信息 |
| | | AlarmRule alarmRule = alarmRuleService.getOne(new QueryWrapper<AlarmRule>().eq("rule_name", arg1)); |
| | | if (null!=alarmRule) { |
| | | // 调用中台服务接口查询数据 |
| | | JSONArray ztData = noticeHandle.getZtData("", ZtApiUrlConstant.res_z_null_api); |
| | | // 只发短信,将发短信信息组装好 |
| | | SmsRequestTemplate smsRequestTemplate = noticeHandle.getSendSmsTemplate(ztData, templateId,alarmRule, ZtApiDataColumnConstant.waterInfoNotList,false,null); |
| | | // 拼接内容后面的联系方式,当前模板拼接平台服务电话 |
| | | // 遍历,拼接平台服务电话 |
| | | for (List<String> list : smsRequestTemplate.getTemplateContent()) { |
| | | // 保存告警记录信息 |
| | | AlarmRecord alarmRecord = noticeHandle.saveAlarmRecord(list,alarmRule,uuid); |
| | | if (null != alarmRecord) { |
| | | list.add(alarmRecord.getId().toString()); |
| | | } |
| | | } |
| | | // 调用短信服务 |
| | | smsService.sendSignMsg(smsRequestTemplate); |
| | | asyncNoticeHandle.waterInfoNotHandle(alarmRule,templateId,uuid,adCode,false); |
| | | } |
| | | // 返回 |
| | | return "水位信息接收不到"; |