| | |
| | | @Autowired |
| | | private SmsService smsService; |
| | | |
| | | |
| | | /** |
| | | * 异步发送告警信息 |
| | | * 水位初次超汛限告警 处理 |
| | | * @param templateId |
| | | * @param uuid |
| | | * @param alarmRule |
| | | * @param adCode |
| | | * @return |
| | | */ |
| | | @Async |
| | | public Map<String, Object> waterFirstOverHandle(String templateId, String uuid, AlarmRule alarmRule,String adCode) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | // 调用中台服务接口查询数据 |
| | | JSONArray ztData = noticeHandle.getZtData("", ZtApiUrlConstant.over_z_res_api); |
| | | // 只发短信,将发短信信息组装好 |
| | | SmsRequestTemplate smsRequestTemplate |
| | | = noticeHandle.getSendSmsTemplate(ztData, templateId,alarmRule, ZtApiDataColumnConstant.waterFirstOverList,true,adCode); |
| | | // 拼接后面内容 |
| | | if (smsRequestTemplate.getPersonVOList().size()>0) { |
| | | for (List<String> list : smsRequestTemplate.getTemplateContent()) { |
| | | // 依次拼接巡查责任人,技术责任人姓名 |
| | | noticeHandle.addPatrolTechnologyInfo(list); |
| | | // 拼接市县水利部人员姓名及联系方式 |
| | | noticeHandle.addCityCountyBusinessPersonInfo(list); |
| | | // 保存告警记录信息 |
| | | AlarmRecord alarmRecord = noticeHandle.saveAlarmRecord(list,alarmRule,uuid); |
| | | if (null != alarmRecord) { |
| | | list.add(alarmRecord.getId().toString()); |
| | | } |
| | | } |
| | | // 调用短信服务 |
| | | map = smsService.sendSignMsg(smsRequestTemplate); |
| | | return map; |
| | | } |
| | | return map; |
| | | } |
| | | |
| | | /** |
| | | * 水位超设计洪水位告警处理 |
| | | * @param templateId |
| | | * @param uuid |
| | | * @param alarmRule |
| | | * @return |
| | | */ |
| | | @Async |
| | | public Map<String, Object> handleAlarmInfo(String templateId, String uuid, AlarmRule alarmRule) { |
| | | public Map<String, Object> waterMoreDesignHandle(String templateId, String uuid, AlarmRule alarmRule) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | // 调用中台服务接口查询数据 |
| | | JSONArray ztData = noticeHandle.getZtData("", ZtApiUrlConstant.over_des_rz_warn_api); |