yxk-20260727
在 flowNodeExpression 增加单参数方法 getUsersListByRole(roleId),用于按系统角色查询全部关联用户,不再依赖部门 ID。
流程表达式使用:
${flowNodeExpression.getUsersListByRole('2044680793306591234')}
This commit is contained in:
+14
@@ -262,6 +262,20 @@ public class FlowNodeExpression {
|
||||
return ISysBaseAPI.getUsersListByJsonLocalAPI(json, "deptId", roleId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get username list by system role id without department filtering.
|
||||
* Example: ${flowNodeExpression.getUsersListByRole('roleIdValue')}
|
||||
*
|
||||
* @param roleId system role id
|
||||
* @return username list
|
||||
*/
|
||||
public List<String> getUsersListByRole(String roleId) {
|
||||
if (StringUtils.isBlank(roleId)) {
|
||||
return Collections.emptyList();
|
||||
}
|
||||
return sysbase.getUserByRoleIdLocalApi(roleId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get subprocess variable.
|
||||
* Example: ${flowNodeExpression.getSonProcessVariable(execution, 'subApproveUser')}
|
||||
|
||||
Reference in New Issue
Block a user