yxk-20260727

在 flowNodeExpression 增加单参数方法 getUsersListByRole(roleId),用于按系统角色查询全部关联用户,不再依赖部门 ID。
流程表达式使用:
${flowNodeExpression.getUsersListByRole('2044680793306591234')}
This commit is contained in:
ye1023
2026-07-27 09:59:22 +08:00
parent e31b7dbb28
commit 8f69c3fb1d
@@ -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')}