This commit is contained in:
@jyuhsin
2025-10-17 15:23:10 +08:00
parent a5f278375a
commit 1cb3ee9d58
16 changed files with 62 additions and 34 deletions
@@ -20,6 +20,7 @@ import com.budwk.app.web.commons.auth.utils.AuthUtil;
import com.budwk.app.web.commons.auth.utils.SecurityUtil; import com.budwk.app.web.commons.auth.utils.SecurityUtil;
import com.budwk.app.zhgh.activity.culture.models.ActivityTissue; import com.budwk.app.zhgh.activity.culture.models.ActivityTissue;
import com.budwk.app.zhgh.activity.culture.service.ActivityCultureService; import com.budwk.app.zhgh.activity.culture.service.ActivityCultureService;
import com.budwk.app.zhgh.club.model.ClubUser;
import com.budwk.app.zhgh.club.model.SysClub; import com.budwk.app.zhgh.club.model.SysClub;
import com.budwk.app.zhgh.club.service.SysClubService; import com.budwk.app.zhgh.club.service.SysClubService;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
@@ -195,11 +196,9 @@ public class ActivityCultureApplyActivityController {
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());
List<Sys_user_role> clubList = sysClubService.dao().query(Sys_user_role.class, List<ClubUser> list = sysClubService.dao().query(ClubUser.class, Cnd.where(ClubUser::getClubId, "in", clubIds));
Cnd.where("roleId", "in", List.of(RoleConstant.CLUB_MEMBER.name()))
.and("clubId", "in", clubIds));
List<String> clubUserIds = clubList.stream().map(Sys_user_role::getUserId).toList(); List<String> clubUserIds = list.stream().map(ClubUser::getUserId).toList();
cnd.and("id", "in", clubUserIds); cnd.and("id", "in", clubUserIds);
} }
} }
@@ -28,6 +28,7 @@ import org.nutz.dao.Cnd;
import org.nutz.dao.Dao; import org.nutz.dao.Dao;
import org.nutz.dao.Sqls; import org.nutz.dao.Sqls;
import org.nutz.dao.sql.Sql; import org.nutz.dao.sql.Sql;
import org.nutz.dao.util.cri.SqlExpressionGroup;
import org.nutz.ioc.loader.annotation.Inject; import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean; import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.lang.Strings; import org.nutz.lang.Strings;
@@ -108,8 +109,11 @@ public class ActivityCultureUserStatisticsController {
cnd.and("atp.userId", "in", Sqls.create("SELECT userid FROM club_user WHERE clubId in (@clubIds)").setParam("clubIds", clubIdList)); cnd.and("atp.userId", "in", Sqls.create("SELECT userid FROM club_user WHERE clubId in (@clubIds)").setParam("clubIds", clubIdList));
} }
} }
if (Strings.isNotBlank(page.getSearchName()) && Strings.isNotBlank(page.getSearchKeyword())) { if (Strings.isNotBlank(page.getSearchKeyword())) {
cnd.where().andLike(page.getSearchName(), page.getSearchKeyword()); SqlExpressionGroup group = new SqlExpressionGroup();
group.orLike("atp.username", page.getSearchKeyword());
group.orLike("atp.loginanme", page.getSearchKeyword());
cnd.and(group);
} }
if (StrUtil.isNotBlank(page.getPageOrderName()) && StrUtil.isNotBlank(page.getPageOrderBy())) { if (StrUtil.isNotBlank(page.getPageOrderName()) && StrUtil.isNotBlank(page.getPageOrderBy())) {
cnd.orderBy(page.getPageOrderName(), page.getPageOrderBy().equalsIgnoreCase("ascending") ? "ASC" : "DESC"); cnd.orderBy(page.getPageOrderName(), page.getPageOrderBy().equalsIgnoreCase("ascending") ? "ASC" : "DESC");
@@ -123,7 +123,7 @@ public class ClubRefreshReportController {
} }
List<SysClubRefresh> list = dao.query(SysClubRefresh.class, cnd); List<SysClubRefresh> list = dao.query(SysClubRefresh.class, cnd);
List<String> idList = list.stream().map(SysClubRefresh::getId).toList(); List<String> idList = list.stream().map(SysClubRefresh::getId).toList();
int count = dao.count(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "in", idList).and(ProcessInstance::getState, "!=", ProcessInstanceStateEnum.FINISHED.getCode())); int count = dao.count(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "in", idList).and(ProcessInstance::getState, "not in", List.of(ProcessInstanceStateEnum.FINISHED.getCode(), ProcessInstanceStateEnum.REJECT.getCode())));
if (count > 0) { if (count > 0) {
return Result.error("您有该协会的申请记录尚未完成,请核对!"); return Result.error("您有该协会的申请记录尚未完成,请核对!");
} }
@@ -124,7 +124,7 @@ public class ClubRuleUpdateController {
} }
List<SysClubRule> list = dao.query(SysClubRule.class, cnd); List<SysClubRule> list = dao.query(SysClubRule.class, cnd);
List<String> idList = list.stream().map(SysClubRule::getId).toList(); List<String> idList = list.stream().map(SysClubRule::getId).toList();
int count = dao.count(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "in", idList).and(ProcessInstance::getState, "!=", ProcessInstanceStateEnum.FINISHED.getCode())); int count = dao.count(ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "in", idList).and(ProcessInstance::getState, "not in", List.of(ProcessInstanceStateEnum.FINISHED.getCode(), ProcessInstanceStateEnum.REJECT.getCode())));
if (count > 0) { if (count > 0) {
return Result.error("您有该协会的申请记录尚未完成,请核对!"); return Result.error("您有该协会的申请记录尚未完成,请核对!");
} }
@@ -87,7 +87,7 @@ public class ClubStatisticsController {
@SaCheckPermission("club.statistics") @SaCheckPermission("club.statistics")
public Result getClub(Boolean auditState) { public Result getClub(Boolean auditState) {
Cnd cnd = Cnd.NEW(); Cnd cnd = Cnd.NEW();
if (auditState != null) { /*if (auditState != null) {
List<SysClubExamineRegister> examineRegisters = sysClubService.dao().query(SysClubExamineRegister.class, Cnd.where("year(registerDate)", "=", DateUtil.thisYear())); List<SysClubExamineRegister> examineRegisters = sysClubService.dao().query(SysClubExamineRegister.class, Cnd.where("year(registerDate)", "=", DateUtil.thisYear()));
List<String> list = examineRegisters.stream().map(SysClubExamineRegister::getId).toList(); List<String> list = examineRegisters.stream().map(SysClubExamineRegister::getId).toList();
@@ -96,7 +96,7 @@ public class ClubStatisticsController {
List<SysClubExamineRegister> registers = examineRegisters.stream().filter(o -> businessNoList.contains(o.getId())).toList(); List<SysClubExamineRegister> registers = examineRegisters.stream().filter(o -> businessNoList.contains(o.getId())).toList();
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_PRESIDENT);
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()));
@@ -104,7 +104,18 @@ public class ClubStatisticsController {
cnd.and("id", "in", myClubId); cnd.and("id", "in", myClubId);
} }
List<SysClub> list = sysClubService.query(cnd); List<SysClub> list = sysClubService.query(cnd);
return Result.success(list);
// 获取审核通过的
List<ProcessInstance> instanceList = sysClubService.dao().query(
ProcessInstance.class,
Cnd.where(ProcessInstance::getBusinessNo, "in", list.stream().map(SysClub::getId).toList())
.and(ProcessInstance::getState, "=", ProcessInstanceStateEnum.FINISHED.getCode())
);
// 获取id
List<String> passList = instanceList.stream().map(ProcessInstance::getBusinessNo).toList();
List<SysClub> clubList = list.stream().filter(o -> passList.contains(o.getId())).toList();
return Result.success(clubList);
} }
@At @At
@@ -195,6 +206,7 @@ public class ClubStatisticsController {
cnd.andEX("u.sex", "=", sex); cnd.andEX("u.sex", "=", sex);
sql.setCondition(cnd); sql.setCondition(cnd);
List<NutMap> listMap = sysClubService.listMap(sql); List<NutMap> listMap = sysClubService.listMap(sql);
for (NutMap nutMap : listMap) { for (NutMap nutMap : listMap) {
List<String> list = Json.fromJsonAsList(String.class, nutMap.getString("roleCode")); List<String> list = Json.fromJsonAsList(String.class, nutMap.getString("roleCode"));
String roleName = SysClubUserServiceImpl.convertRoleName(list); String roleName = SysClubUserServiceImpl.convertRoleName(list);
@@ -206,6 +218,16 @@ public class ClubStatisticsController {
stCnd.andEX("id", "=", clubId); stCnd.andEX("id", "=", clubId);
List<SysClub> clubList = sysClubService.query(stCnd); List<SysClub> clubList = sysClubService.query(stCnd);
// 获取审核通过的
List<ProcessInstance> instanceList = sysClubService.dao().query(
ProcessInstance.class,
Cnd.where(ProcessInstance::getBusinessNo, "in", clubList.stream().map(SysClub::getId).toList())
.and(ProcessInstance::getState, "=", ProcessInstanceStateEnum.FINISHED.getCode())
);
// 获取id
List<String> passList = instanceList.stream().map(ProcessInstance::getBusinessNo).toList();
clubList = clubList.stream().filter(o -> passList.contains(o.getId())).toList();
List<ExcelExportEntity> exportEntities = new ArrayList<>(); List<ExcelExportEntity> exportEntities = new ArrayList<>();
exportEntities.add(new ExcelExportEntity("姓名", "userName", 20)); exportEntities.add(new ExcelExportEntity("姓名", "userName", 20));
exportEntities.add(new ExcelExportEntity("工号", "loginName", 20)); exportEntities.add(new ExcelExportEntity("工号", "loginName", 20));
@@ -164,7 +164,7 @@ public class SysClubInfoManageServiceImpl extends BaseServiceImpl<ClubCommonPage
//查询社团成员 //查询社团成员
if (pageForm.getRadioType() != null && 2 == pageForm.getRadioType()) { if (pageForm.getRadioType() != null && 2 == pageForm.getRadioType()) {
cnd.and(new Static("JSON_CONTAINS(scu.roleCode, '\"CLUB_MEMBER\"')")); cnd.and(new Static("JSON_CONTAINS(scu.roleCode, '\"CLUB_MEMBER\"')"));
cnd.and(new Static("JSON_LENGTH(scu.roleCode) = 1")); //cnd.and(new Static("JSON_LENGTH(scu.roleCode) = 1"));
} }
sql.setCondition(cnd); sql.setCondition(cnd);
Pagination<ClubUserCommonPageVo> listPageVO = sysClubService.listPageVO(pageForm, sql, ClubUserCommonPageVo.class); Pagination<ClubUserCommonPageVo> listPageVO = sysClubService.listPageVO(pageForm, sql, ClubUserCommonPageVo.class);
@@ -16,7 +16,7 @@ const ACTIVITY_CULTURE_AUDIT_ACTIVITY = {
></el-date-picker> ></el-date-picker>
</search-item> </search-item>
<search-item label="活动时间"> <search-item label="活动名称">
<el-input clearable placeholder="请输入活动名称" <el-input clearable placeholder="请输入活动名称"
v-model="pageForm.name"></el-input> v-model="pageForm.name"></el-input>
</search-item> </search-item>
@@ -168,7 +168,8 @@ const ACTIVITY_CULTURE_AUDIT_ACTIVITY = {
this.showApprovalForm = true this.showApprovalForm = true
this.formData = { this.formData = {
processTaskId: row.taskId, processTaskId: row.taskId,
taskName: row.curTaskName taskName: row.curTaskName,
id: row.id
} }
this.$refs.editInfo.onOpen(row) this.$refs.editInfo.onOpen(row)
}) })
@@ -46,12 +46,6 @@ const ACTIVITY_CULTURE_USER_STATISTICS = {
<el-input @keyup.enter.native="doSearch" clearable <el-input @keyup.enter.native="doSearch" clearable
placeholder="请输入姓名或工号" placeholder="请输入姓名或工号"
v-model="pageForm.searchKeyword"> v-model="pageForm.searchKeyword">
<el-select placeholder="姓名/工号" slot="prepend"
style="width: 80px;"
v-model="pageForm.searchName">
<el-option label="姓名" value="atp.username"></el-option>
<el-option label="工号" value="atp.loginanme"></el-option>
</el-select>
</el-input> </el-input>
</search-item> </search-item>
@@ -7,9 +7,7 @@ layout("/layouts/platform.html"){
<div id="app" v-cloak> <div id="app" v-cloak>
<guava ref="guava"> <guava ref="guava">
<el-card v-if="isCanApply" shadow="never"> <el-card v-if="isCanApply" shadow="never">
<div slot="header" class="clearfix"> <snaker-start slot="header" label="年度优秀协会申报" define_key="XHPY"></snaker-start>
<h3 style="color: rgb(24, 103, 176)">年度优秀协会申报</h3>
</div>
<el-form :model="formData" ref="form" :rules="formRules" label-width="120px" style="padding: 0 30px"> <el-form :model="formData" ref="form" :rules="formRules" label-width="120px" style="padding: 0 30px">
<el-row :gutter="30"> <el-row :gutter="30">
@@ -10,10 +10,7 @@ layout("/layouts/platform.html"){
<guava> <guava>
<el-card shadow="never"> <el-card shadow="never">
<snaker-start slot="header" label="考核登记" define_key="XHNS"></snaker-start>
<div slot="header" class="clearfix">
<h3 style="color: rgb(24, 103, 176)">考核登记</h3>
</div>
<el-steps :active="registerTypeName" finish-status="success" simple> <el-steps :active="registerTypeName" finish-status="success" simple>
<el-step title="基础信息"></el-step> <el-step title="基础信息"></el-step>
@@ -66,6 +66,9 @@ layout("/layouts/platform.html"){
</el-card> </el-card>
</template> </template>
<template #edit_func>
<snaker-start slot="header" label="" define_key="XHBGLS"></snaker-start>
</template>
<template #edit> <template #edit>
<el-form :model="formData" ref="formRef" size="small" label-width="80px" :rules="formRules"> <el-form :model="formData" ref="formRef" size="small" label-width="80px" :rules="formRules">
<el-form-item label="协会名称" prop="clubId"> <el-form-item label="协会名称" prop="clubId">
@@ -75,7 +78,7 @@ layout("/layouts/platform.html"){
</el-form-item> </el-form-item>
<el-form-item label="协会成员" prop="userId"> <el-form-item label="协会成员" prop="userId">
<el-select v-model="formData.userId" @change="userChange" placeholder="请选择协会成员" filterable clearable style="width: 100%"> <el-select v-model="formData.userId" @change="userChange" placeholder="请选择协会成员" filterable clearable style="width: 100%">
<el-option v-for="item in userList" :key="item.userId" :label="item.userName" :value="item.userId"></el-option> <el-option v-for="item,index in userList" :key="index" :label="item.userName" :value="item.userId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="身份" prop="nowRoleCode"> <el-form-item label="身份" prop="nowRoleCode">
@@ -184,6 +187,12 @@ layout("/layouts/platform.html"){
this.id = row.id this.id = row.id
this.taskId = row.taskId this.taskId = row.taskId
this.formData = clone(row) this.formData = clone(row)
this.$axios.post("/platform/club/infoManage/change/queryClubUsers", {clubId: this.formData.clubId}).then((res) => {
if (res.code === 0) {
this.userList = res.data
this.userChange(this.formData.userId)
}
})
this.$refs.guava.edit(() => {}) this.$refs.guava.edit(() => {})
}, },
async onSubmit() { async onSubmit() {
@@ -63,6 +63,9 @@ layout("/layouts/platform.html"){
</el-card> </el-card>
</template> </template>
<template #edit_func>
<snaker-start slot="header" label="" define_key="XHHJBG"></snaker-start>
</template>
<template #edit> <template #edit>
<el-form :model="formData" ref="formRef" size="small" label-width="80px" :rules="formRules"> <el-form :model="formData" ref="formRef" size="small" label-width="80px" :rules="formRules">
<el-form-item label="协会名称" prop="clubId"> <el-form-item label="协会名称" prop="clubId">
@@ -63,6 +63,9 @@ layout("/layouts/platform.html"){
</el-card> </el-card>
</template> </template>
<template #edit_func>
<snaker-start slot="header" label="" define_key="XHZCXD"></snaker-start>
</template>
<template #edit> <template #edit>
<el-form :model="formData" ref="formRef" size="small" label-width="80px" :rules="formRules"> <el-form :model="formData" ref="formRef" size="small" label-width="80px" :rules="formRules">
<el-form-item label="协会名称" prop="clubId"> <el-form-item label="协会名称" prop="clubId">
@@ -16,8 +16,8 @@ layout("/layouts/platform.html"){
@change="doSearch" @change="doSearch"
></el-date-picker> ></el-date-picker>
</search-item> </search-item>
<search-item label="关键字"> <search-item label="姓名/工号">
<el-input clearable placeholder="请输入姓名或工号查询" v-model="pageForm.searchKeyword"></el-input> <el-input clearable placeholder="请输入姓名或工号" v-model="pageForm.searchKeyword"></el-input>
</search-item> </search-item>
<search-item label="所属工会:"> <search-item label="所属工会:">
<el-select v-model="pageForm.unionId" placeholder="请选择所属工会" filterable clearable style="width: 100%"> <el-select v-model="pageForm.unionId" placeholder="请选择所属工会" filterable clearable style="width: 100%">
@@ -118,7 +118,7 @@ const CLUB_MANAGER_TEMPLATE = {
managePersonChange(val, row, index) { managePersonChange(val, row, index) {
const cloneData = clone(this.managePerson) const cloneData = clone(this.managePerson)
cloneData.splice(index, 1) cloneData.splice(index, 1)
const u = cloneData.find((o) => val && o.userId === val && o.roleCode === row.roleCode) const u = cloneData.find((o) => val && o.userId === val)
if (u) { if (u) {
this.$message.warning("理事机构不能重复") this.$message.warning("理事机构不能重复")
this.$set(row, "loginName", "") this.$set(row, "loginName", "")
@@ -5,9 +5,7 @@ layout("/layouts/platform.html"){
<div id="app" v-cloak> <div id="app" v-cloak>
<el-card shadow="never"> <el-card shadow="never">
<!--标题--> <!--标题-->
<div slot="header" class="clearfix"> <snaker-start slot="header" label="注册协会" define_key="XHZC"></snaker-start>
<h3 style="color: rgb(24, 103, 176)">注册协会</h3>
</div>
<!--步骤条--> <!--步骤条-->
<el-steps :active="activeName" finish-status="success" simple> <el-steps :active="activeName" finish-status="success" simple>
<el-step title="协会基本信息"></el-step> <el-step title="协会基本信息"></el-step>