| | |
| | | * @return |
| | | */ |
| | | public String waterComeOverHandle(String arg1, String arg2) { |
| | | String adCode = null; |
| | | String templateId = "znxsw10000001"; |
| | | 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_diff_dead_z_api); |
| | | // 只发送站内信 |
| | | SmsRequestTemplate smsRequestTemplate = noticeHandle.getSendSmsTemplate(ztData, templateId,alarmRule, ZtApiDataColumnConstant.waterLessDeadList,true,null); |
| | | // 拼接内容后面的联系方式,当前模板县水利部人员姓名电话 |
| | | // 遍历,拼接县水利部人员电话 |
| | | for (List<String> list : smsRequestTemplate.getTemplateContent()) { |
| | | // 后面依次拼接 巡查责任人姓名,技术责任人姓名,市县水利部门人员姓名电话(暂时不要) |
| | | noticeHandle.addPatrolTechnologyInfo(list); |
| | | // 市县水利部门人员姓名电话(暂时不要) |
| | | // list.add("测试:13112341234"); |
| | | // 保存告警记录信息 |
| | | AlarmRecord alarmRecord = noticeHandle.saveAlarmRecord(list,alarmRule,uuid); |
| | | if (null != alarmRecord) { |
| | | list.add(alarmRecord.getId().toString()); |
| | | // list.add("999"); |
| | | } |
| | | } |
| | | // 保存站内信记录信息 |
| | | // smsService.saveInStationInfo(smsRequestTemplate); |
| | | asyncNoticeHandle.waterComeOverHandle(templateId,uuid,alarmRule, null); |
| | | } |
| | | return "水位接近汛限告警"; |
| | | } |