commit
This commit is contained in:
+28
-9
@@ -104,10 +104,13 @@ public class ClubUserJoinApplyController {
|
||||
return Result.error("您已经是该协会成员,无需重复申请!");
|
||||
}
|
||||
|
||||
//查询协会操作员
|
||||
//查询协会操作员、会长、秘书长、副会长
|
||||
String operatorLoginName = commonService.findUserLoginNameByRoleCode(RoleConstant.CLUB_OPERATOR, Cnd.where(Sys_user_role::getClubId, "=", clubUserApply.getClubId()));
|
||||
String presidentLoginName = commonService.findUserLoginNameByRoleCode(RoleConstant.CLUB_PRESIDENT, Cnd.where(Sys_user_role::getClubId, "=", clubUserApply.getClubId()));
|
||||
if (StrUtil.isAllBlank(operatorLoginName, presidentLoginName)) {
|
||||
String secretaryLoginName = commonService.findUserLoginNameByRoleCode(RoleConstant.CLUB_SECRETARY, Cnd.where(Sys_user_role::getClubId, "=", clubUserApply.getClubId()));
|
||||
String vicePresidentLoginName = commonService.findUserLoginNameByRoleCode(RoleConstant.CLUB_VICE_PRESIDENT, Cnd.where(Sys_user_role::getClubId, "=", clubUserApply.getClubId()));
|
||||
|
||||
if (StrUtil.isAllBlank(operatorLoginName, presidentLoginName, secretaryLoginName, vicePresidentLoginName)) {
|
||||
return Result.error("该协会未配置审批人,请联系校工会!");
|
||||
}
|
||||
|
||||
@@ -118,15 +121,31 @@ public class ClubUserJoinApplyController {
|
||||
|
||||
Sys_user applyUser = dao.fetch(Sys_user.class, clubUserApply.getUserId());
|
||||
|
||||
List<String> assignments = new ArrayList<>();
|
||||
if (StrUtil.isNotBlank(operatorLoginName)) {
|
||||
bpmService.startSubmitProcessInstance(BpmProcessConstant.CLUB_JOIN.name(), applyUser.getUsername() + "的申请", clubUserApply.getId(), List.of(operatorLoginName), null);
|
||||
// 发送消息
|
||||
// sysMsgService.sendMsg(operatorLoginName, "协会入会审核", "您有一条新的协会入会申请待处理,请登录暖心工会进行审批。", SecurityUtil.getUserId());
|
||||
}else{
|
||||
bpmService.startSubmitProcessInstance(BpmProcessConstant.CLUB_JOIN.name(), applyUser.getUsername() + "的申请", clubUserApply.getId(), List.of(presidentLoginName), null);
|
||||
// 发送消息
|
||||
// sysMsgService.sendMsg(presidentLoginName, "协会入会审核", "您有一条新的协会入会申请待处理,请登录暖心工会进行审批。", SecurityUtil.getUserId());
|
||||
assignments.add(operatorLoginName);
|
||||
}
|
||||
if (StrUtil.isNotBlank(secretaryLoginName)) {
|
||||
assignments.add(secretaryLoginName);
|
||||
}
|
||||
if (StrUtil.isNotBlank(vicePresidentLoginName)) {
|
||||
assignments.add(vicePresidentLoginName);
|
||||
}
|
||||
if (StrUtil.isNotBlank(presidentLoginName)) {
|
||||
assignments.add(presidentLoginName);
|
||||
}
|
||||
|
||||
bpmService.startSubmitProcessInstance(BpmProcessConstant.CLUB_JOIN.name(), applyUser.getUsername() + "的申请", clubUserApply.getId(), assignments, null);
|
||||
|
||||
// if (StrUtil.isNotBlank(operatorLoginName)) {
|
||||
// bpmService.startSubmitProcessInstance(BpmProcessConstant.CLUB_JOIN.name(), applyUser.getUsername() + "的申请", clubUserApply.getId(), List.of(operatorLoginName), null);
|
||||
// // 发送消息
|
||||
//// sysMsgService.sendMsg(operatorLoginName, "协会入会审核", "您有一条新的协会入会申请待处理,请登录暖心工会进行审批。", SecurityUtil.getUserId());
|
||||
// }else{
|
||||
// bpmService.startSubmitProcessInstance(BpmProcessConstant.CLUB_JOIN.name(), applyUser.getUsername() + "的申请", clubUserApply.getId(), List.of(presidentLoginName), null);
|
||||
// // 发送消息
|
||||
//// sysMsgService.sendMsg(presidentLoginName, "协会入会审核", "您有一条新的协会入会申请待处理,请登录暖心工会进行审批。", SecurityUtil.getUserId());
|
||||
// }
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -107,6 +107,7 @@ public class ClubUserJoinApprovalController {
|
||||
cnd.and(Cnd.likeEX("u.loginName", pageForm.getLoginName()));
|
||||
cnd.andEX("u.unionId","=",pageForm.getUnionId());
|
||||
cnd.andEX("u.unitId","=",pageForm.getUnitId());
|
||||
cnd.andEX("info.clubId","=",pageForm.getClubId());
|
||||
sql.setCondition(cnd);
|
||||
|
||||
Pagination<ClubUserJoinPageVo> pageVO = clubUserJoinService.listPageVO(pageForm, sql, ClubUserJoinPageVo.class);
|
||||
|
||||
+4
-2
@@ -339,14 +339,16 @@ public class ClubInfoManageController {
|
||||
//查询社团是否存在会长或者秘书长
|
||||
if(Arrays.asList(roleCodes).contains(RoleConstant.CLUB_PRESIDENT.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_PRESIDENT.name())))
|
||||
.and("id", "!=", id));
|
||||
if (count > 0) {
|
||||
return Result.error("会长只能有一位");
|
||||
}
|
||||
}
|
||||
if(Arrays.asList(roleCodes).contains(RoleConstant.CLUB_SECRETARY.name())) {
|
||||
int count = dao.count(ClubUser.class, Cnd.where("clubId", "=", clubId)
|
||||
.and(new Static("JSON_CONTAINS(roleCode, '\"%s\"')".formatted(RoleConstant.CLUB_SECRETARY.name()))));
|
||||
.and(new Static("JSON_CONTAINS(roleCode, '\"%s\"')".formatted(RoleConstant.CLUB_SECRETARY.name())))
|
||||
.and("id", "!=", id));
|
||||
if (count > 0) {
|
||||
return Result.error("秘书长只能有一位");
|
||||
}
|
||||
|
||||
@@ -13,5 +13,6 @@ public class ClubUserJoinPageForm extends PageForm {
|
||||
private String userName;
|
||||
private String unionId;
|
||||
private String unitId;
|
||||
private String clubId;
|
||||
|
||||
}
|
||||
|
||||
@@ -31,6 +31,11 @@ layout("/layouts/platform.html"){
|
||||
<el-option v-for="item in unitList" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
<search-item label="所属协会:" v-if="$auth.hasRole('SYSADMIN')">
|
||||
<el-select v-model="pageForm.clubId" placeholder="请选择所属单位" filterable clearable style="width: 100%">
|
||||
<el-option v-for="item in clubList" :key="item.id" :label="item.clubName" :value="item.id"></el-option>
|
||||
</el-select>
|
||||
</search-item>
|
||||
</search>
|
||||
</el-card>
|
||||
|
||||
@@ -121,6 +126,7 @@ layout("/layouts/platform.html"){
|
||||
},
|
||||
unionList: [],
|
||||
unitList: [],
|
||||
clubList: [],
|
||||
showApprovalForm: false
|
||||
}
|
||||
},
|
||||
@@ -174,6 +180,7 @@ layout("/layouts/platform.html"){
|
||||
async created() {
|
||||
this.unitList = await this.$businessTool.listUnit()
|
||||
this.unionList = await this.$businessTool.listUnion()
|
||||
this.clubList = await this.$businessTool.listClub()
|
||||
this.pageData()
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user