只给耕地类型的火点对应的用户发送短信通知
This commit is contained in:
parent
27b369f4ed
commit
3190d71e8a
@ -421,26 +421,26 @@ public class FirePointServiceImpl implements FirePointService {
|
|||||||
//发送微信群聊消息
|
//发送微信群聊消息
|
||||||
sendWeChatGroupMessage(firePointEntity);
|
sendWeChatGroupMessage(firePointEntity);
|
||||||
|
|
||||||
//过滤短信通知收件人
|
if ("耕地".equals(firePointEntity.getLandType())) {
|
||||||
List<SysUserEntity> sysUserList = sysUserDao.findAll();
|
//过滤短信通知收件人
|
||||||
List<RelRoleAuthorityEntity> adminList = relRoleAuthorityDao.selectByAuthorityId(1);
|
List<SysUserEntity> sysUserList = sysUserDao.findAll();
|
||||||
boolean normalSmsEnable = 1L == globalConfigService.selectGlobalConfigValue(9L);
|
List<RelRoleAuthorityEntity> adminList = relRoleAuthorityDao.selectByAuthorityId(1);
|
||||||
boolean vipSmsEnable = 1L == globalConfigService.selectGlobalConfigValue(10L);
|
boolean normalSmsEnable = 1L == globalConfigService.selectGlobalConfigValue(9L);
|
||||||
List<SysUserEntity> smsReceiverList = FirePointCodeUtils.filterSmsReceiver(firePointEntity.getStreetCode(), sysUserList, adminList, normalSmsEnable, vipSmsEnable);
|
boolean vipSmsEnable = 1L == globalConfigService.selectGlobalConfigValue(10L);
|
||||||
|
List<SysUserEntity> smsReceiverList = FirePointCodeUtils.filterSmsReceiver(firePointEntity.getStreetCode(), sysUserList, adminList, normalSmsEnable, vipSmsEnable);
|
||||||
//推送
|
// //推送
|
||||||
try {
|
// try {
|
||||||
List<String> userAccountList = pushHelper.obtainUserAccountList(smsReceiverList);
|
// List<String> userAccountList = pushHelper.obtainUserAccountList(smsReceiverList);
|
||||||
pushHelper.dispatchPushMessage(userAccountList, firePointEntity);
|
// pushHelper.dispatchPushMessage(userAccountList, firePointEntity);
|
||||||
} catch (Exception e) {
|
// } catch (Exception e) {
|
||||||
e.printStackTrace();
|
// e.printStackTrace();
|
||||||
|
// }
|
||||||
|
//对短信通知收件人进行分组
|
||||||
|
List<AgentOrgEntity> agentOrgList = agentOrgDao.findAll();
|
||||||
|
Map<String, List<SysUserEntity>> agentOrgNameGroupMap = FirePointCodeUtils.groupSmsReceiver(smsReceiverList, agentOrgList);
|
||||||
|
//分发短信通知
|
||||||
|
smsHelper.dispatchSMSMessage(agentOrgNameGroupMap, new String[]{firePointEntity.getFirePointAddress()}, new FirePointEntity[]{firePointEntity});
|
||||||
}
|
}
|
||||||
|
|
||||||
//对短信通知收件人进行分组
|
|
||||||
List<AgentOrgEntity> agentOrgList = agentOrgDao.findAll();
|
|
||||||
Map<String, List<SysUserEntity>> agentOrgNameGroupMap = FirePointCodeUtils.groupSmsReceiver(smsReceiverList, agentOrgList);
|
|
||||||
//分发短信通知
|
|
||||||
smsHelper.dispatchSMSMessage(agentOrgNameGroupMap, new String[]{firePointEntity.getFirePointAddress()}, new FirePointEntity[]{firePointEntity});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user