|
@@ -28,7 +28,6 @@ import rtx.RTXSvrApi;
|
|
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
import com.liandi.encrypt.Des;
|
|
|
-import com.xt.jygl.gkjcxx.gq.entity.GqEntity;
|
|
|
import com.xt.jygl.gkjcxx.gq.service.GqService;
|
|
|
import com.xt.jygl.gkjygl.gkjyr.jyrjbxx.entity.GkjyrEntity;
|
|
|
import com.xt.jygl.gkjygl.gkjyr.jyrjbxx.service.GkjyrService;
|
|
@@ -352,18 +351,27 @@ public class BaseWebCtl extends BaseCtl {
|
|
|
}
|
|
|
|
|
|
// rtx提醒
|
|
|
- public void rtxSend(String gqid, String role, String msg) {
|
|
|
- if (!StringUtils.isEmpty(gqid)) {
|
|
|
- GqEntity gq = gqService.findOne(gqid);
|
|
|
- RoleEntity roleEntity = securityMgr.roleService().findById(role);
|
|
|
- List<UserEntity> ulist = securityMgr.userService().findByRole(roleEntity.getId());
|
|
|
- if (ulist != null && ulist.size() > 0) {
|
|
|
- for (UserEntity u : ulist) {
|
|
|
- if (u.getSsglbm().getId() == gq.getSsgkglbm().getId()) {
|
|
|
+ public void rtxSend(String userids, String role, String msg) {
|
|
|
+
|
|
|
+ if (StringUtils.isEmpty(userids)) {
|
|
|
+ List<RoleEntity> rolelist = securityMgr.roleService().findByCode(role);
|
|
|
+ RoleEntity roleEntity = new RoleEntity();
|
|
|
+ if (rolelist != null && rolelist.size() > 0) {
|
|
|
+ roleEntity = rolelist.get(0);
|
|
|
+ List<UserEntity> ulist = securityMgr.userService().findByRole(roleEntity.getId());
|
|
|
+ if (ulist != null && ulist.size() > 0) {
|
|
|
+ for (UserEntity u : ulist) {
|
|
|
inserttx(u.getId(), msg);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ } else {
|
|
|
+ if (!StringUtils.isEmpty(userids)) {
|
|
|
+ String[] users = userids.split(",");
|
|
|
+ for (String userid : users) {
|
|
|
+ inserttx(userid, msg);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
}
|