diff --git a/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java b/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java index 4d4161f..aad629f 100644 --- a/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java +++ b/src/main/java/com/xkrs/service/impl/FirePointServiceImpl.java @@ -421,26 +421,26 @@ public class FirePointServiceImpl implements FirePointService { //发送微信群聊消息 sendWeChatGroupMessage(firePointEntity); - //过滤短信通知收件人 - List sysUserList = sysUserDao.findAll(); - List adminList = relRoleAuthorityDao.selectByAuthorityId(1); - boolean normalSmsEnable = 1L == globalConfigService.selectGlobalConfigValue(9L); - boolean vipSmsEnable = 1L == globalConfigService.selectGlobalConfigValue(10L); - List smsReceiverList = FirePointCodeUtils.filterSmsReceiver(firePointEntity.getStreetCode(), sysUserList, adminList, normalSmsEnable, vipSmsEnable); - - //推送 - try { - List userAccountList = pushHelper.obtainUserAccountList(smsReceiverList); - pushHelper.dispatchPushMessage(userAccountList, firePointEntity); - } catch (Exception e) { - e.printStackTrace(); + if ("耕地".equals(firePointEntity.getLandType())) { + //过滤短信通知收件人 + List sysUserList = sysUserDao.findAll(); + List adminList = relRoleAuthorityDao.selectByAuthorityId(1); + boolean normalSmsEnable = 1L == globalConfigService.selectGlobalConfigValue(9L); + boolean vipSmsEnable = 1L == globalConfigService.selectGlobalConfigValue(10L); + List smsReceiverList = FirePointCodeUtils.filterSmsReceiver(firePointEntity.getStreetCode(), sysUserList, adminList, 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}); } - - //对短信通知收件人进行分组 - List agentOrgList = agentOrgDao.findAll(); - Map> agentOrgNameGroupMap = FirePointCodeUtils.groupSmsReceiver(smsReceiverList, agentOrgList); - //分发短信通知 - smsHelper.dispatchSMSMessage(agentOrgNameGroupMap, new String[]{firePointEntity.getFirePointAddress()}, new FirePointEntity[]{firePointEntity}); } /**