|
|
@@ -103,6 +103,21 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
|
|
|
String join = StringUtil.join(userIdList);
|
|
|
notice.setTargetIds(join);
|
|
|
}
|
|
|
+ /*if (notice.getTargetEhrs() == null){
|
|
|
+ String[] split = notice.getTargetIds().split(",");
|
|
|
+ List<String> userEhrList = new ArrayList<>();
|
|
|
+ for (int i = 0; i < split.length; i++) {
|
|
|
+ String userIdStr = split[i];
|
|
|
+ User user = userService.getById(userIdStr);
|
|
|
+ userEhrList.add(user.getEhr());
|
|
|
+ }
|
|
|
+ notice.setTargetEhrs(userEhrList);
|
|
|
+ }*/
|
|
|
+
|
|
|
+ /*// 發送行信通知
|
|
|
+ HangxinResultBean hangxinResultBean = hangxinUtil.sendMsg(notice.getTargetEhrs(), "提示進度", notice.getTitle());
|
|
|
+ System.out.println(JSONUtil.toJsonStr(hangxinResultBean));*/
|
|
|
+
|
|
|
return save(notice);
|
|
|
}
|
|
|
|
|
|
@@ -127,17 +142,21 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
|
|
|
User user2 = userService.getUserByEhr(keyPwd.getReceiverNo());
|
|
|
|
|
|
List<Long> targetList = new ArrayList<>();
|
|
|
+ List<String> userEhrtList = new ArrayList<>();
|
|
|
if (user1 != null){
|
|
|
targetList.add(user1.getId());
|
|
|
+ userEhrtList.add(user1.getEhr());
|
|
|
}
|
|
|
if (user2 != null){
|
|
|
targetList.add(user2.getId());
|
|
|
+ userEhrtList.add(user2.getEhr());
|
|
|
}
|
|
|
|
|
|
Notice notice = new Notice();
|
|
|
notice.setTitle(title);
|
|
|
notice.setBusinessType("keypwd");
|
|
|
notice.setTargetIds(StringUtil.join(targetList));
|
|
|
+// notice.setTargetEhrs(userEhrtList);
|
|
|
return sendNotice(notice);
|
|
|
}
|
|
|
|
|
|
@@ -188,6 +207,16 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
|
|
|
notice.setDeptId(message.getDeptId());
|
|
|
notice.setRoleId(message.getRoleId());
|
|
|
notice.setTargetIds(message.getTargetIds());
|
|
|
+
|
|
|
+ String[] split = message.getTargetIds().split(",");
|
|
|
+ List<String> userEhrList = new ArrayList<>();
|
|
|
+ for (int i = 0; i < split.length; i++) {
|
|
|
+ String userIdStr = split[i];
|
|
|
+ User user = userService.getById(userIdStr);
|
|
|
+ userEhrList.add(user.getEhr());
|
|
|
+ }
|
|
|
+// notice.setTargetEhrs(userEhrList);
|
|
|
+
|
|
|
return sendNotice(notice);
|
|
|
}
|
|
|
|
|
|
@@ -199,11 +228,14 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
|
|
|
User user1 = userService.getUserByEhr(sealHandover.getHandoverPersonNo());
|
|
|
User user2 = userService.getUserByEhr(sealHandover.getReceiverNo());
|
|
|
List<Long> userList = new ArrayList<>();
|
|
|
+ List<String> userEhrList = new ArrayList<>();
|
|
|
if (user1 != null){
|
|
|
userList.add(user1.getId());
|
|
|
+ userEhrList.add(user1.getEhr());
|
|
|
}
|
|
|
if (user2 != null){
|
|
|
userList.add(user2.getId());
|
|
|
+ userEhrList.add(user2.getEhr());
|
|
|
}
|
|
|
|
|
|
String title = "";
|
|
|
@@ -219,6 +251,7 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
|
|
|
notice.setTitle(title);
|
|
|
notice.setBusinessType("sealhandover");
|
|
|
notice.setTargetIds(StringUtil.join(userList));
|
|
|
+// notice.setTargetEhrs(userEhrList);
|
|
|
return sendNotice(notice);
|
|
|
}
|
|
|
|
|
|
@@ -235,6 +268,10 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
|
|
|
notice.setTitle(title);
|
|
|
notice.setBusinessType("postchange");
|
|
|
notice.setTargetIds(postChange.getPersonId()+"");
|
|
|
+ User user = userService.getById(postChange.getPersonId());
|
|
|
+ List<String> userEhrList = new ArrayList<>();
|
|
|
+ userEhrList.add(user.getEhr());
|
|
|
+// notice.setTargetEhrs(userEhrList);
|
|
|
return sendNotice(notice);
|
|
|
}
|
|
|
|
|
|
@@ -251,6 +288,10 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
|
|
|
notice.setTitle(title);
|
|
|
notice.setBusinessType("goodsuse");
|
|
|
notice.setTargetIds(goodsUse.getPersonId()+"");
|
|
|
+ User user = userService.getById(goodsUse.getPersonId());
|
|
|
+ List<String> userEhrList = new ArrayList<>();
|
|
|
+ userEhrList.add(user.getEhr());
|
|
|
+// notice.setTargetEhrs(userEhrList);
|
|
|
return sendNotice(notice);
|
|
|
}
|
|
|
|
|
|
@@ -286,10 +327,11 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeMapper, Notice> imp
|
|
|
notice.setDeptId(dept.getId() + "");
|
|
|
notice.setRoleId(StringUtil.join(roleIds));
|
|
|
notice.setTargetIds(StringUtil.join(userIds));
|
|
|
+// notice.setTargetEhrs(userEhrs);
|
|
|
|
|
|
- // 發送行信通知
|
|
|
+ /*// 發送行信通知
|
|
|
HangxinResultBean hangxinResultBean = hangxinUtil.sendMsg(userEhrs, "提示進度", title);
|
|
|
- System.out.println(JSONUtil.toJsonStr(hangxinResultBean));
|
|
|
+ System.out.println(JSONUtil.toJsonStr(hangxinResultBean));*/
|
|
|
return sendNotice(notice);
|
|
|
// return true;
|
|
|
}
|