| | |
| | | // 遍历,拼接县水利部人员电话 |
| | | for (List<String> list : smsRequestTemplate.getTemplateContent()) { |
| | | // 后面依次拼接 巡查责任人姓名,技术责任人姓名, |
| | | noticeHandle.addPatrolTechnologyInfo(list); |
| | | noticeHandle.addPatrolTechnologyInfo(list,false); |
| | | // 拼接市县水利部人员姓名及联系方式 |
| | | noticeHandle.addCityCountyBusinessPersonInfo(list); |
| | | // 保存告警记录信息 |
| | |
| | | if (smsRequestTemplate.getPersonVOList().size()>0) { |
| | | for (List<String> list : smsRequestTemplate.getTemplateContent()) { |
| | | // 依次拼接巡查责任人,技术责任人姓名 |
| | | noticeHandle.addPatrolTechnologyInfo(list); |
| | | noticeHandle.addPatrolTechnologyInfo(list,false); |
| | | // 拼接市县水利部人员姓名及联系方式 |
| | | 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; |
| | | } |
| | | |
| | | /** |
| | | * 7.1 水位小幅超汛限告警(发松给 水库技术责任人、巡查责任人) |
| | | * @param templateId |
| | | * @param uuid |
| | | * @param alarmRule |
| | | * @param adCode |
| | | * @param isSendStation 是否发送站内信 |
| | | * @return |
| | | */ |
| | | @Async |
| | | public Map<String, Object> waterSmallScaleOverHandle1(String templateId, String uuid, AlarmRule alarmRule,String adCode,Boolean isSendStation) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | // 调用中台服务接口查询数据 |
| | | JSONArray ztData = noticeHandle.getZtData("", ZtApiUrlConstant.res_over_z_small_over_api); |
| | | // 只发短信,将发短信信息组装好 |
| | | SmsRequestTemplate smsRequestTemplate |
| | | = noticeHandle.getSendSmsTemplate(ztData, templateId,alarmRule, ZtApiDataColumnConstant.waterSmallScaleOverList,true,adCode,uuid,DangerEnum.ALREADY_OVER.getValue()); |
| | | smsRequestTemplate.setIsSendStation(isSendStation); |
| | | |
| | | // 拼接后面内容 |
| | | if (smsRequestTemplate.getPersonVOList().size()>0) { |
| | | for (List<String> list : smsRequestTemplate.getTemplateContent()) { |
| | | // 依次拼接巡查责任人,技术责任人姓名 |
| | | noticeHandle.addPatrolTechnologyInfo(list,false); |
| | | // 拼接市县水利部人员姓名及联系方式 |
| | | 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; |
| | | } |
| | | |
| | | /** |
| | | * 7.2 水位小幅超汛限告警(发送给 县级水利部门有关人员、主管部门责任人) |
| | | * @param templateId |
| | | * @param uuid |
| | | * @param alarmRule |
| | | * @param adCode |
| | | * @param isSendStation 是否发送站内信 |
| | | * @return |
| | | */ |
| | | @Async |
| | | public Map<String, Object> waterSmallScaleOverHandle2(String templateId, String uuid, AlarmRule alarmRule,String adCode,Boolean isSendStation) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | // 调用中台服务接口查询数据 |
| | | JSONArray ztData = noticeHandle.getZtData("", ZtApiUrlConstant.res_over_z_small_over_api); |
| | | // 只发短信,将发短信信息组装好 |
| | | SmsRequestTemplate smsRequestTemplate |
| | | = noticeHandle.getSendSmsTemplate(ztData, templateId,alarmRule, ZtApiDataColumnConstant.waterSmallScaleOverList,true,adCode,uuid,DangerEnum.ALREADY_OVER.getValue()); |
| | | smsRequestTemplate.setIsSendStation(isSendStation); |
| | | |
| | | // 拼接后面内容 |
| | | if (smsRequestTemplate.getPersonVOList().size()>0) { |
| | | for (List<String> list : smsRequestTemplate.getTemplateContent()) { |
| | | // 依次拼接巡查责任人,技术责任人姓名联系电话 |
| | | noticeHandle.addPatrolTechnologyInfo(list,true); |
| | | // 拼接市县水利部人员姓名及联系方式 |
| | | // 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; |
| | | } |
| | | |
| | | /** |
| | | * 8.1 水位大幅超汛限告警(发松给 水库技术责任人、巡查责任人) |
| | | * @param templateId |
| | | * @param uuid |
| | | * @param alarmRule |
| | | * @param adCode |
| | | * @param isSendStation 是否发送站内信 |
| | | * @return |
| | | */ |
| | | @Async |
| | | public Map<String, Object> waterBigScaleOverHandle1(String templateId, String uuid, AlarmRule alarmRule,String adCode,Boolean isSendStation) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | // 调用中台服务接口查询数据 |
| | | JSONArray ztData = noticeHandle.getZtData("", ZtApiUrlConstant.res_over_z_big_over_api); |
| | | // 只发短信,将发短信信息组装好 |
| | | SmsRequestTemplate smsRequestTemplate |
| | | = noticeHandle.getSendSmsTemplate(ztData, templateId,alarmRule, ZtApiDataColumnConstant.waterBigScaleOverList1,true,adCode,uuid,DangerEnum.ALREADY_BIG_OVER.getValue()); |
| | | smsRequestTemplate.setIsSendStation(isSendStation); |
| | | |
| | | // 拼接后面内容 |
| | | if (smsRequestTemplate.getPersonVOList().size()>0) { |
| | | for (List<String> list : smsRequestTemplate.getTemplateContent()) { |
| | | // 依次拼接巡查责任人,技术责任人姓名 |
| | | noticeHandle.addPatrolTechnologyInfo(list,false); |
| | | // 拼接市县水利部人员姓名及联系方式 |
| | | 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; |
| | | } |
| | | |
| | | /** |
| | | * 8.2 水位大幅超汛限告警(发送给 县级水利部门有关人员、主管部门责任人) |
| | | * @param templateId |
| | | * @param uuid |
| | | * @param alarmRule |
| | | * @param adCode |
| | | * @param isSendStation 是否发送站内信 |
| | | * @return |
| | | */ |
| | | @Async |
| | | public Map<String, Object> waterBigScaleOverHandle2(String templateId, String uuid, AlarmRule alarmRule,String adCode,Boolean isSendStation) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | // 调用中台服务接口查询数据 |
| | | JSONArray ztData = noticeHandle.getZtData("", ZtApiUrlConstant.res_over_z_big_over_api); |
| | | // 只发短信,将发短信信息组装好 |
| | | SmsRequestTemplate smsRequestTemplate |
| | | = noticeHandle.getSendSmsTemplate(ztData, templateId,alarmRule, ZtApiDataColumnConstant.waterBigScaleOverList2,true,adCode,uuid,DangerEnum.ALREADY_BIG_OVER.getValue()); |
| | | smsRequestTemplate.setIsSendStation(isSendStation); |
| | | |
| | | // 拼接后面内容 |
| | | if (smsRequestTemplate.getPersonVOList().size()>0) { |
| | | for (List<String> list : smsRequestTemplate.getTemplateContent()) { |
| | | // 依次拼接巡查责任人,技术责任人姓名联系电话 |
| | | noticeHandle.addPatrolTechnologyInfo(list,true); |
| | | // 拼接市县水利部人员姓名及联系方式 |
| | | // noticeHandle.addCityCountyBusinessPersonInfo(list); |
| | | // 保存告警记录信息 |
| | | AlarmRecord alarmRecord = noticeHandle.saveAlarmRecord(list,alarmRule,uuid); |
| | | if (null != alarmRecord) { |
| | |
| | | if (smsRequestTemplate.getPersonVOList().size() > 0) { |
| | | for (List<String> list : smsRequestTemplate.getTemplateContent()) { |
| | | // 依次添加巡查责任人技术责任人信息姓名 |
| | | noticeHandle.addPatrolTechnologyInfo(list); |
| | | noticeHandle.addPatrolTechnologyInfo(list,false); |
| | | // 拼接市县水利部人员姓名及联系方式 |
| | | noticeHandle.addCityCountyBusinessPersonInfo(list); |
| | | // 保存告警记录信息 |
| | |
| | | if (smsRequestTemplate.getPersonVOList().size() > 0) { |
| | | for (List<String> list : smsRequestTemplate.getTemplateContent()) { |
| | | // 依次添加巡查责任人技术责任人信息姓名 |
| | | noticeHandle.addPatrolTechnologyInfo(list); |
| | | noticeHandle.addPatrolTechnologyInfo(list,false); |
| | | // 拼接市县水利部人员姓名及联系方式 |
| | | noticeHandle.addCityCountyBusinessPersonInfo(list); |
| | | // 保存告警记录信息 |