🐛 修复自选审批节点在我的发起里面查看的 NPE 问题
(cherry picked from commit 4105af1c013af5bea824e3ac485b6b6482e06d46)
This commit is contained in:
1 parent
946dcdaf99
commit
a78682d49f
1 file changed
+12
-14
+12
-14
@@ -34,6 +34,7 @@ public class NodeFormatUtil {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 格式化流程节点显示
|
* 格式化流程节点显示
|
||||||
|
*
|
||||||
* @param node
|
* @param node
|
||||||
* @param completeNodeSet
|
* @param completeNodeSet
|
||||||
* @param continueNodeSet
|
* @param continueNodeSet
|
||||||
@@ -69,9 +70,7 @@ public class NodeFormatUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
nodeVo.setPlaceholder(node.getPlaceHolder());
|
nodeVo.setPlaceholder(node.getPlaceHolder());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
List<UserVo> userVoList = new ArrayList<>();
|
List<UserVo> userVoList = new ArrayList<>();
|
||||||
@@ -125,24 +124,25 @@ public class NodeFormatUtil {
|
|||||||
new TypeReference<>() {
|
new TypeReference<>() {
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if (CollUtil.isNotEmpty(nodeUserDtos)) {
|
||||||
List<Long> collect = nodeUserDtos.stream().map(w -> Long.valueOf(w.getId())).toList();
|
List<Long> collect = nodeUserDtos.stream().map(w -> Long.valueOf(w.getId())).toList();
|
||||||
for (Long aLong : collect) {
|
for (Long aLong : collect) {
|
||||||
UserVo userVo = buildUser(aLong);
|
UserVo userVo = buildUser(aLong);
|
||||||
userVoList.addAll(CollUtil.newArrayList(userVo));
|
userVoList.addAll(CollUtil.newArrayList(userVo));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else if (assignedType == ProcessInstanceConstant.AssignedTypeClass.USER) {
|
}
|
||||||
|
|
||||||
|
} else if (assignedType == ProcessInstanceConstant.AssignedTypeClass.USER) {
|
||||||
// 指定用户
|
// 指定用户
|
||||||
|
|
||||||
List<NodeUser> nodeUserList = node.getNodeUserList();
|
List<NodeUser> nodeUserList = node.getNodeUserList();
|
||||||
List<UserVo> tempList = buildUser(nodeUserList);
|
List<UserVo> tempList = buildUser(nodeUserList);
|
||||||
userVoList.addAll(tempList);
|
userVoList.addAll(tempList);
|
||||||
|
|
||||||
}
|
} else if (assignedType == ProcessInstanceConstant.AssignedTypeClass.FORM_USER) {
|
||||||
else if (assignedType == ProcessInstanceConstant.AssignedTypeClass.FORM_USER) {
|
|
||||||
// 表单人员
|
// 表单人员
|
||||||
String formUser = node.getFormUserId();
|
String formUser = node.getFormUserId();
|
||||||
|
|
||||||
@@ -160,20 +160,17 @@ public class NodeFormatUtil {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
} else if (assignedType == ProcessInstanceConstant.AssignedTypeClass.SELF) {
|
||||||
else if (assignedType == ProcessInstanceConstant.AssignedTypeClass.SELF) {
|
|
||||||
// 发起人自己
|
// 发起人自己
|
||||||
userVoList.addAll(CollUtil.newArrayList(buildUser(SecurityUtils.getUser().getId())));
|
userVoList.addAll(CollUtil.newArrayList(buildUser(SecurityUtils.getUser().getId())));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
} else if (Objects.equals(node.getType(), NodeTypeEnum.ROOT.getValue())) {
|
||||||
else if (Objects.equals(node.getType(), NodeTypeEnum.ROOT.getValue())) {
|
|
||||||
// 发起节点
|
// 发起节点
|
||||||
if (StrUtil.isBlank(processInstanceId)) {
|
if (StrUtil.isBlank(processInstanceId)) {
|
||||||
UserVo userVo = buildUser(SecurityUtils.getUser().getId());
|
UserVo userVo = buildUser(SecurityUtils.getUser().getId());
|
||||||
userVoList.addAll(CollUtil.newArrayList(userVo));
|
userVoList.addAll(CollUtil.newArrayList(userVo));
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
|
|
||||||
IProcessInstanceRecordService processInstanceRecordService = SpringUtil
|
IProcessInstanceRecordService processInstanceRecordService = SpringUtil
|
||||||
.getBean(IProcessInstanceRecordService.class);
|
.getBean(IProcessInstanceRecordService.class);
|
||||||
@@ -187,8 +184,7 @@ public class NodeFormatUtil {
|
|||||||
userVoList.addAll(CollUtil.newArrayList(userVo));
|
userVoList.addAll(CollUtil.newArrayList(userVo));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
} else if (node.getType() == NodeTypeEnum.CC.getValue()) {
|
||||||
else if (node.getType() == NodeTypeEnum.CC.getValue()) {
|
|
||||||
// 抄送节点
|
// 抄送节点
|
||||||
|
|
||||||
List<NodeUser> nodeUserList = node.getNodeUserList();
|
List<NodeUser> nodeUserList = node.getNodeUserList();
|
||||||
@@ -231,6 +227,7 @@ public class NodeFormatUtil {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据实例id
|
* 根据实例id
|
||||||
|
*
|
||||||
* @param processInstanceId
|
* @param processInstanceId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@@ -248,6 +245,7 @@ public class NodeFormatUtil {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据用户id
|
* 根据用户id
|
||||||
|
*
|
||||||
* @param userId
|
* @param userId
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in new issue
Block a user