|
|
@ -501,22 +501,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; |
|
|
|
if(i+2<flowElements.size()){ |
|
|
|
FlowElement flowElement2 = flowElements.get(i + 2); |
|
|
|
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()); |
|
|
|
} |
|
|
|
sysUserVoLists2.addAll(userByRole.getData()); |
|
|
|
} |
|
|
|
} |
|
|
|
if (flowElement1 instanceof UserTask) { |
|
|
|