|
@@ -225,7 +225,8 @@ public class AppEventServiceImpl extends AppBaseService implements AppEventServi
|
|
|
|
|
|
SysUser sysUser = userMapper.selectUserById(appEventVo.getUserId());
|
|
SysUser sysUser = userMapper.selectUserById(appEventVo.getUserId());
|
|
SysUser u = new SysUser();
|
|
SysUser u = new SysUser();
|
|
- u.setDeptId(sysUser.getDeptId());
|
|
|
|
|
|
+ //u.setDeptId(sysUser.getDeptId());//包括下属部门用户
|
|
|
|
+ u.setDeptIdOnly(sysUser.getDeptId());//不包括下属部门用户,只查询当前部门下用户
|
|
|
|
|
|
|
|
|
|
Set<String> userIds = webSocketService.getUsers(u.getDeptId(), appEventVo.getReserveplanType());
|
|
Set<String> userIds = webSocketService.getUsers(u.getDeptId(), appEventVo.getReserveplanType());
|
|
@@ -250,7 +251,38 @@ public class AppEventServiceImpl extends AppBaseService implements AppEventServi
|
|
|
|
|
|
|
|
|
|
List<SysUser> list = userMapper.selectUserList(u);
|
|
List<SysUser> list = userMapper.selectUserList(u);
|
|
|
|
+ //App推送消息
|
|
|
|
+// SysUser sysUser = new SysUser();
|
|
|
|
+// sysUser.setDeptIdOnly(appEventVo.getDeptId());
|
|
|
|
+ List<SysUser> userList = list;
|
|
|
|
+ for (int i = 0; i < userList.size(); i++) {
|
|
|
|
+ try {
|
|
|
|
+// if (!userList.get(i).getLoginName().equals("admin")){
|
|
|
|
+// continue;
|
|
|
|
+// }
|
|
|
|
+ //JiGuangPushUtil.pushMsg("alias", "admin", "abc123");
|
|
|
|
+ System.out.println(appEventVo.getName() + "=appEventVo.getName()");
|
|
|
|
+ System.out.println(appEventVo.getReportContent() + "=appEventVo.getReportContent()");
|
|
|
|
+ System.out.println(appEventVo.getDeptId() + "=appEventVo.getDeptId()");
|
|
|
|
+ System.out.println(userList.size() + "=userList.size()");
|
|
|
|
+ //JiGuangPushUtil.pushMsg("alias", userList.get(i).getLoginName(), appEventVo.getName() + ":" + appEventVo.getReportContent());
|
|
|
|
+ String retJSON = "";
|
|
|
|
+ String id = appEventVo.getId();
|
|
|
|
+ String type = appEventVo.getReserveplanType();
|
|
|
|
+ String title = appEventVo.getName();
|
|
|
|
+ String content = appEventVo.getReportContent();
|
|
|
|
+ retJSON += "{";
|
|
|
|
+ retJSON += "\"id\":" + "\"" + id + "\"";
|
|
|
|
+ retJSON += ",\"type\":" + "\"" + type + "\"";
|
|
|
|
+ retJSON += ",\"title\":" + "\"" + title + "\"";
|
|
|
|
+ retJSON += ",\"content\":" + "\"" + content + "\"";
|
|
|
|
+ retJSON += "}";
|
|
|
|
+ System.out.println(retJSON + "=retJSON");
|
|
|
|
+ JiGuangPushUtil.pushMsg("alias", userList.get(i).getLoginName(), retJSON);
|
|
|
|
+ } catch (Exception e) {
|
|
|
|
|
|
|
|
+ }
|
|
|
|
+ }
|
|
String ids = "";
|
|
String ids = "";
|
|
for (int i = 0; i < list.size(); i++) {
|
|
for (int i = 0; i < list.size(); i++) {
|
|
ids += list.get(i).getUserId() + ",";
|
|
ids += list.get(i).getUserId() + ",";
|