fix: 制修订流程最后一个节点发消息没有人发报错BUG
This commit is contained in:
+11
-2
@@ -789,13 +789,22 @@ public class EsRevisionServiceImpl extends ServiceImpl<EsRevisionMapper, Process
|
||||
// 找到authDept字段
|
||||
JSONObject jsonObject = JSON.parseObject(businessJson);
|
||||
String authDept = jsonObject.getString("auth_dept");
|
||||
if (StrUtil.isBlank(authDept)) {
|
||||
return;
|
||||
}
|
||||
String standardNumber = jsonObject.getString("standard_number");
|
||||
String standardName = jsonObject.getString("standard_name");
|
||||
// 根据部门找到所有人员
|
||||
List<String> userIdList = new ArrayList<>();
|
||||
List<SysUser> sysUsers = sysUserDepartService.queryUserByDepIds(authDept);
|
||||
sysUsers.forEach(sysUser -> userIdList.add(sysUser.getId()));
|
||||
String[] authDeptList = authDept.split(",");
|
||||
for (String deptId : authDeptList) {
|
||||
List<SysUser> sysUsers = sysUserDepartService.queryUserByDepId(deptId);
|
||||
sysUsers.forEach(sysUser -> userIdList.add(sysUser.getId()));
|
||||
}
|
||||
// 发送消息
|
||||
if (userIdList.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
SendMessageDTO sendMessageDTO = new SendMessageDTO();
|
||||
sendMessageDTO.setTemplateCode(MessageTemplateCodeCommon.ES_REVISION_STANDARD_RELEASE);
|
||||
sendMessageDTO.setToUserId(String.join(",", userIdList));
|
||||
|
||||
Reference in New Issue
Block a user