fix: 协会会长角色改为 协会负责人
This commit is contained in:
+2
-2
@@ -34,7 +34,7 @@ public class FlowClubPresidentByArgsAssignmentHandler implements AssignmentHandl
|
||||
}
|
||||
|
||||
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)) {
|
||||
throw new BaseException("未查询到相关审批人");
|
||||
@@ -45,7 +45,7 @@ public class FlowClubPresidentByArgsAssignmentHandler implements AssignmentHandl
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return "获取协会会长(根据args中的clubId)";
|
||||
return "获取协会负责人(根据args中的clubId)";
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+4
-4
@@ -206,7 +206,7 @@ public class ActivityBasicScopeController {
|
||||
if (!StpUtil.hasRole(RoleConstant.SYSADMIN.name()) && !StpUtil.hasRole(RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||
SqlExpressionGroup group = new SqlExpressionGroup();
|
||||
group.or("creator", "=", SecurityUtil.getUserId());
|
||||
if(AuthUtil.hasRole(RoleConstant.CLUB_PRESIDENT.name())) {
|
||||
if(AuthUtil.hasRole(RoleConstant.CLUB_MANAGER.name())) {
|
||||
group.or("groupName", "like", "%社%");
|
||||
}
|
||||
cnd.and(group);
|
||||
@@ -250,7 +250,7 @@ public class ActivityBasicScopeController {
|
||||
addv("is_A06", StpUtil.hasRole(RoleConstant.SCHOOL_UNION_ADMIN.name()));
|
||||
addv("is_H04", StpUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.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("unionid", SecurityUtil.getUnionId());
|
||||
}});
|
||||
@@ -385,7 +385,7 @@ public class ActivityBasicScopeController {
|
||||
|
||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.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();
|
||||
if (isBranchUnionChairman && isClubPresident) {
|
||||
// Users with both roles can search their union users and their managed club members.
|
||||
@@ -396,7 +396,7 @@ public class ActivityBasicScopeController {
|
||||
}
|
||||
cnd.and(scopeGroup);
|
||||
} 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__"));
|
||||
} else {
|
||||
cnd.andEX("u.unionid", "=", SecurityUtil.getUnionId());
|
||||
|
||||
+1
-1
@@ -131,7 +131,7 @@ public class ActivityCultureServiceImpl extends BaseServiceImpl<ActivityTissue>
|
||||
if (AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_ADMIN.name(), RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
|
||||
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<String> clubIds = myManageClub.stream().map(SysClub::getId).collect(Collectors.toList());
|
||||
group.or("tissue.clubId", "in", clubIds);
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ public class CommonPageParam extends PageForm {
|
||||
RoleConstant.BRANCH_UNION_OPERATOR.name())) {
|
||||
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", "=", );
|
||||
group.or(prefix + "clubId", "in", SecurityUtil.getClubIds());
|
||||
}
|
||||
|
||||
+1
-1
@@ -145,7 +145,7 @@ public class YearPlanController {
|
||||
@SaCheckPermission("planSummary.yearPlan.manage")
|
||||
public Result queryClub() {
|
||||
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<String> list = clubList.stream().map(SysClub::getId).toList();
|
||||
cnd.and(SysClub::getId, "in", list);
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ public class YearPlanServiceImpl extends BaseServiceImpl<YearPlan> implements Ye
|
||||
if(AuthUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
|
||||
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<String> list = clubList.stream().map(SysClub::getId).toList();
|
||||
group.or("yp.tissueId", "in", list);
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ public class YearSummaryServiceImpl extends BaseServiceImpl<YearSummary> impleme
|
||||
if(AuthUtil.hasRole(RoleConstant.BRANCH_UNION_CHAIRMAN.name())) {
|
||||
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<String> list = clubList.stream().map(SysClub::getId).toList();
|
||||
group.or("ys.tissueId", "in", list);
|
||||
|
||||
+1
-1
@@ -132,7 +132,7 @@ public class TrainSignUpActivityStatisticsController {
|
||||
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)) {
|
||||
result.add(activity);
|
||||
}
|
||||
|
||||
+1
-1
@@ -63,7 +63,7 @@ public class ClubUserMineClubController {
|
||||
FROM
|
||||
sys_club club
|
||||
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 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
|
||||
|
||||
@@ -62,7 +62,7 @@ public class ClubCommonController {
|
||||
public Result listClubByRole() {
|
||||
Cnd cnd = Cnd.NEW();
|
||||
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<String> myClubId = userRoles.stream().map(Sys_user_role::getClubId).toList();
|
||||
cnd.and("c.id", "in", myClubId);
|
||||
|
||||
+2
-2
@@ -63,7 +63,7 @@ public class ClubEvaluateClubAuditController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.evaluate.clubAudit")
|
||||
@SLog(tag = "协会管理系统-协会评优", msg = "会长审核评优申请")
|
||||
@SLog(tag = "协会管理系统-协会评优", msg = "协会负责人审核评优申请")
|
||||
public Result approval(@Valid @Param("approval") BpmTaskApprovalParam approvalParam) {
|
||||
approvalParam.getBpmTaskApprovalTypeEnum();
|
||||
Map<String, Object> variables = BeanUtil.beanToMap(approvalParam);
|
||||
@@ -80,7 +80,7 @@ public class ClubEvaluateClubAuditController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.evaluate.clubAudit")
|
||||
@SLog(tag = "协会管理系统-协会评优", msg = "会长撤回评优申请")
|
||||
@SLog(tag = "协会管理系统-协会评优", msg = "协会负责人撤回评优申请")
|
||||
public Result revoke(@Valid String taskId) {
|
||||
bpmService.revokeTask(taskId);
|
||||
return Result.success();
|
||||
|
||||
+2
-2
@@ -57,7 +57,7 @@ public class ClubExamineClubAuditController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.examine.clubAudit")
|
||||
@SLog(tag = "协会管理系统-协会年审", msg = "会长审核年度考核")
|
||||
@SLog(tag = "协会管理系统-协会年审", msg = "协会负责人审核年度考核")
|
||||
public Result approval(@Valid @Param("approval") BpmTaskApprovalParam approvalParam) {
|
||||
approvalParam.getBpmTaskApprovalTypeEnum();
|
||||
Map<String, Object> variables = BeanUtil.beanToMap(approvalParam);
|
||||
@@ -74,7 +74,7 @@ public class ClubExamineClubAuditController {
|
||||
@At
|
||||
@Aop(TransAop.READ_COMMITTED)
|
||||
@SaCheckPermission("club.examine.clubAudit")
|
||||
@SLog(tag = "协会管理系统-协会年审", msg = "会长撤回年度考核")
|
||||
@SLog(tag = "协会管理系统-协会年审", msg = "协会负责人撤回年度考核")
|
||||
public Result revoke(@Valid String taskId) {
|
||||
bpmService.revokeTask(taskId);
|
||||
return Result.success();
|
||||
|
||||
+8
-8
@@ -196,12 +196,12 @@ public class ClubInfoManageController {
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "修改身份")
|
||||
public Result updateRoleCode(@Param("id") String id, @Valid String[] roleCodes, @Valid String clubId) {
|
||||
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)
|
||||
.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) {
|
||||
// return Result.error("会长只能有一位");
|
||||
// return Result.error("协会负责人只能有一位");
|
||||
}
|
||||
}
|
||||
if(Arrays.asList(roleCodes).contains(RoleConstant.CLUB_SECRETARY.name())) {
|
||||
@@ -272,12 +272,12 @@ public class ClubInfoManageController {
|
||||
@SLog(tag = "协会管理系统-信息管理", msg = "添加协会成员")
|
||||
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)
|
||||
.and(new Static("JSON_CONTAINS(roleCode, '\"%s\"')".formatted(roleCode))));
|
||||
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);
|
||||
@@ -295,7 +295,7 @@ public class ClubInfoManageController {
|
||||
ClubUser clubUser = dao.fetch(ClubUser.class, Cnd.where("clubId", "=", clubId).and("userId", "=", user));
|
||||
if(clubUser != null) {
|
||||
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());
|
||||
}
|
||||
if(!roleCodeList.contains(roleCode)) {
|
||||
|
||||
+6
-6
@@ -98,7 +98,7 @@ public class ClubStatisticsController {
|
||||
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())) {
|
||||
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<String> myClubId = userRoles.stream().map(Sys_user_role::getClubId).toList();
|
||||
cnd.and("id", "in", myClubId);
|
||||
@@ -136,7 +136,7 @@ public class ClubStatisticsController {
|
||||
$condition
|
||||
ORDER BY
|
||||
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_SECRETARY"') THEN 3
|
||||
WHEN JSON_CONTAINS(c.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4
|
||||
@@ -186,7 +186,7 @@ public class ClubStatisticsController {
|
||||
$condition
|
||||
ORDER BY
|
||||
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_SECRETARY"') THEN 3
|
||||
WHEN JSON_CONTAINS(c.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4
|
||||
@@ -196,7 +196,7 @@ public class ClubStatisticsController {
|
||||
""");
|
||||
Cnd cnd = Cnd.NEW();
|
||||
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<String> myClubId = userRoles.stream().map(Sys_user_role::getClubId).toList();
|
||||
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.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 ('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
|
||||
sys_club club
|
||||
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);
|
||||
}
|
||||
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<String> myClubId = userRoles.stream().map(Sys_user_role::getClubId).toList();
|
||||
cnd.and("club.id", "in", myClubId);
|
||||
|
||||
@@ -108,7 +108,7 @@ public class SysClubExamineServiceImpl extends BaseServiceImpl<SysClubExamineReg
|
||||
AND NOT JSON_CONTAINS(cl.roleCode, '"CLUB_MEMBER"')
|
||||
ORDER BY
|
||||
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_SECRETARY"') THEN 3
|
||||
WHEN JSON_CONTAINS(cl.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4
|
||||
|
||||
+5
-5
@@ -86,7 +86,7 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
|
||||
GROUP_CONCAT(secretaryUser.username) AS clubSecretary
|
||||
FROM
|
||||
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 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
|
||||
@@ -115,7 +115,7 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
|
||||
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())) {
|
||||
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<String> clubIdList = clubList.stream().map(Sys_user_role::getClubId).toList();
|
||||
|
||||
@@ -167,7 +167,7 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
|
||||
sql.setVar("order", """
|
||||
ORDER BY
|
||||
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_SECRETARY"') THEN 3
|
||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4
|
||||
@@ -261,7 +261,7 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
|
||||
FROM
|
||||
sys_club c
|
||||
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
|
||||
WHERE
|
||||
c.id = @clubId
|
||||
@@ -288,7 +288,7 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
|
||||
WHERE scu.clubId = @clubId
|
||||
ORDER BY
|
||||
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_SECRETARY"') THEN 3
|
||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4
|
||||
|
||||
@@ -68,7 +68,7 @@ public class SysClubServiceImpl extends BaseServiceImpl<SysClub> implements SysC
|
||||
SELECT
|
||||
club.*,
|
||||
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 count( DISTINCT scu.userId ) FROM club_user scu WHERE scu.clubId = club.id ) currentPeopleNum
|
||||
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())) {
|
||||
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<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());
|
||||
if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name(), RoleConstant.SCHOOL_UNION_CLUB_ADMIN.name())) {
|
||||
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("ex.year", "=", year);
|
||||
|
||||
@@ -73,7 +73,7 @@ public class SysClubUserServiceImpl extends BaseServiceImpl<ClubUser> implements
|
||||
WHERE scu.clubId = @clubId
|
||||
ORDER BY
|
||||
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_SECRETARY"') THEN 3
|
||||
WHEN JSON_CONTAINS(scu.roleCode, '"CLUB_VICE_SECRETARY"') THEN 4
|
||||
@@ -128,7 +128,7 @@ public class SysClubUserServiceImpl extends BaseServiceImpl<ClubUser> implements
|
||||
@Override
|
||||
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(","));
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -138,7 +138,7 @@ public class ArticleFirstExamineController {
|
||||
}
|
||||
assignments.add(branchUnionApprovalLoginName);
|
||||
} 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)) {
|
||||
return Result.error("协会未配置审批人,请联系协会!");
|
||||
}
|
||||
|
||||
+1
-1
@@ -157,7 +157,7 @@ public class ActivityBudgetApplyController {
|
||||
public Result listClub(){
|
||||
Cnd cnd = Cnd.NEW();
|
||||
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<String> myClubId = userRoles.stream().map(Sys_user_role::getClubId).toList();
|
||||
cnd.and("id", "in", myClubId);
|
||||
|
||||
+1
-1
@@ -99,7 +99,7 @@ public class ActivityBudgetServiceImpl extends BaseServiceImpl<ActivityBudget> i
|
||||
group1.and("info.unionId", "=", SecurityUtil.getUnionId());
|
||||
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<String> clubIds = myManageClub.stream().map(SysClub::getId).toList();
|
||||
SqlExpressionGroup group1 = new SqlExpressionGroup();
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ public class OutlayManageClubController {
|
||||
""");
|
||||
cnd.andEX("year", "=", year);
|
||||
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<String> myClubId = userRoles.stream().map(Sys_user_role::getClubId).toList();
|
||||
cnd.andEX("clubId", "in", myClubId);
|
||||
|
||||
+1
-1
@@ -74,7 +74,7 @@ public class OutlayManageClubUseDetailController {
|
||||
if (AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) {
|
||||
cnd.andEX("clubId", "=", clubId);
|
||||
} 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<String> myClubId = userRoles.stream().map(Sys_user_role::getClubId).toList();
|
||||
cnd.andEX("clubId", "in", myClubId);
|
||||
|
||||
+1
-1
@@ -123,7 +123,7 @@ public class OutlayReimburseApplyServiceImpl extends BaseServiceImpl<OutlayReimb
|
||||
.and("unionId", "=", StrUtil.isNotBlank(unionId) ? unionId : SecurityUtil.getUnionId()));
|
||||
map.put("budgetMoney", ObjectUtil.isNotEmpty(union) ? union.getTotalQuota().subtract(union.getUsedQuota()) : 0);
|
||||
} 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<String> myClubId = userRoles.stream().map(Sys_user_role::getClubId).toList();
|
||||
|
||||
|
||||
@@ -228,12 +228,12 @@
|
||||
</template>
|
||||
|
||||
<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-content">
|
||||
<el-select v-model="pageForm.clubId" placeholder="请选择协会" @change="doSearch"
|
||||
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%">
|
||||
<el-option
|
||||
v-for="item in clubOptions"
|
||||
@@ -482,8 +482,8 @@ module.exports = {
|
||||
is_H02() {
|
||||
return this.roleData.is_H02
|
||||
},
|
||||
is_CLUB_PRESIDENT() {
|
||||
return this.roleData.is_CLUB_PRESIDENT
|
||||
is_CLUB_MANAGER() {
|
||||
return this.roleData.is_CLUB_MANAGER
|
||||
},
|
||||
is_sysadmin() {
|
||||
return this.roleData.is_sysadmin
|
||||
@@ -664,12 +664,12 @@ module.exports = {
|
||||
async created() {
|
||||
this.listSession()
|
||||
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()
|
||||
} else {
|
||||
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.$set(this.pageForm, "unionId", this.unions[0].id)
|
||||
} else {
|
||||
@@ -680,7 +680,7 @@ module.exports = {
|
||||
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)
|
||||
}
|
||||
await this.flushUnits()
|
||||
|
||||
+1
-1
@@ -403,7 +403,7 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
})
|
||||
}
|
||||
if (this.$auth.hasRoleOr(["CLUB_PRESIDENT"])) {
|
||||
if (this.$auth.hasRoleOr(["CLUB_MANAGER"])) {
|
||||
this.activityDeclareReimbursementList.map(v => {
|
||||
if (["CLUB"].includes(v.name)) {
|
||||
activityDeclareReimbursementList.push(v)
|
||||
|
||||
+2
-2
@@ -40,7 +40,7 @@ layout("/layouts/platform.html"){
|
||||
</search-item>
|
||||
</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="所属协会">
|
||||
<el-select clearable filterable placeholder="所属协会"
|
||||
style="width: 100%;" v-model="pageForm.clubId">
|
||||
@@ -206,7 +206,7 @@ layout("/layouts/platform.html"){
|
||||
this.unions = await this.$businessTool.listUnion()
|
||||
this.clubs = await this.$businessTool.listClub()
|
||||
} else {
|
||||
if (this.$auth.hasRoleOr('CLUB_MANAGER, CLUB_PRESIDENT')) {
|
||||
if (this.$auth.hasRoleOr('CLUB_MANAGER')) {
|
||||
this.clubs = await this.$businessTool.listClub()
|
||||
}
|
||||
this.unions = await this.$businessTool.listUnion(this.$store.state.user.union.id)
|
||||
|
||||
+2
-2
@@ -379,7 +379,7 @@ layout("/layouts/platform.html"){
|
||||
hasClubRole() {
|
||||
return this.$auth.hasRoleOr([
|
||||
"CLUB_REIMBURSEMENT_MANAGER",
|
||||
"CLUB_PRESIDENT"
|
||||
"CLUB_MANAGER"
|
||||
]);
|
||||
},
|
||||
|
||||
@@ -606,7 +606,7 @@ layout("/layouts/platform.html"){
|
||||
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")
|
||||
if (typeThreeOption && !budgetTypeCloseOption.some(existing => existing.code === "ACTIVITY_BUDGET_TYPE_THREE")) {
|
||||
budgetTypeCloseOption.push(typeThreeOption)
|
||||
|
||||
+2
-2
@@ -41,7 +41,7 @@ layout("/layouts/platform.html"){
|
||||
</search-item>
|
||||
</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="所属协会">
|
||||
<el-select clearable filterable placeholder="所属协会"
|
||||
style="width: 100%;" v-model="pageForm.clubId">
|
||||
@@ -217,7 +217,7 @@ layout("/layouts/platform.html"){
|
||||
this.unions = await this.$businessTool.listUnion()
|
||||
this.clubs = await this.$businessTool.listClub()
|
||||
} else {
|
||||
if (this.$auth.hasRoleOr('CLUB_MANAGER, CLUB_PRESIDENT')) {
|
||||
if (this.$auth.hasRoleOr('CLUB_MANAGER')) {
|
||||
this.clubs = await this.$businessTool.listClub()
|
||||
}
|
||||
this.unions = await this.$businessTool.listUnion(this.$store.state.user.union.id)
|
||||
|
||||
@@ -7,7 +7,7 @@ const basicForm = {
|
||||
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('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-form-item>
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@ layout("/layouts/platform.html"){
|
||||
</el-option>
|
||||
</el-select>
|
||||
</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
|
||||
@change="doSearch" style="width: 100%">
|
||||
<el-option
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ const basicForm = {
|
||||
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('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-form-item>
|
||||
<el-form-item v-if="formData.summaryFrom === '40002'" prop="tissueId" label="所属工会">
|
||||
|
||||
@@ -38,7 +38,7 @@ layout("/layouts/platform.html"){
|
||||
</el-option>
|
||||
</el-select>
|
||||
</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
|
||||
@change="doSearch" style="width: 100%">
|
||||
<el-option
|
||||
|
||||
@@ -103,7 +103,7 @@ layout("/layouts/platform.html"){
|
||||
<template #edit>
|
||||
<add-activity
|
||||
:is_a06="$auth.hasRole('SCHOOL_UNION_ADMIN')"
|
||||
:is_club="$auth.hasRole('CLUB_PRESIDENT')"
|
||||
:is_club="$auth.hasRole('CLUB_MANAGER')"
|
||||
:is_sysadmin="$auth.hasRole('SYSADMIN')"
|
||||
:unionid="user.union.id"
|
||||
@flip="flip"
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
const CLUB_ROLE_CONSTANT = {
|
||||
CLUB_MEMBER: "CLUB_MEMBER",
|
||||
CLUB_MANAGER: "CLUB_MANAGER",
|
||||
CLUB_PRESIDENT: "CLUB_PRESIDENT",
|
||||
CLUB_VICE_PRESIDENT: "CLUB_VICE_PRESIDENT",
|
||||
CLUB_SECRETARY: "CLUB_SECRETARY",
|
||||
CLUB_VICE_SECRETARY: "CLUB_VICE_SECRETARY",
|
||||
getRoleName(roleCode) {
|
||||
switch (roleCode) {
|
||||
case this.CLUB_PRESIDENT:
|
||||
return "会长"
|
||||
case this.CLUB_MANAGER:
|
||||
return "协会负责人"
|
||||
case this.CLUB_VICE_PRESIDENT:
|
||||
return "副会长"
|
||||
case this.CLUB_SECRETARY:
|
||||
|
||||
@@ -83,7 +83,7 @@ layout("/layouts/platform.html"){
|
||||
</el-form-item>
|
||||
<el-form-item label="身份" prop="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_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 label="协会编码" sortable prop="clubCode"></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="当前人数" show-overflow-tooltip prop="currentNum"></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="协会名称" prop="clubName" show-overflow-tooltip width="200px"></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 sortable label="当前人数" show-overflow-tooltip prop="currentPeopleNum"></el-table-column>
|
||||
<el-table-column label="操作" width="250px">
|
||||
|
||||
@@ -39,7 +39,7 @@ layout("/layouts/platform.html"){
|
||||
<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="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 sortable label="当前人数" show-overflow-tooltip
|
||||
prop="currentPeopleNum"></el-table-column>
|
||||
|
||||
@@ -4,7 +4,7 @@ const CLUB_MANAGER_TEMPLATE = {
|
||||
<el-table-column label="是否必填" prop="roleCode" width="130px">
|
||||
<template slot-scope="scope">
|
||||
<span class="text-danger"
|
||||
v-if="scope.row.roleCode === 'CLUB_PRESIDENT'
|
||||
v-if="scope.row.roleCode === 'CLUB_MANAGER'
|
||||
|| scope.row.roleCode === 'CLUB_SECRETARY'">必填</span>
|
||||
<span v-else>非必填</span>
|
||||
</template>
|
||||
@@ -58,7 +58,7 @@ const CLUB_MANAGER_TEMPLATE = {
|
||||
</template>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
:disabled="scope.row.roleCode === 'CLUB_PRESIDENT'"
|
||||
:disabled="scope.row.roleCode === 'CLUB_MANAGER'"
|
||||
@click="deleteRow(scope.row, scope.$index)"
|
||||
size="mini" type="danger">删除
|
||||
</el-button>
|
||||
@@ -70,13 +70,13 @@ const CLUB_MANAGER_TEMPLATE = {
|
||||
return {
|
||||
deleteIds: [],
|
||||
managePerson: [
|
||||
{ roleCode: "CLUB_PRESIDENT" },
|
||||
{ roleCode: "CLUB_MANAGER" },
|
||||
{ roleCode: "CLUB_VICE_PRESIDENT" },
|
||||
{ roleCode: "CLUB_SECRETARY" },
|
||||
{ roleCode: "CLUB_VICE_SECRETARY" }
|
||||
],
|
||||
roleList: [
|
||||
{ id: "CLUB_PRESIDENT", name: "会长" },
|
||||
{ id: "CLUB_MANAGER", name: "协会负责人" },
|
||||
{ id: "CLUB_VICE_PRESIDENT", name: "副会长" },
|
||||
{ id: "CLUB_SECRETARY", name: "秘书长" },
|
||||
{ id: "CLUB_VICE_SECRETARY", name: "副秘书长" }
|
||||
|
||||
@@ -101,9 +101,9 @@ layout("/layouts/platform.html"){
|
||||
async doHandle(type) {
|
||||
let formData = {}
|
||||
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) {
|
||||
this.$message.warning({ title: "警告", message: "会长需要1人" })
|
||||
this.$message.warning({ title: "警告", message: "协会负责人需要1人" })
|
||||
return
|
||||
}
|
||||
let msz = this.$refs.clubManagerRef.managePerson.filter((o) => o.roleCode === CLUB_ROLE_CONSTANT.CLUB_SECRETARY)
|
||||
|
||||
+1
-1
@@ -266,7 +266,7 @@ layout("/layouts/platform.html"){
|
||||
}
|
||||
})
|
||||
}
|
||||
if (this.$auth.hasRoleOr(['CLUB_PRESIDENT'])) {
|
||||
if (this.$auth.hasRoleOr(['CLUB_MANAGER'])) {
|
||||
data.map(v => {
|
||||
if (["ACTIVITY_BUDGET_TYPE_THREE"].includes(v.code)) {
|
||||
budgetTypeOption.push(v)
|
||||
|
||||
+1
-1
@@ -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 => {
|
||||
if (["ACTIVITY_BUDGET_TYPE_THREE"].includes(v.code)) {
|
||||
budgetTypeOption.push(v)
|
||||
|
||||
+1
-1
@@ -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 => {
|
||||
if (["UNION_REIMBURSE_FUND_SOURCE_3"].includes(v.code)) {
|
||||
budgetTypeOption.push(v)
|
||||
|
||||
+1
-1
@@ -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 => {
|
||||
if (["ACTIVITY_BUDGET_TYPE_THREE"].includes(v.code)) {
|
||||
budgetTypeOption.push(v)
|
||||
|
||||
+1
-1
@@ -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 => {
|
||||
if (item.value === "UNION_REIMBURSE_FUND_SOURCE_3") {
|
||||
filteredSources.push(item);
|
||||
|
||||
Reference in New Issue
Block a user