This commit is contained in:
那些花儿
2025-12-22 17:40:41 +08:00
parent 09f6d1504a
commit d236f94489
2 changed files with 8 additions and 15 deletions
@@ -126,16 +126,6 @@ public class ActivityDeclareMineController {
""");
Cnd cnd = Cnd.NEW();
pageParam.buildSearch(cnd, "info.");
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_MEMBER_ADMIN.name())) {
SqlExpressionGroup group = new SqlExpressionGroup();
if (AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_CHAIRMAN.name(), RoleConstant.BRANCH_UNION_WENTI_SPORTS.name())) {
group.or("info.unionId", "=", SecurityUtil.getUnionId());
}
if (AuthUtil.hasRoleOr(RoleConstant.CLUB_PRESIDENT.name(), RoleConstant.CLUB_OPERATOR.name())) {
group.or("info.userId", "=", SecurityUtil.getUserId());
}
cnd.and(group);
}
if (StrUtil.isAllBlank(pageParam.getPageOrderName(), pageParam.getPageOrderBy())) {
cnd.desc("info.applyTime");
} else {
@@ -51,15 +51,18 @@ public class CommonPageParam extends PageForm {
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
cnd.and(prefix + "declareUnitName", "<>", ActivityDeclareReimbursement.SCHOOL_UNION.name());
SqlExpressionGroup group = new SqlExpressionGroup();
if (AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_CHAIRMAN.name(),
RoleConstant.BRANCH_UNION_ADMIN.name(),
RoleConstant.BRANCH_UNION_OPERATOR.name())) {
cnd.and(prefix + "unionid", "=", SecurityUtil.getUnionId());
} else if (AuthUtil.hasRoleOr(RoleConstant.CLUB_MANAGER.name(), RoleConstant.CLUB_PRESIDENT.name())) {
// cnd.and(prefix + "clubId", "=", );
} else {
cnd.andEX(prefix + "userId", "=", SecurityUtil.getUserId());
group.or(prefix + "unionid", "=", SecurityUtil.getUnionId());
}
if (AuthUtil.hasRoleOr(RoleConstant.CLUB_MANAGER.name(), RoleConstant.CLUB_PRESIDENT.name())) {
// cnd.and(prefix + "clubId", "=", );
group.or(prefix + "clubId", "in", SecurityUtil.getClubIds());
}
group.or(prefix + "userId", "=", SecurityUtil.getUserId());
cnd.and(group);
} else {
cnd.andEX(prefix + "unionId", "=", this.getUnionId());
cnd.andEX(prefix + "clubId", "=", this.getClubId());