fix: 协会会长角色改为 协会负责人

This commit is contained in:
2026-09-11 16:24:10 +08:00
parent c5df88bd92
commit 89d3475401
46 changed files with 85 additions and 86 deletions
@@ -34,7 +34,7 @@ public class FlowClubPresidentByArgsAssignmentHandler implements AssignmentHandl
} }
CommonService commonService = ServiceContext.find(CommonService.class); CommonService commonService = ServiceContext.find(CommonService.class);
List<Sys_user> users = commonService.findUserInfoByRoleCode(Sys_user_role::getClubId, clubId, RoleConstant.CLUB_PRESIDENT); List<Sys_user> users = commonService.findUserInfoByRoleCode(Sys_user_role::getClubId, clubId, RoleConstant.CLUB_MANAGER);
if(Lang.isEmpty(users)) { if(Lang.isEmpty(users)) {
throw new BaseException("未查询到相关审批人"); throw new BaseException("未查询到相关审批人");
@@ -45,7 +45,7 @@ public class FlowClubPresidentByArgsAssignmentHandler implements AssignmentHandl
@Override @Override
public String getMessage() { public String getMessage() {
return "获取协会会长(根据args中的clubId)"; return "获取协会负责人(根据args中的clubId)";
} }
@Override @Override
@@ -206,7 +206,7 @@ public class ActivityBasicScopeController {
if (!StpUtil.hasRole(RoleConstant.SYSADMIN.name()) && !StpUtil.hasRole(RoleConstant.SCHOOL_UNION_ADMIN.name())) { if (!StpUtil.hasRole(RoleConstant.SYSADMIN.name()) && !StpUtil.hasRole(RoleConstant.SCHOOL_UNION_ADMIN.name())) {
SqlExpressionGroup group = new SqlExpressionGroup(); SqlExpressionGroup group = new SqlExpressionGroup();
group.or("creator", "=", SecurityUtil.getUserId()); group.or("creator", "=", SecurityUtil.getUserId());
if(AuthUtil.hasRole(RoleConstant.CLUB_PRESIDENT.name())) { if(AuthUtil.hasRole(RoleConstant.CLUB_MANAGER.name())) {
group.or("groupName", "like", "%社%"); group.or("groupName", "like", "%社%");
} }
cnd.and(group); cnd.and(group);
@@ -250,7 +250,7 @@ public class ActivityBasicScopeController {
addv("is_A06", StpUtil.hasRole(RoleConstant.SCHOOL_UNION_ADMIN.name())); addv("is_A06", StpUtil.hasRole(RoleConstant.SCHOOL_UNION_ADMIN.name()));
addv("is_H04", StpUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name())); addv("is_H04", StpUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name()));
addv("is_H02", StpUtil.hasRole(RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name())); addv("is_H02", StpUtil.hasRole(RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name()));
addv("is_CLUB_PRESIDENT", StpUtil.hasRole(RoleConstant.CLUB_PRESIDENT.name())); addv("is_CLUB_MANAGER", StpUtil.hasRole(RoleConstant.CLUB_MANAGER.name()));
addv("is_sysadmin", StpUtil.hasRole(RoleConstant.SYSADMIN.name())); addv("is_sysadmin", StpUtil.hasRole(RoleConstant.SYSADMIN.name()));
addv("unionid", SecurityUtil.getUnionId()); addv("unionid", SecurityUtil.getUnionId());
}}); }});
@@ -385,7 +385,7 @@ public class ActivityBasicScopeController {
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())){ if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())){
boolean isBranchUnionChairman = AuthUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name()); boolean isBranchUnionChairman = AuthUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name());
boolean isClubPresident = AuthUtil.hasRole(RoleConstant.CLUB_PRESIDENT.name()); boolean isClubPresident = AuthUtil.hasRole(RoleConstant.CLUB_MANAGER.name());
List<String> manageClubIdList = sysClubService.getMyManageClub().stream().map(SysClub::getId).toList(); List<String> manageClubIdList = sysClubService.getMyManageClub().stream().map(SysClub::getId).toList();
if (isBranchUnionChairman && isClubPresident) { if (isBranchUnionChairman && isClubPresident) {
// Users with both roles can search their union users and their managed club members. // Users with both roles can search their union users and their managed club members.
@@ -396,7 +396,7 @@ public class ActivityBasicScopeController {
} }
cnd.and(scopeGroup); cnd.and(scopeGroup);
} else if (isClubPresident) { } else if (isClubPresident) {
// Club presidents can only search members from clubs they manage. // Club managers can only search members from clubs they manage.
cnd.and("clubuser.clubid", "in", Lang.isNotEmpty(manageClubIdList) ? manageClubIdList : List.of("__EMPTY_CLUB_ID__")); cnd.and("clubuser.clubid", "in", Lang.isNotEmpty(manageClubIdList) ? manageClubIdList : List.of("__EMPTY_CLUB_ID__"));
} else { } else {
cnd.andEX("u.unionid", "=", SecurityUtil.getUnionId()); cnd.andEX("u.unionid", "=", SecurityUtil.getUnionId());
@@ -131,7 +131,7 @@ public class ActivityCultureServiceImpl extends BaseServiceImpl<ActivityTissue>
if (AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_ADMIN.name(), RoleConstant.BRANCH_UNION_CHAIRMAN.name())) { if (AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_ADMIN.name(), RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
group.or("tissue.unionId", "=", SecurityUtil.getUnionId()); group.or("tissue.unionId", "=", SecurityUtil.getUnionId());
} }
if (AuthUtil.hasRole(RoleConstant.CLUB_PRESIDENT.name())) { if (AuthUtil.hasRole(RoleConstant.CLUB_MANAGER.name())) {
List<SysClub> myManageClub = sysClubService.getMyManageClub(); List<SysClub> myManageClub = sysClubService.getMyManageClub();
List<String> clubIds = myManageClub.stream().map(SysClub::getId).collect(Collectors.toList()); List<String> clubIds = myManageClub.stream().map(SysClub::getId).collect(Collectors.toList());
group.or("tissue.clubId", "in", clubIds); group.or("tissue.clubId", "in", clubIds);
@@ -57,7 +57,7 @@ public class CommonPageParam extends PageForm {
RoleConstant.BRANCH_UNION_OPERATOR.name())) { RoleConstant.BRANCH_UNION_OPERATOR.name())) {
group.or(prefix + "unionid", "=", SecurityUtil.getUnionId()); group.or(prefix + "unionid", "=", SecurityUtil.getUnionId());
} }
if (AuthUtil.hasRoleOr(RoleConstant.CLUB_MANAGER.name(), RoleConstant.CLUB_PRESIDENT.name())) { if (AuthUtil.hasRoleOr(RoleConstant.CLUB_MANAGER.name())) {
// cnd.and(prefix + "clubId", "=", ); // cnd.and(prefix + "clubId", "=", );
group.or(prefix + "clubId", "in", SecurityUtil.getClubIds()); group.or(prefix + "clubId", "in", SecurityUtil.getClubIds());
} }
@@ -145,7 +145,7 @@ public class YearPlanController {
@SaCheckPermission("planSummary.yearPlan.manage") @SaCheckPermission("planSummary.yearPlan.manage")
public Result queryClub() { public Result queryClub() {
Cnd cnd = Cnd.NEW(); Cnd cnd = Cnd.NEW();
if(!AuthUtil.hasRole(RoleConstant.SYSADMIN.name()) && AuthUtil.hasRole(RoleConstant.CLUB_PRESIDENT.name())) { if(!AuthUtil.hasRole(RoleConstant.SYSADMIN.name()) && AuthUtil.hasRole(RoleConstant.CLUB_MANAGER.name())) {
List<SysClub> clubList = sysClubService.getMyManageClub(); List<SysClub> clubList = sysClubService.getMyManageClub();
List<String> list = clubList.stream().map(SysClub::getId).toList(); List<String> list = clubList.stream().map(SysClub::getId).toList();
cnd.and(SysClub::getId, "in", list); cnd.and(SysClub::getId, "in", list);
@@ -71,7 +71,7 @@ public class YearPlanServiceImpl extends BaseServiceImpl<YearPlan> implements Ye
if(AuthUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name())) { if(AuthUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
group.or("yp.tissueId", "=", SecurityUtil.getUnionId()); group.or("yp.tissueId", "=", SecurityUtil.getUnionId());
} }
if(AuthUtil.hasRole(RoleConstant.CLUB_PRESIDENT.name())) { if(AuthUtil.hasRole(RoleConstant.CLUB_MANAGER.name())) {
List<SysClub> clubList = sysClubService.getMyManageClub(); List<SysClub> clubList = sysClubService.getMyManageClub();
List<String> list = clubList.stream().map(SysClub::getId).toList(); List<String> list = clubList.stream().map(SysClub::getId).toList();
group.or("yp.tissueId", "in", list); group.or("yp.tissueId", "in", list);
@@ -68,7 +68,7 @@ public class YearSummaryServiceImpl extends BaseServiceImpl<YearSummary> impleme
if(AuthUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name())) { if(AuthUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
group.or("ys.tissueId", "=", SecurityUtil.getUnionId()); group.or("ys.tissueId", "=", SecurityUtil.getUnionId());
} }
if(AuthUtil.hasRole(RoleConstant.CLUB_PRESIDENT.name())) { if(AuthUtil.hasRole(RoleConstant.CLUB_MANAGER.name())) {
List<SysClub> clubList = sysClubService.getMyManageClub(); List<SysClub> clubList = sysClubService.getMyManageClub();
List<String> list = clubList.stream().map(SysClub::getId).toList(); List<String> list = clubList.stream().map(SysClub::getId).toList();
group.or("ys.tissueId", "in", list); group.or("ys.tissueId", "in", list);
@@ -132,7 +132,7 @@ public class TrainSignUpActivityStatisticsController {
result.add(activity); result.add(activity);
} }
} }
if(AuthUtil.hasRoleOr(RoleConstant.CLUB_PRESIDENT.name(), RoleConstant.CLUB_OPERATOR.name())) { if(AuthUtil.hasRoleOr(RoleConstant.CLUB_MANAGER.name(), RoleConstant.CLUB_OPERATOR.name())) {
if(clubIds.stream().anyMatch(activity.getHostUnits()::contains) || clubIds.stream().anyMatch(activity.getHelpUnits()::contains)) { if(clubIds.stream().anyMatch(activity.getHostUnits()::contains) || clubIds.stream().anyMatch(activity.getHelpUnits()::contains)) {
result.add(activity); result.add(activity);
} }
@@ -63,7 +63,7 @@ public class ClubUserMineClubController {
FROM FROM
sys_club club sys_club club
LEFT JOIN club_user uc ON club.id = uc.clubId LEFT JOIN club_user uc ON club.id = uc.clubId
LEFT JOIN club_user presidentCu ON presidentCu.clubId = club.id AND JSON_CONTAINS(presidentCu.roleCode, '"CLUB_PRESIDENT"') LEFT JOIN club_user presidentCu ON presidentCu.clubId = club.id AND JSON_CONTAINS(presidentCu.roleCode, '"CLUB_MANAGER"')
LEFT JOIN sys_user presidentUser ON presidentUser.id = presidentCu.userId LEFT JOIN sys_user presidentUser ON presidentUser.id = presidentCu.userId
LEFT JOIN club_user secretaryCu ON secretaryCu.clubId = club.id AND JSON_CONTAINS(secretaryCu.roleCode, '"CLUB_SECRETARY"') LEFT JOIN club_user secretaryCu ON secretaryCu.clubId = club.id AND JSON_CONTAINS(secretaryCu.roleCode, '"CLUB_SECRETARY"')
LEFT JOIN sys_user secretaryUser ON secretaryUser.id = secretaryCu.userId LEFT JOIN sys_user secretaryUser ON secretaryUser.id = secretaryCu.userId
@@ -62,7 +62,7 @@ public class ClubCommonController {
public Result listClubByRole() { public Result listClubByRole() {
Cnd cnd = Cnd.NEW(); Cnd cnd = Cnd.NEW();
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) { if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
Sys_role sysRole = sysRoleService.getByCode(RoleConstant.CLUB_PRESIDENT); Sys_role sysRole = sysRoleService.getByCode(RoleConstant.CLUB_MANAGER);
List<Sys_user_role> userRoles = sysClubService.dao().query(Sys_user_role.class, Cnd.where("userId", "=", SecurityUtil.getUserId()).and("roleId", "=", sysRole.getId())); List<Sys_user_role> userRoles = sysClubService.dao().query(Sys_user_role.class, Cnd.where("userId", "=", SecurityUtil.getUserId()).and("roleId", "=", sysRole.getId()));
List<String> myClubId = userRoles.stream().map(Sys_user_role::getClubId).toList(); List<String> myClubId = userRoles.stream().map(Sys_user_role::getClubId).toList();
cnd.and("c.id", "in", myClubId); cnd.and("c.id", "in", myClubId);
@@ -63,7 +63,7 @@ public class ClubEvaluateClubAuditController {
@At @At
@Aop(TransAop.READ_COMMITTED) @Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("club.evaluate.clubAudit") @SaCheckPermission("club.evaluate.clubAudit")
@SLog(tag = "协会管理系统-协会评优", msg = "会长审核评优申请") @SLog(tag = "协会管理系统-协会评优", msg = "协会负责人审核评优申请")
public Result approval(@Valid @Param("approval") BpmTaskApprovalParam approvalParam) { public Result approval(@Valid @Param("approval") BpmTaskApprovalParam approvalParam) {
approvalParam.getBpmTaskApprovalTypeEnum(); approvalParam.getBpmTaskApprovalTypeEnum();
Map<String, Object> variables = BeanUtil.beanToMap(approvalParam); Map<String, Object> variables = BeanUtil.beanToMap(approvalParam);
@@ -80,7 +80,7 @@ public class ClubEvaluateClubAuditController {
@At @At
@Aop(TransAop.READ_COMMITTED) @Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("club.evaluate.clubAudit") @SaCheckPermission("club.evaluate.clubAudit")
@SLog(tag = "协会管理系统-协会评优", msg = "会长撤回评优申请") @SLog(tag = "协会管理系统-协会评优", msg = "协会负责人撤回评优申请")
public Result revoke(@Valid String taskId) { public Result revoke(@Valid String taskId) {
bpmService.revokeTask(taskId); bpmService.revokeTask(taskId);
return Result.success(); return Result.success();
@@ -57,7 +57,7 @@ public class ClubExamineClubAuditController {
@At @At
@Aop(TransAop.READ_COMMITTED) @Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("club.examine.clubAudit") @SaCheckPermission("club.examine.clubAudit")
@SLog(tag = "协会管理系统-协会年审", msg = "会长审核年度考核") @SLog(tag = "协会管理系统-协会年审", msg = "协会负责人审核年度考核")
public Result approval(@Valid @Param("approval") BpmTaskApprovalParam approvalParam) { public Result approval(@Valid @Param("approval") BpmTaskApprovalParam approvalParam) {
approvalParam.getBpmTaskApprovalTypeEnum(); approvalParam.getBpmTaskApprovalTypeEnum();
Map<String, Object> variables = BeanUtil.beanToMap(approvalParam); Map<String, Object> variables = BeanUtil.beanToMap(approvalParam);
@@ -74,7 +74,7 @@ public class ClubExamineClubAuditController {
@At @At
@Aop(TransAop.READ_COMMITTED) @Aop(TransAop.READ_COMMITTED)
@SaCheckPermission("club.examine.clubAudit") @SaCheckPermission("club.examine.clubAudit")
@SLog(tag = "协会管理系统-协会年审", msg = "会长撤回年度考核") @SLog(tag = "协会管理系统-协会年审", msg = "协会负责人撤回年度考核")
public Result revoke(@Valid String taskId) { public Result revoke(@Valid String taskId) {
bpmService.revokeTask(taskId); bpmService.revokeTask(taskId);
return Result.success(); return Result.success();
@@ -196,12 +196,12 @@ public class ClubInfoManageController {
@SLog(tag = "协会管理系统-信息管理", msg = "修改身份") @SLog(tag = "协会管理系统-信息管理", msg = "修改身份")
public Result updateRoleCode(@Param("id") String id, @Valid String[] roleCodes, @Valid String clubId) { public Result updateRoleCode(@Param("id") String id, @Valid String[] roleCodes, @Valid String clubId) {
List<String> roleCodeList = Arrays.asList(roleCodes); List<String> roleCodeList = Arrays.asList(roleCodes);
//查询社团是否存在会长或者秘书长 //查询社团是否存在协会负责人或者秘书长
if(Arrays.asList(roleCodes).contains(RoleConstant.CLUB_PRESIDENT.name())) { if(Arrays.asList(roleCodes).contains(RoleConstant.CLUB_MANAGER.name())) {
int count = dao.count(ClubUser.class, Cnd.where("clubId", "=", clubId) int count = dao.count(ClubUser.class, Cnd.where("clubId", "=", clubId)
.and(new Static("JSON_CONTAINS(roleCode, '\"%s\"')".formatted(RoleConstant.CLUB_PRESIDENT.name())))); .and(new Static("JSON_CONTAINS(roleCode, '\"%s\"')".formatted(RoleConstant.CLUB_MANAGER.name()))));
if (count > 0) { if (count > 0) {
// return Result.error("会长只能有一位"); // return Result.error("协会负责人只能有一位");
} }
} }
if(Arrays.asList(roleCodes).contains(RoleConstant.CLUB_SECRETARY.name())) { if(Arrays.asList(roleCodes).contains(RoleConstant.CLUB_SECRETARY.name())) {
@@ -272,12 +272,12 @@ public class ClubInfoManageController {
@SLog(tag = "协会管理系统-信息管理", msg = "添加协会成员") @SLog(tag = "协会管理系统-信息管理", msg = "添加协会成员")
public Result userDoAdd(@Valid String clubId, @Valid String[] users, @Valid String roleCode, @Valid Boolean payed) { public Result userDoAdd(@Valid String clubId, @Valid String[] users, @Valid String roleCode, @Valid Boolean payed) {
//查询社团是否存在会长或者秘书长 //查询社团是否存在协会负责人或者秘书长
if (List.of(RoleConstant.CLUB_PRESIDENT.name(), RoleConstant.CLUB_SECRETARY.name()).contains(roleCode)) { if (List.of(RoleConstant.CLUB_MANAGER.name(), RoleConstant.CLUB_SECRETARY.name()).contains(roleCode)) {
int count = clubInfoManageService.dao().count(ClubUser.class, Cnd.where("clubId", "=", clubId) int count = clubInfoManageService.dao().count(ClubUser.class, Cnd.where("clubId", "=", clubId)
.and(new Static("JSON_CONTAINS(roleCode, '\"%s\"')".formatted(roleCode)))); .and(new Static("JSON_CONTAINS(roleCode, '\"%s\"')".formatted(roleCode))));
if (count > 0) { if (count > 0) {
return Result.error((Objects.equals(roleCode, RoleConstant.CLUB_PRESIDENT.name()) ? "会长" : "秘书长") + "只能有一位"); return Result.error((Objects.equals(roleCode, RoleConstant.CLUB_MANAGER.name()) ? "协会负责人" : "秘书长") + "只能有一位");
} }
} }
Sys_role sysRole = sysRoleService.getByCode(roleCode); Sys_role sysRole = sysRoleService.getByCode(roleCode);
@@ -295,7 +295,7 @@ public class ClubInfoManageController {
ClubUser clubUser = dao.fetch(ClubUser.class, Cnd.where("clubId", "=", clubId).and("userId", "=", user)); ClubUser clubUser = dao.fetch(ClubUser.class, Cnd.where("clubId", "=", clubId).and("userId", "=", user));
if(clubUser != null) { if(clubUser != null) {
List<String> roleCodeList = clubUser.getRoleCode(); List<String> roleCodeList = clubUser.getRoleCode();
if (List.of(RoleConstant.CLUB_MANAGER.name(), RoleConstant.CLUB_PRESIDENT.name(), RoleConstant.CLUB_VICE_PRESIDENT.name(), RoleConstant.CLUB_SECRETARY.name(), RoleConstant.CLUB_VICE_SECRETARY.name(), RoleConstant.CLUB_OPERATOR.name()).contains(roleCode)) { if (List.of(RoleConstant.CLUB_MANAGER.name(), RoleConstant.CLUB_VICE_PRESIDENT.name(), RoleConstant.CLUB_SECRETARY.name(), RoleConstant.CLUB_VICE_SECRETARY.name(), RoleConstant.CLUB_OPERATOR.name()).contains(roleCode)) {
roleCodeList.remove(RoleConstant.CLUB_MEMBER.name()); roleCodeList.remove(RoleConstant.CLUB_MEMBER.name());
} }
if(!roleCodeList.contains(roleCode)) { if(!roleCodeList.contains(roleCode)) {
@@ -98,7 +98,7 @@ public class ClubStatisticsController {
cnd.and("id", auditState ? "in" : "not in", registers.stream().map(SysClubExamineRegister::getClubId).toList()); cnd.and("id", auditState ? "in" : "not in", registers.stream().map(SysClubExamineRegister::getClubId).toList());
}*/ }*/
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name())) { if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name())) {
Sys_role sysRole = sysRoleService.getByCode(RoleConstant.CLUB_PRESIDENT); Sys_role sysRole = sysRoleService.getByCode(RoleConstant.CLUB_MANAGER);
List<Sys_user_role> userRoles = sysClubService.dao().query(Sys_user_role.class, Cnd.where("userId", "=", SecurityUtil.getUserId()).and("roleId", "=", sysRole.getId())); List<Sys_user_role> userRoles = sysClubService.dao().query(Sys_user_role.class, Cnd.where("userId", "=", SecurityUtil.getUserId()).and("roleId", "=", sysRole.getId()));
List<String> myClubId = userRoles.stream().map(Sys_user_role::getClubId).toList(); List<String> myClubId = userRoles.stream().map(Sys_user_role::getClubId).toList();
cnd.and("id", "in", myClubId); cnd.and("id", "in", myClubId);
@@ -136,7 +136,7 @@ public class ClubStatisticsController {
$condition $condition
ORDER BY ORDER BY
CASE CASE
WHEN JSON_CONTAINS(c.roleCode, '"CLUB_PRESIDENT"') THEN 1 WHEN JSON_CONTAINS(c.roleCode, '"CLUB_MANAGER"') THEN 1
WHEN JSON_CONTAINS(c.roleCode, '"CLUB_VICE_PRESIDENT"') THEN 2 WHEN JSON_CONTAINS(c.roleCode, '"CLUB_VICE_PRESIDENT"') THEN 2
WHEN JSON_CONTAINS(c.roleCode, '"CLUB_SECRETARY"') THEN 3 WHEN JSON_CONTAINS(c.roleCode, '"CLUB_SECRETARY"') THEN 3
WHEN JSON_CONTAINS(c.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4 WHEN JSON_CONTAINS(c.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4
@@ -186,7 +186,7 @@ public class ClubStatisticsController {
$condition $condition
ORDER BY ORDER BY
CASE CASE
WHEN JSON_CONTAINS(c.roleCode, '"CLUB_PRESIDENT"') THEN 1 WHEN JSON_CONTAINS(c.roleCode, '"CLUB_MANAGER"') THEN 1
WHEN JSON_CONTAINS(c.roleCode, '"CLUB_VICE_PRESIDENT"') THEN 2 WHEN JSON_CONTAINS(c.roleCode, '"CLUB_VICE_PRESIDENT"') THEN 2
WHEN JSON_CONTAINS(c.roleCode, '"CLUB_SECRETARY"') THEN 3 WHEN JSON_CONTAINS(c.roleCode, '"CLUB_SECRETARY"') THEN 3
WHEN JSON_CONTAINS(c.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4 WHEN JSON_CONTAINS(c.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4
@@ -196,7 +196,7 @@ public class ClubStatisticsController {
"""); """);
Cnd cnd = Cnd.NEW(); Cnd cnd = Cnd.NEW();
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name())) { if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name())) {
Sys_role sysRole = sysRoleService.getByCode(RoleConstant.CLUB_PRESIDENT); Sys_role sysRole = sysRoleService.getByCode(RoleConstant.CLUB_MANAGER);
List<Sys_user_role> userRoles = sysClubService.dao().query(Sys_user_role.class, Cnd.where("userId", "=", SecurityUtil.getUserId()).and("roleId", "=", sysRole.getId())); List<Sys_user_role> userRoles = sysClubService.dao().query(Sys_user_role.class, Cnd.where("userId", "=", SecurityUtil.getUserId()).and("roleId", "=", sysRole.getId()));
List<String> myClubId = userRoles.stream().map(Sys_user_role::getClubId).toList(); List<String> myClubId = userRoles.stream().map(Sys_user_role::getClubId).toList();
cnd.and("c.clubId", "in", myClubId); cnd.and("c.clubId", "in", myClubId);
@@ -371,7 +371,7 @@ public class ClubStatisticsController {
sum( CASE WHEN su.userState in ('退休') $myCondition THEN 1 ELSE 0 END ) AS retire, sum( CASE WHEN su.userState in ('退休') $myCondition THEN 1 ELSE 0 END ) AS retire,
sum( CASE WHEN su.sex like '%男%' $myCondition THEN 1 ELSE 0 END ) AS man, sum( CASE WHEN su.sex like '%男%' $myCondition THEN 1 ELSE 0 END ) AS man,
sum( CASE WHEN su.sex like '%女%' $myCondition THEN 1 ELSE 0 END ) AS woman, sum( CASE WHEN su.sex like '%女%' $myCondition THEN 1 ELSE 0 END ) AS woman,
sum( CASE WHEN ('CLUB_PRESIDENT' MEMBER OF (cu.roleCode) or 'CLUB_VICE_PRESIDENT' MEMBER OF (cu.roleCode) or 'CLUB_SECRETARY' MEMBER OF (cu.roleCode) or 'CLUB_VICE_SECRETARY' MEMBER OF (cu.roleCode)) AND 1 = 1 $myCondition THEN 1 ELSE 0 END ) AS governing_body sum( CASE WHEN ('CLUB_MANAGER' MEMBER OF (cu.roleCode) or 'CLUB_VICE_PRESIDENT' MEMBER OF (cu.roleCode) or 'CLUB_SECRETARY' MEMBER OF (cu.roleCode) or 'CLUB_VICE_SECRETARY' MEMBER OF (cu.roleCode)) AND 1 = 1 $myCondition THEN 1 ELSE 0 END ) AS governing_body
FROM FROM
sys_club club sys_club club
LEFT JOIN club_user cu ON cu.clubId = club.id LEFT JOIN club_user cu ON cu.clubId = club.id
@@ -389,7 +389,7 @@ public class ClubStatisticsController {
cnd.and("club.id", auditState ? "in" : "not in", businessNoList); cnd.and("club.id", auditState ? "in" : "not in", businessNoList);
} }
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name())) { if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name())) {
Sys_role sysRole = sysRoleService.getByCode(RoleConstant.CLUB_PRESIDENT); Sys_role sysRole = sysRoleService.getByCode(RoleConstant.CLUB_MANAGER);
List<Sys_user_role> userRoles = sysClubService.dao().query(Sys_user_role.class, Cnd.where("userId", "=", SecurityUtil.getUserId()).and("roleId", "=", sysRole.getId())); List<Sys_user_role> userRoles = sysClubService.dao().query(Sys_user_role.class, Cnd.where("userId", "=", SecurityUtil.getUserId()).and("roleId", "=", sysRole.getId()));
List<String> myClubId = userRoles.stream().map(Sys_user_role::getClubId).toList(); List<String> myClubId = userRoles.stream().map(Sys_user_role::getClubId).toList();
cnd.and("club.id", "in", myClubId); cnd.and("club.id", "in", myClubId);
@@ -108,7 +108,7 @@ public class SysClubExamineServiceImpl extends BaseServiceImpl<SysClubExamineReg
AND NOT JSON_CONTAINS(cl.roleCode, '"CLUB_MEMBER"') AND NOT JSON_CONTAINS(cl.roleCode, '"CLUB_MEMBER"')
ORDER BY ORDER BY
CASE CASE
WHEN JSON_CONTAINS(cl.roleCode, '"CLUB_PRESIDENT"') THEN 1 WHEN JSON_CONTAINS(cl.roleCode, '"CLUB_MANAGER"') THEN 1
WHEN JSON_CONTAINS(cl.roleCode, '"CLUB_VICE_PRESIDENT"') THEN 2 WHEN JSON_CONTAINS(cl.roleCode, '"CLUB_VICE_PRESIDENT"') THEN 2
WHEN JSON_CONTAINS(cl.roleCode, '"CLUB_SECRETARY"') THEN 3 WHEN JSON_CONTAINS(cl.roleCode, '"CLUB_SECRETARY"') THEN 3
WHEN JSON_CONTAINS(cl.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4 WHEN JSON_CONTAINS(cl.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4
@@ -86,7 +86,7 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
GROUP_CONCAT(secretaryUser.username) AS clubSecretary GROUP_CONCAT(secretaryUser.username) AS clubSecretary
FROM FROM
sys_club c sys_club c
LEFT JOIN club_user presidentCu on presidentCu.clubId = c.id AND JSON_CONTAINS(presidentCu.roleCode, '"CLUB_PRESIDENT"') LEFT JOIN club_user presidentCu on presidentCu.clubId = c.id AND JSON_CONTAINS(presidentCu.roleCode, '"CLUB_MANAGER"')
LEFT JOIN sys_user presidentUser on presidentUser.id = presidentCu.userId LEFT JOIN sys_user presidentUser on presidentUser.id = presidentCu.userId
LEFT JOIN club_user secretaryCu on secretaryCu.clubId = c.id AND JSON_CONTAINS(secretaryCu.roleCode, '"CLUB_SECRETARY"') LEFT JOIN club_user secretaryCu on secretaryCu.clubId = c.id AND JSON_CONTAINS(secretaryCu.roleCode, '"CLUB_SECRETARY"')
LEFT JOIN sys_user secretaryUser on secretaryUser.id = secretaryCu.userId LEFT JOIN sys_user secretaryUser on secretaryUser.id = secretaryCu.userId
@@ -115,7 +115,7 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
cnd.and("ins.state", "=", ProcessInstanceStateEnum.FINISHED.getCode()); cnd.and("ins.state", "=", ProcessInstanceStateEnum.FINISHED.getCode());
// 校工会主席在协会管理界面按校级管理角色查看全部协会。 // 校工会主席在协会管理界面按校级管理角色查看全部协会。
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name(), RoleConstant.SCHOOL_UNION_CHAIRMAN.name())) { if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name(), RoleConstant.SCHOOL_UNION_CHAIRMAN.name())) {
List<String> roleList = commonService.findUserRoleByRoleCode(List.of(RoleConstant.CLUB_MANAGER.name(), RoleConstant.CLUB_PRESIDENT.name(), RoleConstant.CLUB_VICE_PRESIDENT.name(), RoleConstant.CLUB_SECRETARY.name(), RoleConstant.CLUB_VICE_SECRETARY.name(), RoleConstant.CLUB_OPERATOR.name())); List<String> roleList = commonService.findUserRoleByRoleCode(List.of(RoleConstant.CLUB_MANAGER.name(), RoleConstant.CLUB_VICE_PRESIDENT.name(), RoleConstant.CLUB_SECRETARY.name(), RoleConstant.CLUB_VICE_SECRETARY.name(), RoleConstant.CLUB_OPERATOR.name()));
List<Sys_user_role> clubList = dao().query(Sys_user_role.class, Cnd.where("roleId", "in", roleList).and("userId", "=", SecurityUtil.getUserId()).and("clubId", "is not", null)); List<Sys_user_role> clubList = dao().query(Sys_user_role.class, Cnd.where("roleId", "in", roleList).and("userId", "=", SecurityUtil.getUserId()).and("clubId", "is not", null));
List<String> clubIdList = clubList.stream().map(Sys_user_role::getClubId).toList(); List<String> clubIdList = clubList.stream().map(Sys_user_role::getClubId).toList();
@@ -167,7 +167,7 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
sql.setVar("order", """ sql.setVar("order", """
ORDER BY ORDER BY
CASE CASE
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_PRESIDENT"') THEN 1 WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_MANAGER"') THEN 1
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_PRESIDENT"') THEN 2 WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_PRESIDENT"') THEN 2
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_SECRETARY"') THEN 3 WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_SECRETARY"') THEN 3
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4 WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4
@@ -261,7 +261,7 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
FROM FROM
sys_club c sys_club c
LEFT JOIN club_user scu ON scu.clubId = c.id LEFT JOIN club_user scu ON scu.clubId = c.id
AND JSON_CONTAINS(scu.roleCode, '"CLUB_PRESIDENT"') AND JSON_CONTAINS(scu.roleCode, '"CLUB_MANAGER"')
LEFT JOIN vw_user u ON u.id = scu.userId LEFT JOIN vw_user u ON u.id = scu.userId
WHERE WHERE
c.id = @clubId c.id = @clubId
@@ -288,7 +288,7 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
WHERE scu.clubId = @clubId WHERE scu.clubId = @clubId
ORDER BY ORDER BY
CASE CASE
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_PRESIDENT"') THEN 1 WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_MANAGER"') THEN 1
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_PRESIDENT"') THEN 2 WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_PRESIDENT"') THEN 2
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_SECRETARY"') THEN 3 WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_SECRETARY"') THEN 3
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4 WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4
@@ -68,7 +68,7 @@ public class SysClubServiceImpl extends BaseServiceImpl<SysClub> implements SysC
SELECT SELECT
club.*, club.*,
u.username as concatPersonName, u.username as concatPersonName,
(select GROUP_CONCAT(username) from sys_user where id in (select userId from club_user u where u.clubId=club.id and JSON_CONTAINS(u.roleCode, '"CLUB_PRESIDENT"'))) as clubLeader, (select GROUP_CONCAT(username) from sys_user where id in (select userId from club_user u where u.clubId=club.id and JSON_CONTAINS(u.roleCode, '"CLUB_MANAGER"'))) as clubLeader,
(select GROUP_CONCAT(username) from sys_user where id in (select userId from club_user u where u.clubId=club.id and JSON_CONTAINS(u.roleCode, '"CLUB_SECRETARY"'))) as clubSecretary, (select GROUP_CONCAT(username) from sys_user where id in (select userId from club_user u where u.clubId=club.id and JSON_CONTAINS(u.roleCode, '"CLUB_SECRETARY"'))) as clubSecretary,
(SELECT count( DISTINCT scu.userId ) FROM club_user scu WHERE scu.clubId = club.id ) currentPeopleNum (SELECT count( DISTINCT scu.userId ) FROM club_user scu WHERE scu.clubId = club.id ) currentPeopleNum
FROM FROM
@@ -116,7 +116,7 @@ public class SysClubServiceImpl extends BaseServiceImpl<SysClub> implements SysC
// 校工会主席在协会管理界面按校级管理角色查看全部协会。 // 校工会主席在协会管理界面按校级管理角色查看全部协会。
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name(), RoleConstant.SCHOOL_UNION_CHAIRMAN.name())) { if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name(), RoleConstant.SCHOOL_UNION_CHAIRMAN.name())) {
List<String> roleList = commonService.findUserRoleByRoleCode(List.of(RoleConstant.CLUB_PRESIDENT.name(), RoleConstant.CLUB_VICE_PRESIDENT.name(), RoleConstant.CLUB_SECRETARY.name(), RoleConstant.CLUB_VICE_SECRETARY.name(),RoleConstant.CLUB_OPERATOR.name())); List<String> roleList = commonService.findUserRoleByRoleCode(List.of(RoleConstant.CLUB_MANAGER.name(), RoleConstant.CLUB_VICE_PRESIDENT.name(), RoleConstant.CLUB_SECRETARY.name(), RoleConstant.CLUB_VICE_SECRETARY.name(),RoleConstant.CLUB_OPERATOR.name()));
List<Sys_user_role> clubList = dao().query(Sys_user_role.class, Cnd.where("roleId", "in", roleList).and("userId", "=", SecurityUtil.getUserId()).and("clubId", "is not", null)); List<Sys_user_role> clubList = dao().query(Sys_user_role.class, Cnd.where("roleId", "in", roleList).and("userId", "=", SecurityUtil.getUserId()).and("clubId", "is not", null));
List<String> clubIdList = clubList.stream().map(Sys_user_role::getClubId).toList(); List<String> clubIdList = clubList.stream().map(Sys_user_role::getClubId).toList();
@@ -150,7 +150,7 @@ public class SysClubServiceImpl extends BaseServiceImpl<SysClub> implements SysC
cnd.and("instance.state", "=", ProcessInstanceStateEnum.FINISHED.getCode()); cnd.and("instance.state", "=", ProcessInstanceStateEnum.FINISHED.getCode());
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name())) { if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name())) {
cnd.and("ur.userId", "=", SecurityUtil.getUserId()); cnd.and("ur.userId", "=", SecurityUtil.getUserId());
List<String> roleList = commonService.findUserRoleByRoleCode(List.of(RoleConstant.CLUB_PRESIDENT.name(), RoleConstant.CLUB_VICE_PRESIDENT.name(), RoleConstant.CLUB_SECRETARY.name(), RoleConstant.CLUB_VICE_SECRETARY.name(), RoleConstant.CLUB_OPERATOR.name())); List<String> roleList = commonService.findUserRoleByRoleCode(List.of(RoleConstant.CLUB_MANAGER.name(), RoleConstant.CLUB_VICE_PRESIDENT.name(), RoleConstant.CLUB_SECRETARY.name(), RoleConstant.CLUB_VICE_SECRETARY.name(), RoleConstant.CLUB_OPERATOR.name()));
cnd.and("ur.roleId", "in", roleList); cnd.and("ur.roleId", "in", roleList);
} }
cnd.and("ex.year", "=", year); cnd.and("ex.year", "=", year);
@@ -73,7 +73,7 @@ public class SysClubUserServiceImpl extends BaseServiceImpl<ClubUser> implements
WHERE scu.clubId = @clubId WHERE scu.clubId = @clubId
ORDER BY ORDER BY
CASE CASE
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_PRESIDENT"') THEN 1 WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_MANAGER"') THEN 1
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_PRESIDENT"') THEN 2 WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_PRESIDENT"') THEN 2
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_SECRETARY"') THEN 3 WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_SECRETARY"') THEN 3
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4 WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4
@@ -128,7 +128,7 @@ public class SysClubUserServiceImpl extends BaseServiceImpl<ClubUser> implements
@Override @Override
public String getClubLeader(String clubId) { public String getClubLeader(String clubId) {
List<Sys_user> userList = commonService.findUserInfoByRoleCode("clubId", clubId, RoleConstant.CLUB_PRESIDENT.name()); List<Sys_user> userList = commonService.findUserInfoByRoleCode("clubId", clubId, RoleConstant.CLUB_MANAGER.name());
return userList.stream().map(Sys_user::getLoginname).collect(Collectors.joining(",")); return userList.stream().map(Sys_user::getLoginname).collect(Collectors.joining(","));
} }
@@ -138,7 +138,7 @@ public class ArticleFirstExamineController {
} }
assignments.add(branchUnionApprovalLoginName); assignments.add(branchUnionApprovalLoginName);
} else if (result.equals("BACK_TO_CLUB")) { } else if (result.equals("BACK_TO_CLUB")) {
String branchClubApprovalLoginName = commonService.findUserLoginNameByRoleCode(RoleConstant.CLUB_PRESIDENT, Cnd.where(Sys_user_role::getClubId, "=", article.getClubId())); String branchClubApprovalLoginName = commonService.findUserLoginNameByRoleCode(RoleConstant.CLUB_MANAGER, Cnd.where(Sys_user_role::getClubId, "=", article.getClubId()));
if (StrUtil.isBlank(branchClubApprovalLoginName)) { if (StrUtil.isBlank(branchClubApprovalLoginName)) {
return Result.error("协会未配置审批人,请联系协会!"); return Result.error("协会未配置审批人,请联系协会!");
} }
@@ -157,7 +157,7 @@ public class ActivityBudgetApplyController {
public Result listClub(){ public Result listClub(){
Cnd cnd = Cnd.NEW(); Cnd cnd = Cnd.NEW();
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) { if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
Sys_role sysRole = sysRoleService.getByCode(RoleConstant.CLUB_PRESIDENT); Sys_role sysRole = sysRoleService.getByCode(RoleConstant.CLUB_MANAGER);
List<Sys_user_role> userRoles = sysClubService.dao().query(Sys_user_role.class, Cnd.where("userId", "=", SecurityUtil.getUserId()).and("roleId", "=", sysRole.getId())); List<Sys_user_role> userRoles = sysClubService.dao().query(Sys_user_role.class, Cnd.where("userId", "=", SecurityUtil.getUserId()).and("roleId", "=", sysRole.getId()));
List<String> myClubId = userRoles.stream().map(Sys_user_role::getClubId).toList(); List<String> myClubId = userRoles.stream().map(Sys_user_role::getClubId).toList();
cnd.and("id", "in", myClubId); cnd.and("id", "in", myClubId);
@@ -99,7 +99,7 @@ public class ActivityBudgetServiceImpl extends BaseServiceImpl<ActivityBudget> i
group1.and("info.unionId", "=", SecurityUtil.getUnionId()); group1.and("info.unionId", "=", SecurityUtil.getUnionId());
group.or(group1); group.or(group1);
} }
if (AuthUtil.hasRoleOr(RoleConstant.CLUB_PRESIDENT.name(), RoleConstant.CLUB_SECRETARY.name())) { if (AuthUtil.hasRoleOr(RoleConstant.CLUB_MANAGER.name(), RoleConstant.CLUB_SECRETARY.name())) {
List<SysClub> myManageClub = sysClubService.getMyManageClub(); List<SysClub> myManageClub = sysClubService.getMyManageClub();
List<String> clubIds = myManageClub.stream().map(SysClub::getId).toList(); List<String> clubIds = myManageClub.stream().map(SysClub::getId).toList();
SqlExpressionGroup group1 = new SqlExpressionGroup(); SqlExpressionGroup group1 = new SqlExpressionGroup();
@@ -66,7 +66,7 @@ public class OutlayManageClubController {
"""); """);
cnd.andEX("year", "=", year); cnd.andEX("year", "=", year);
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) { if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
Sys_role sysRole = sysRoleService.getByCode(RoleConstant.CLUB_PRESIDENT); Sys_role sysRole = sysRoleService.getByCode(RoleConstant.CLUB_MANAGER);
List<Sys_user_role> userRoles = baseService.dao().query(Sys_user_role.class, Cnd.where("userId", "=", SecurityUtil.getUserId()).and("roleId", "=", sysRole.getId())); List<Sys_user_role> userRoles = baseService.dao().query(Sys_user_role.class, Cnd.where("userId", "=", SecurityUtil.getUserId()).and("roleId", "=", sysRole.getId()));
List<String> myClubId = userRoles.stream().map(Sys_user_role::getClubId).toList(); List<String> myClubId = userRoles.stream().map(Sys_user_role::getClubId).toList();
cnd.andEX("clubId", "in", myClubId); cnd.andEX("clubId", "in", myClubId);
@@ -74,7 +74,7 @@ public class OutlayManageClubUseDetailController {
if (AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) { if (AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
cnd.andEX("clubId", "=", clubId); cnd.andEX("clubId", "=", clubId);
} else { } else {
Sys_role sysRole = sysRoleService.getByCode(RoleConstant.CLUB_PRESIDENT); Sys_role sysRole = sysRoleService.getByCode(RoleConstant.CLUB_MANAGER);
List<Sys_user_role> userRoles = baseService.dao().query(Sys_user_role.class, Cnd.where("userId", "=", SecurityUtil.getUserId()).and("roleId", "=", sysRole.getId())); List<Sys_user_role> userRoles = baseService.dao().query(Sys_user_role.class, Cnd.where("userId", "=", SecurityUtil.getUserId()).and("roleId", "=", sysRole.getId()));
List<String> myClubId = userRoles.stream().map(Sys_user_role::getClubId).toList(); List<String> myClubId = userRoles.stream().map(Sys_user_role::getClubId).toList();
cnd.andEX("clubId", "in", myClubId); cnd.andEX("clubId", "in", myClubId);
@@ -123,7 +123,7 @@ public class OutlayReimburseApplyServiceImpl extends BaseServiceImpl<OutlayReimb
.and("unionId", "=", StrUtil.isNotBlank(unionId) ? unionId : SecurityUtil.getUnionId())); .and("unionId", "=", StrUtil.isNotBlank(unionId) ? unionId : SecurityUtil.getUnionId()));
map.put("budgetMoney", ObjectUtil.isNotEmpty(union) ? union.getTotalQuota().subtract(union.getUsedQuota()) : 0); map.put("budgetMoney", ObjectUtil.isNotEmpty(union) ? union.getTotalQuota().subtract(union.getUsedQuota()) : 0);
} else if (outlayManageSource.equals("ACTIVITY_BUDGET_TYPE_THREE")) { } else if (outlayManageSource.equals("ACTIVITY_BUDGET_TYPE_THREE")) {
Sys_role sysRole = sysRoleService.getByCode(RoleConstant.CLUB_PRESIDENT); Sys_role sysRole = sysRoleService.getByCode(RoleConstant.CLUB_MANAGER);
List<Sys_user_role> userRoles = dao().query(Sys_user_role.class, Cnd.where("userId", "=", SecurityUtil.getUserId()).and("roleId", "=", sysRole.getId())); List<Sys_user_role> userRoles = dao().query(Sys_user_role.class, Cnd.where("userId", "=", SecurityUtil.getUserId()).and("roleId", "=", sysRole.getId()));
List<String> myClubId = userRoles.stream().map(Sys_user_role::getClubId).toList(); List<String> myClubId = userRoles.stream().map(Sys_user_role::getClubId).toList();
@@ -228,12 +228,12 @@
</template> </template>
<el-row class="query-row" <el-row class="query-row"
v-if="is_A06===true||is_sysadmin===true||is_H02===true||is_CLUB_PRESIDENT===true"> v-if="is_A06===true||is_sysadmin===true||is_H02===true||is_CLUB_MANAGER===true">
<el-col class="query-title">协会:</el-col> <el-col class="query-title">协会:</el-col>
<el-col class="query-content"> <el-col class="query-content">
<el-select v-model="pageForm.clubId" placeholder="请选择协会" @change="doSearch" <el-select v-model="pageForm.clubId" placeholder="请选择协会" @change="doSearch"
filterable filterable
:clearable="is_A06===true||is_sysadmin===true||is_CLUB_PRESIDENT===true||(is_H04===true&&is_H02===true)" :clearable="is_A06===true||is_sysadmin===true||is_CLUB_MANAGER===true||(is_H04===true&&is_H02===true)"
style="width: 100%"> style="width: 100%">
<el-option <el-option
v-for="item in clubOptions" v-for="item in clubOptions"
@@ -482,8 +482,8 @@ module.exports = {
is_H02() { is_H02() {
return this.roleData.is_H02 return this.roleData.is_H02
}, },
is_CLUB_PRESIDENT() { is_CLUB_MANAGER() {
return this.roleData.is_CLUB_PRESIDENT return this.roleData.is_CLUB_MANAGER
}, },
is_sysadmin() { is_sysadmin() {
return this.roleData.is_sysadmin return this.roleData.is_sysadmin
@@ -664,12 +664,12 @@ module.exports = {
async created() { async created() {
this.listSession() this.listSession()
await this.getRolesAndUnion() await this.getRolesAndUnion()
if (this.is_CLUB_PRESIDENT === true && (this.is_sysadmin || this.is_A06 || this.is_H02) === false) { if (this.is_CLUB_MANAGER === true && (this.is_sysadmin || this.is_A06 || this.is_H02) === false) {
this.clubOptions = await this.$businessTool.listManageClubByRole() this.clubOptions = await this.$businessTool.listManageClubByRole()
} else { } else {
this.clubOptions = await this.$businessTool.listCLubByRole() this.clubOptions = await this.$businessTool.listCLubByRole()
} }
if ((this.is_sysadmin || this.is_A06 || this.is_H02 || this.is_CLUB_PRESIDENT) === false && this.is_H04 === true) { if ((this.is_sysadmin || this.is_A06 || this.is_H02 || this.is_CLUB_MANAGER) === false && this.is_H04 === true) {
this.unions = await this.$businessTool.listUnion(this.unionid) this.unions = await this.$businessTool.listUnion(this.unionid)
this.$set(this.pageForm, "unionId", this.unions[0].id) this.$set(this.pageForm, "unionId", this.unions[0].id)
} else { } else {
@@ -680,7 +680,7 @@ module.exports = {
this.$set(this.pageForm, "clubId", this.clubOptions[0].id) this.$set(this.pageForm, "clubId", this.clubOptions[0].id)
} }
} }
if (this.is_H04 === false && this.is_H02 === false && this.is_CLUB_PRESIDENT === true && this.clubOptions.length === 1) { if (this.is_H04 === false && this.is_H02 === false && this.is_CLUB_MANAGER === true && this.clubOptions.length === 1) {
this.$set(this.pageForm, "clubId", this.clubOptions[0].id) this.$set(this.pageForm, "clubId", this.clubOptions[0].id)
} }
await this.flushUnits() await this.flushUnits()
@@ -403,7 +403,7 @@ layout("/layouts/platform.html"){
} }
}) })
} }
if (this.$auth.hasRoleOr(["CLUB_PRESIDENT"])) { if (this.$auth.hasRoleOr(["CLUB_MANAGER"])) {
this.activityDeclareReimbursementList.map(v => { this.activityDeclareReimbursementList.map(v => {
if (["CLUB"].includes(v.name)) { if (["CLUB"].includes(v.name)) {
activityDeclareReimbursementList.push(v) activityDeclareReimbursementList.push(v)
@@ -40,7 +40,7 @@ layout("/layouts/platform.html"){
</search-item> </search-item>
</template> </template>
<template v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, CLUB_MANAGER, CLUB_PRESIDENT')"> <template v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, CLUB_MANAGER')">
<search-item label="所属协会"> <search-item label="所属协会">
<el-select clearable filterable placeholder="所属协会" <el-select clearable filterable placeholder="所属协会"
style="width: 100%;" v-model="pageForm.clubId"> style="width: 100%;" v-model="pageForm.clubId">
@@ -206,7 +206,7 @@ layout("/layouts/platform.html"){
this.unions = await this.$businessTool.listUnion() this.unions = await this.$businessTool.listUnion()
this.clubs = await this.$businessTool.listClub() this.clubs = await this.$businessTool.listClub()
} else { } else {
if (this.$auth.hasRoleOr('CLUB_MANAGER, CLUB_PRESIDENT')) { if (this.$auth.hasRoleOr('CLUB_MANAGER')) {
this.clubs = await this.$businessTool.listClub() this.clubs = await this.$businessTool.listClub()
} }
this.unions = await this.$businessTool.listUnion(this.$store.state.user.union.id) this.unions = await this.$businessTool.listUnion(this.$store.state.user.union.id)
@@ -379,7 +379,7 @@ layout("/layouts/platform.html"){
hasClubRole() { hasClubRole() {
return this.$auth.hasRoleOr([ return this.$auth.hasRoleOr([
"CLUB_REIMBURSEMENT_MANAGER", "CLUB_REIMBURSEMENT_MANAGER",
"CLUB_PRESIDENT" "CLUB_MANAGER"
]); ]);
}, },
@@ -606,7 +606,7 @@ layout("/layouts/platform.html"){
budgetTypeCloseOption.push(typeTwoOption) budgetTypeCloseOption.push(typeTwoOption)
} }
} }
if (this.$auth.hasRoleOr(["CLUB_REIMBURSEMENT_MANAGER", "CLUB_PRESIDENT"])) { if (this.$auth.hasRoleOr(["CLUB_REIMBURSEMENT_MANAGER", "CLUB_MANAGER"])) {
const typeThreeOption = resp.find(v => v.code === "ACTIVITY_BUDGET_TYPE_THREE") const typeThreeOption = resp.find(v => v.code === "ACTIVITY_BUDGET_TYPE_THREE")
if (typeThreeOption && !budgetTypeCloseOption.some(existing => existing.code === "ACTIVITY_BUDGET_TYPE_THREE")) { if (typeThreeOption && !budgetTypeCloseOption.some(existing => existing.code === "ACTIVITY_BUDGET_TYPE_THREE")) {
budgetTypeCloseOption.push(typeThreeOption) budgetTypeCloseOption.push(typeThreeOption)
@@ -41,7 +41,7 @@ layout("/layouts/platform.html"){
</search-item> </search-item>
</template> </template>
<template v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, CLUB_MANAGER, CLUB_PRESIDENT')"> <template v-if="$auth.hasRoleOr('SYSADMIN, SCHOOL_UNION_ADMIN, CLUB_MANAGER')">
<search-item label="所属协会"> <search-item label="所属协会">
<el-select clearable filterable placeholder="所属协会" <el-select clearable filterable placeholder="所属协会"
style="width: 100%;" v-model="pageForm.clubId"> style="width: 100%;" v-model="pageForm.clubId">
@@ -217,7 +217,7 @@ layout("/layouts/platform.html"){
this.unions = await this.$businessTool.listUnion() this.unions = await this.$businessTool.listUnion()
this.clubs = await this.$businessTool.listClub() this.clubs = await this.$businessTool.listClub()
} else { } else {
if (this.$auth.hasRoleOr('CLUB_MANAGER, CLUB_PRESIDENT')) { if (this.$auth.hasRoleOr('CLUB_MANAGER')) {
this.clubs = await this.$businessTool.listClub() this.clubs = await this.$businessTool.listClub()
} }
this.unions = await this.$businessTool.listUnion(this.$store.state.user.union.id) this.unions = await this.$businessTool.listUnion(this.$store.state.user.union.id)
@@ -7,7 +7,7 @@ const basicForm = {
style="width: 100%"> style="width: 100%">
<el-option v-if="$auth.hasRole('SYSADMIN') || $auth.hasRole('SCHOOL_UNION_ADMIN')" label="校工会" value="40001"></el-option> <el-option v-if="$auth.hasRole('SYSADMIN') || $auth.hasRole('SCHOOL_UNION_ADMIN')" label="校工会" value="40001"></el-option>
<el-option v-if="$auth.hasRole('SYSADMIN') || $auth.hasRole('BRANCH_UNION_CHAIRMAN')" label="分工会" value="40002"></el-option> <el-option v-if="$auth.hasRole('SYSADMIN') || $auth.hasRole('BRANCH_UNION_CHAIRMAN')" label="分工会" value="40002"></el-option>
<el-option v-if="$auth.hasRole('SYSADMIN') || $auth.hasRole('CLUB_PRESIDENT')" label="协会/社团" value="40003"></el-option> <el-option v-if="$auth.hasRole('SYSADMIN') || $auth.hasRole('CLUB_MANAGER')" label="协会/社团" value="40003"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@@ -41,7 +41,7 @@ layout("/layouts/platform.html"){
</el-option> </el-option>
</el-select> </el-select>
</search-item> </search-item>
<search-item v-if="$auth.hasRole('SYSADMIN') || $auth.hasRole('CLUB_PRESIDENT')" label="协会/社团:"> <search-item v-if="$auth.hasRole('SYSADMIN') || $auth.hasRole('CLUB_MANAGER')" label="协会/社团:">
<el-select v-model="pageForm.tissueIdByClub" placeholder="请选择所属协会/社团" filterable clearable <el-select v-model="pageForm.tissueIdByClub" placeholder="请选择所属协会/社团" filterable clearable
@change="doSearch" style="width: 100%"> @change="doSearch" style="width: 100%">
<el-option <el-option
@@ -11,7 +11,7 @@ const basicForm = {
style="width: 100%"> style="width: 100%">
<el-option v-if="$auth.hasRole('SYSADMIN') || $auth.hasRole('SCHOOL_UNION_ADMIN')" label="校工会" value="40001"></el-option> <el-option v-if="$auth.hasRole('SYSADMIN') || $auth.hasRole('SCHOOL_UNION_ADMIN')" label="校工会" value="40001"></el-option>
<el-option v-if="$auth.hasRole('SYSADMIN') || $auth.hasRole('BRANCH_UNION_CHAIRMAN')" label="分工会" value="40002"></el-option> <el-option v-if="$auth.hasRole('SYSADMIN') || $auth.hasRole('BRANCH_UNION_CHAIRMAN')" label="分工会" value="40002"></el-option>
<el-option v-if="$auth.hasRole('SYSADMIN') || $auth.hasRole('CLUB_PRESIDENT')" label="协会/社团" value="40003"></el-option> <el-option v-if="$auth.hasRole('SYSADMIN') || $auth.hasRole('CLUB_MANAGER')" label="协会/社团" value="40003"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item v-if="formData.summaryFrom === '40002'" prop="tissueId" label="所属工会"> <el-form-item v-if="formData.summaryFrom === '40002'" prop="tissueId" label="所属工会">
@@ -38,7 +38,7 @@ layout("/layouts/platform.html"){
</el-option> </el-option>
</el-select> </el-select>
</search-item> </search-item>
<search-item v-if="$auth.hasRole('SYSADMIN') || $auth.hasRole('CLUB_PRESIDENT')" label="协会/社团:"> <search-item v-if="$auth.hasRole('SYSADMIN') || $auth.hasRole('CLUB_MANAGER')" label="协会/社团:">
<el-select v-model="pageForm.tissueIdByClub" placeholder="请选择所属协会/社团" filterable clearable <el-select v-model="pageForm.tissueIdByClub" placeholder="请选择所属协会/社团" filterable clearable
@change="doSearch" style="width: 100%"> @change="doSearch" style="width: 100%">
<el-option <el-option
@@ -103,7 +103,7 @@ layout("/layouts/platform.html"){
<template #edit> <template #edit>
<add-activity <add-activity
:is_a06="$auth.hasRole('SCHOOL_UNION_ADMIN')" :is_a06="$auth.hasRole('SCHOOL_UNION_ADMIN')"
:is_club="$auth.hasRole('CLUB_PRESIDENT')" :is_club="$auth.hasRole('CLUB_MANAGER')"
:is_sysadmin="$auth.hasRole('SYSADMIN')" :is_sysadmin="$auth.hasRole('SYSADMIN')"
:unionid="user.union.id" :unionid="user.union.id"
@flip="flip" @flip="flip"
@@ -1,14 +1,13 @@
const CLUB_ROLE_CONSTANT = { const CLUB_ROLE_CONSTANT = {
CLUB_MEMBER: "CLUB_MEMBER", CLUB_MEMBER: "CLUB_MEMBER",
CLUB_MANAGER: "CLUB_MANAGER", CLUB_MANAGER: "CLUB_MANAGER",
CLUB_PRESIDENT: "CLUB_PRESIDENT",
CLUB_VICE_PRESIDENT: "CLUB_VICE_PRESIDENT", CLUB_VICE_PRESIDENT: "CLUB_VICE_PRESIDENT",
CLUB_SECRETARY: "CLUB_SECRETARY", CLUB_SECRETARY: "CLUB_SECRETARY",
CLUB_VICE_SECRETARY: "CLUB_VICE_SECRETARY", CLUB_VICE_SECRETARY: "CLUB_VICE_SECRETARY",
getRoleName(roleCode) { getRoleName(roleCode) {
switch (roleCode) { switch (roleCode) {
case this.CLUB_PRESIDENT: case this.CLUB_MANAGER:
return "会长" return "协会负责人"
case this.CLUB_VICE_PRESIDENT: case this.CLUB_VICE_PRESIDENT:
return "副会长" return "副会长"
case this.CLUB_SECRETARY: case this.CLUB_SECRETARY:
@@ -83,7 +83,7 @@ layout("/layouts/platform.html"){
</el-form-item> </el-form-item>
<el-form-item label="身份" prop="nowRoleCode"> <el-form-item label="身份" prop="nowRoleCode">
<el-checkbox-group v-model="formData.nowRoleCode"> <el-checkbox-group v-model="formData.nowRoleCode">
<el-checkbox label="CLUB_PRESIDENT">协会会长</el-checkbox> <el-checkbox label="CLUB_MANAGER">协会负责人</el-checkbox>
<el-checkbox label="CLUB_VICE_PRESIDENT">协会副会长</el-checkbox> <el-checkbox label="CLUB_VICE_PRESIDENT">协会副会长</el-checkbox>
<el-checkbox label="CLUB_SECRETARY">协会秘书长</el-checkbox> <el-checkbox label="CLUB_SECRETARY">协会秘书长</el-checkbox>
<el-checkbox label="CLUB_VICE_SECRETARY">协会副秘书长</el-checkbox> <el-checkbox label="CLUB_VICE_SECRETARY">协会副秘书长</el-checkbox>
@@ -29,7 +29,7 @@ const SCHOOL_CLUB_MANAGE_TEMPLATE = {
<el-table-column :index="indexMethod" label="序号" type="index" width="70"></el-table-column> <el-table-column :index="indexMethod" label="序号" type="index" width="70"></el-table-column>
<el-table-column label="协会编码" sortable prop="clubCode"></el-table-column> <el-table-column label="协会编码" sortable prop="clubCode"></el-table-column>
<el-table-column label="协会名称" prop="clubName" sortable></el-table-column> <el-table-column label="协会名称" prop="clubName" sortable></el-table-column>
<el-table-column label="会长" prop="clubLeader" show-overflow-tooltip></el-table-column> <el-table-column label="协会负责人" prop="clubLeader" show-overflow-tooltip></el-table-column>
<el-table-column label="秘书长" prop="clubSecretary" show-overflow-tooltip></el-table-column> <el-table-column label="秘书长" prop="clubSecretary" show-overflow-tooltip></el-table-column>
<el-table-column label="当前人数" show-overflow-tooltip prop="currentNum"></el-table-column> <el-table-column label="当前人数" show-overflow-tooltip prop="currentNum"></el-table-column>
<el-table-column label="成立时间" show-overflow-tooltip prop="foundTime"></el-table-column> <el-table-column label="成立时间" show-overflow-tooltip prop="foundTime"></el-table-column>
@@ -43,7 +43,7 @@ layout("/layouts/platform.html"){
<el-table-column label="协会编码" sortable prop="clubCode"></el-table-column> <el-table-column label="协会编码" sortable prop="clubCode"></el-table-column>
<el-table-column label="协会名称" prop="clubName" show-overflow-tooltip width="200px"></el-table-column> <el-table-column label="协会名称" prop="clubName" show-overflow-tooltip width="200px"></el-table-column>
<el-table-column label="成立时间" prop="foundTime"></el-table-column> <el-table-column label="成立时间" prop="foundTime"></el-table-column>
<el-table-column label="会长" prop="clubLeader" show-overflow-tooltip></el-table-column> <el-table-column label="协会负责人" prop="clubLeader" show-overflow-tooltip></el-table-column>
<el-table-column label="秘书长" prop="clubSecretary" show-overflow-tooltip></el-table-column> <el-table-column label="秘书长" prop="clubSecretary" show-overflow-tooltip></el-table-column>
<el-table-column sortable label="当前人数" show-overflow-tooltip prop="currentPeopleNum"></el-table-column> <el-table-column sortable label="当前人数" show-overflow-tooltip prop="currentPeopleNum"></el-table-column>
<el-table-column label="操作" width="250px"> <el-table-column label="操作" width="250px">
@@ -39,7 +39,7 @@ layout("/layouts/platform.html"){
<el-table-column label="协会名称" prop="clubName" show-overflow-tooltip <el-table-column label="协会名称" prop="clubName" show-overflow-tooltip
width="200px"></el-table-column> width="200px"></el-table-column>
<el-table-column label="成立时间" prop="foundTime"></el-table-column> <el-table-column label="成立时间" prop="foundTime"></el-table-column>
<el-table-column label="会长" prop="clubLeader" show-overflow-tooltip></el-table-column> <el-table-column label="协会负责人" prop="clubLeader" show-overflow-tooltip></el-table-column>
<el-table-column label="秘书长" prop="clubSecretary" show-overflow-tooltip></el-table-column> <el-table-column label="秘书长" prop="clubSecretary" show-overflow-tooltip></el-table-column>
<el-table-column sortable label="当前人数" show-overflow-tooltip <el-table-column sortable label="当前人数" show-overflow-tooltip
prop="currentPeopleNum"></el-table-column> prop="currentPeopleNum"></el-table-column>
@@ -4,7 +4,7 @@ const CLUB_MANAGER_TEMPLATE = {
<el-table-column label="是否必填" prop="roleCode" width="130px"> <el-table-column label="是否必填" prop="roleCode" width="130px">
<template slot-scope="scope"> <template slot-scope="scope">
<span class="text-danger" <span class="text-danger"
v-if="scope.row.roleCode === 'CLUB_PRESIDENT' v-if="scope.row.roleCode === 'CLUB_MANAGER'
|| scope.row.roleCode === 'CLUB_SECRETARY'">必填</span> || scope.row.roleCode === 'CLUB_SECRETARY'">必填</span>
<span v-else>非必填</span> <span v-else>非必填</span>
</template> </template>
@@ -58,7 +58,7 @@ const CLUB_MANAGER_TEMPLATE = {
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
:disabled="scope.row.roleCode === 'CLUB_PRESIDENT'" :disabled="scope.row.roleCode === 'CLUB_MANAGER'"
@click="deleteRow(scope.row, scope.$index)" @click="deleteRow(scope.row, scope.$index)"
size="mini" type="danger">删除 size="mini" type="danger">删除
</el-button> </el-button>
@@ -70,13 +70,13 @@ const CLUB_MANAGER_TEMPLATE = {
return { return {
deleteIds: [], deleteIds: [],
managePerson: [ managePerson: [
{ roleCode: "CLUB_PRESIDENT" }, { roleCode: "CLUB_MANAGER" },
{ roleCode: "CLUB_VICE_PRESIDENT" }, { roleCode: "CLUB_VICE_PRESIDENT" },
{ roleCode: "CLUB_SECRETARY" }, { roleCode: "CLUB_SECRETARY" },
{ roleCode: "CLUB_VICE_SECRETARY" } { roleCode: "CLUB_VICE_SECRETARY" }
], ],
roleList: [ roleList: [
{ id: "CLUB_PRESIDENT", name: "会长" }, { id: "CLUB_MANAGER", name: "协会负责人" },
{ id: "CLUB_VICE_PRESIDENT", name: "副会长" }, { id: "CLUB_VICE_PRESIDENT", name: "副会长" },
{ id: "CLUB_SECRETARY", name: "秘书长" }, { id: "CLUB_SECRETARY", name: "秘书长" },
{ id: "CLUB_VICE_SECRETARY", name: "副秘书长" } { id: "CLUB_VICE_SECRETARY", name: "副秘书长" }
@@ -101,9 +101,9 @@ layout("/layouts/platform.html"){
async doHandle(type) { async doHandle(type) {
let formData = {} let formData = {}
try { try {
/*let hz = this.$refs.clubManagerRef.managePerson.filter((o) => o.roleCode === CLUB_ROLE_CONSTANT.CLUB_PRESIDENT) /*let hz = this.$refs.clubManagerRef.managePerson.filter((o) => o.roleCode === CLUB_ROLE_CONSTANT.CLUB_MANAGER)
if (hz.length !== 1) { if (hz.length !== 1) {
this.$message.warning({ title: "警告", message: "会长需要1人" }) this.$message.warning({ title: "警告", message: "协会负责人需要1人" })
return return
} }
let msz = this.$refs.clubManagerRef.managePerson.filter((o) => o.roleCode === CLUB_ROLE_CONSTANT.CLUB_SECRETARY) let msz = this.$refs.clubManagerRef.managePerson.filter((o) => o.roleCode === CLUB_ROLE_CONSTANT.CLUB_SECRETARY)
@@ -266,7 +266,7 @@ layout("/layouts/platform.html"){
} }
}) })
} }
if (this.$auth.hasRoleOr(['CLUB_PRESIDENT'])) { if (this.$auth.hasRoleOr(['CLUB_MANAGER'])) {
data.map(v => { data.map(v => {
if (["ACTIVITY_BUDGET_TYPE_THREE"].includes(v.code)) { if (["ACTIVITY_BUDGET_TYPE_THREE"].includes(v.code)) {
budgetTypeOption.push(v) budgetTypeOption.push(v)
@@ -322,7 +322,7 @@ layout("/layouts/platform.html"){
} }
}) })
} }
if (this.$auth.hasRoleOr(["CLUB_MANAGER", "CLUB_PRESIDENT"])) { if (this.$auth.hasRoleOr(["CLUB_MANAGER"])) {
this.budgetTypeOption.map(v => { this.budgetTypeOption.map(v => {
if (["ACTIVITY_BUDGET_TYPE_THREE"].includes(v.code)) { if (["ACTIVITY_BUDGET_TYPE_THREE"].includes(v.code)) {
budgetTypeOption.push(v) budgetTypeOption.push(v)
@@ -521,7 +521,7 @@ layout("/layouts/platform.html"){
} }
}) })
} }
if (this.$auth.hasRoleOr(["CLUB_MANAGER", "CLUB_PRESIDENT"])) { if (this.$auth.hasRoleOr(["CLUB_MANAGER"])) {
this.budgetTypeOption.map(v => { this.budgetTypeOption.map(v => {
if (["UNION_REIMBURSE_FUND_SOURCE_3"].includes(v.code)) { if (["UNION_REIMBURSE_FUND_SOURCE_3"].includes(v.code)) {
budgetTypeOption.push(v) budgetTypeOption.push(v)
@@ -406,7 +406,7 @@ layout("/layouts/platform_h5.html"){
} }
}) })
} }
if (this.$auth.hasRoleOr(["CLUB_MANAGER", "CLUB_PRESIDENT"])) { if (this.$auth.hasRoleOr(["CLUB_MANAGER"])) {
this.budgetTypeOption.map(v => { this.budgetTypeOption.map(v => {
if (["ACTIVITY_BUDGET_TYPE_THREE"].includes(v.code)) { if (["ACTIVITY_BUDGET_TYPE_THREE"].includes(v.code)) {
budgetTypeOption.push(v) budgetTypeOption.push(v)
@@ -935,7 +935,7 @@ layout("/layouts/platform_h5.html"){
}); });
} }
if (this.$auth.hasRoleOr(["CLUB_MANAGER", "CLUB_PRESIDENT"])) { if (this.$auth.hasRoleOr(["CLUB_MANAGER"])) {
this.reimburseFundSourceColumns.map(item => { this.reimburseFundSourceColumns.map(item => {
if (item.value === "UNION_REIMBURSE_FUND_SOURCE_3") { if (item.value === "UNION_REIMBURSE_FUND_SOURCE_3") {
filteredSources.push(item); filteredSources.push(item);