|
|
@ -394,6 +394,7 @@ public class FlowableRest implements FlowableFeign { |
|
|
|
}else{ |
|
|
|
nextUserSid = nextNodeUserSidsOfSubmit.getData().getUserSid(); |
|
|
|
formVariables.put(BusinessVariables.ORGPATH, nextNodeUserSidsOfSubmit.getData().getOrgPath()); |
|
|
|
if(nextUserSid != null){ |
|
|
|
List<String> nextUserList = Arrays.asList(nextUserSid.split(",")); |
|
|
|
if(nextUserList.size() == 1){ |
|
|
|
firstSid = nextUserList.get(0); |
|
|
@ -413,6 +414,8 @@ public class FlowableRest implements FlowableFeign { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
String comment = dto.getComment(); |
|
|
|
if (StringUtils.isBlank(comment)) { |
|
|
@ -499,6 +502,24 @@ public class FlowableRest implements FlowableFeign { |
|
|
|
String id = flowElement.getId(); |
|
|
|
if (taskDefKey.equals(id) && i + 1 < flowElements.size()) { |
|
|
|
FlowElement flowElement1 = flowElements.get(i + 1); |
|
|
|
FlowElement flowElement2 = flowElements.get(i + 2); |
|
|
|
List<SysUserVo> sysUserVoLists2 = new ArrayList<>(); |
|
|
|
if (flowElement2 instanceof UserTask) { |
|
|
|
UserTask userTask = (UserTask) flowElement2; |
|
|
|
List<String> candidateGroups = userTask.getCandidateGroups(); |
|
|
|
//根据角色查询用户
|
|
|
|
for (String roleSid : candidateGroups) { |
|
|
|
UserQuery userQuery = new UserQuery(); |
|
|
|
userQuery.setRoleSid(roleSid); |
|
|
|
userQuery.setOrgSidPath(dto.getOrgSidPath()); |
|
|
|
ResultBean<List<SysUserVo>> userByRole = sysUserFeign.getUserByRole(userQuery); |
|
|
|
boolean success = userByRole.getSuccess(); |
|
|
|
if (!success) { |
|
|
|
continue; |
|
|
|
} |
|
|
|
sysUserVoLists2.addAll(userByRole.getData()); |
|
|
|
} |
|
|
|
} |
|
|
|
if (flowElement1 instanceof UserTask) { |
|
|
|
UserTask userTask = (UserTask) flowElement1; |
|
|
|
List<String> candidateGroups = userTask.getCandidateGroups(); |
|
|
@ -522,7 +543,7 @@ public class FlowableRest implements FlowableFeign { |
|
|
|
break; |
|
|
|
} |
|
|
|
//如果下一环节无用户,则默认系统管理员自动审批
|
|
|
|
if(sysUserVoLists.size() == 0 && StringUtils.isNotBlank(nextUserSid)){ |
|
|
|
if(sysUserVoLists.size() == 0 && sysUserVoLists2.size() == 1 && sysUserVoLists2.get(0).getSid().equals(nextUserSid)){ |
|
|
|
contains = true; |
|
|
|
break; |
|
|
|
} |
|
|
|