diff --git a/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java b/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java index b518b04..ead0e3c 100644 --- a/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java +++ b/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java @@ -2,9 +2,7 @@ package com.xkrs.service.impl; import com.xkrs.common.encapsulation.PromptMessageEnum; import com.xkrs.dao.*; -import com.xkrs.model.entity.CountyCodeWeiXinEntity; -import com.xkrs.model.entity.FirePointEntity; -import com.xkrs.model.entity.ShanDongFirePointEntity; +import com.xkrs.model.entity.*; import com.xkrs.model.qo.FirePointQo; import com.xkrs.model.vo.TianDiTuGeocodeVo; import com.xkrs.service.FirePointService; @@ -224,25 +222,25 @@ public class FirePointServiceImpl implements FirePointService { //发送微信群聊消息 sendWeChatGroupMessage(firePointEntity); -// if ("耕地".equals(firePointEntity.getLandType())) { -// //过滤短信通知收件人 -// List sysUserList = sysUserDao.findAll(); -// boolean normalSmsEnable = 1L == globalConfigService.selectGlobalConfigValue(9L); -// boolean vipSmsEnable = 1L == globalConfigService.selectGlobalConfigValue(10L); -// List smsReceiverList = FirePointCodeUtils.filterSmsReceiver(firePointEntity.getStreetCode(), sysUserList, normalSmsEnable, vipSmsEnable); -//// //推送 -//// try { -//// List userAccountList = pushHelper.obtainUserAccountList(smsReceiverList); -//// pushHelper.dispatchPushMessage(userAccountList, firePointEntity); -//// } catch (Exception e) { -//// e.printStackTrace(); -//// } -// //对短信通知收件人进行分组 -// List agentOrgList = agentOrgDao.findAll(); -// Map> agentOrgNameGroupMap = FirePointCodeUtils.groupSmsReceiver(smsReceiverList, agentOrgList); -// //分发短信通知 -// smsHelper.dispatchSMSMessage(agentOrgNameGroupMap, new String[]{firePointEntity.getFirePointAddress()}, new FirePointEntity[]{firePointEntity}); -// } + if ("耕地".equals(firePointEntity.getLandType())) { + //过滤短信通知收件人 + List sysUserList = sysUserDao.findAll(); + boolean normalSmsEnable = 1L == globalConfigService.selectGlobalConfigValue(9L); + boolean vipSmsEnable = 1L == globalConfigService.selectGlobalConfigValue(10L); + List smsReceiverList = FirePointCodeUtils.filterSmsReceiver(firePointEntity.getStreetCode(), sysUserList, normalSmsEnable, vipSmsEnable); +// //推送 +// try { +// List userAccountList = pushHelper.obtainUserAccountList(smsReceiverList); +// pushHelper.dispatchPushMessage(userAccountList, firePointEntity); +// } catch (Exception e) { +// e.printStackTrace(); +// } + //对短信通知收件人进行分组 + List agentOrgList = agentOrgDao.findAll(); + Map> agentOrgNameGroupMap = FirePointCodeUtils.groupSmsReceiver(smsReceiverList, agentOrgList); + //分发短信通知 + smsHelper.dispatchSMSMessage(agentOrgNameGroupMap, new String[]{firePointEntity.getFirePointAddress()}, new FirePointEntity[]{firePointEntity}); + } } /**