This commit is contained in:
Paidax
2025-11-18 11:42:04 +08:00
parent ab87cbb5c9
commit 84d7e530e0
3 changed files with 10 additions and 4 deletions
@@ -60,11 +60,12 @@ public class ExecutiveCommitteeConfigController {
sun.name as unionName,
sun.unionCode ,
(SELECT count( 1 ) FROM vw_user where sun.id = unionId) as memberCount,
(SELECT count( 1 ) FROM teacher_congress_delegate where unionId =sun.id and sessionId=@sessionId) as dbCount,
0 as quotaCount
FROM
sys_union sun
ORDER BY unionCode ASC
""");
""").setParam("sessionId",sessionId);
List<NutMap> listMap = committeeConfigService.listMap(sql);
config.setUnionQuotaList(listMap);
}
@@ -124,8 +124,13 @@ public class TeacherCongressDelegatePushController {
cnd.and(group);
}
cnd.desc("info.createdAt");
if (!AuthUtil.hasRole(RoleConstant.SYSADMIN.name())) {
cnd.and("info.createdBy", "=", SecurityUtil.getUserId());
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
if (AuthUtil.hasRole(RoleConstant.UNIT_PARTY_SECRETARY.name())){
cnd.andEX("info.unionId", "=", SecurityUtil.getUnionId());
}else{
cnd.and("info.createdBy", "=", SecurityUtil.getUserId());
}
}
sql.setCondition(cnd);
Pagination<NutMap> pagination = baseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql);