From e07ed664f173fcfe84b5daae28cdec49f7a8eec1 Mon Sep 17 00:00:00 2001 From: = <=> Date: Thu, 20 Aug 2026 15:43:53 +0800 Subject: [PATCH 1/2] commit --- .../examine/ClubExamineApplyController.java | 6 +- .../examine/ClubExamineMineController.java | 3 +- .../app/zhgh/club/param/ClubUserPageForm.java | 4 + .../impl/SysClubEvaluateServiceImpl.java | 8 +- .../impl/SysClubExamineServiceImpl.java | 25 ++- .../app/zhgh/club/vo/ClubEvaluatePageVo.java | 4 + .../controller/ArticleAnalysisController.java | 58 +++++-- .../controller/ArticleMineController.java | 8 +- .../service/ArticleAnalysisService.java | 9 +- .../impl/ArticleAnalysisServiceImpl.java | 56 +++++-- ...dHomeKpiWriteDynamicTableRenderPolicy.java | 4 + .../BuildHomeKpiWriteController.java | 2 +- .../BuildHomeLogBookController.java | 2 +- .../BuildHomeMaterialQueryController.java | 23 ++- .../CadreTrainingSignUpController.java | 2 +- .../zhgh/club/evaluate/clubAudit/index.html | 25 +-- .../zhgh/club/evaluate/mine/index.html | 25 +-- .../zhgh/club/evaluate/schoolAudit/index.html | 25 +-- .../evaluate/schoolLeaderAudit/index.html | 25 +-- .../zhgh/club/examine/common/examineInfo.js | 25 +-- .../dayofficework/article/analysis/index.html | 88 ++++++++-- .../buildHome/material/index.html | 153 ++++++++++++++++++ .../buildHome/material/query/index.html | 6 +- .../buildHome/material/query/info.js | 2 +- .../dayofficework/buildHome/material/write.js | 4 +- .../delegate/push/push-attendance-dialog.js | 5 +- .../delegate/push/push-formal-dialog.js | 5 +- 27 files changed, 484 insertions(+), 118 deletions(-) diff --git a/src/main/java/com/budwk/app/zhgh/club/controller/examine/ClubExamineApplyController.java b/src/main/java/com/budwk/app/zhgh/club/controller/examine/ClubExamineApplyController.java index 9cce435e..6f037b99 100644 --- a/src/main/java/com/budwk/app/zhgh/club/controller/examine/ClubExamineApplyController.java +++ b/src/main/java/com/budwk/app/zhgh/club/controller/examine/ClubExamineApplyController.java @@ -76,7 +76,8 @@ public class ClubExamineApplyController { if(year == null) { return Result.error("年份信息为空,请核查"); } - List list = dao.query(SysClubExamineRegister.class, Cnd.where("clubId", "=", clubId).and("year(registerDate)", "=", year).andEX("id", "!=", id)); + // 同一社团的年度重复申请校验以登记年度为准,不能按申请时间判断。 + List list = dao.query(SysClubExamineRegister.class, Cnd.where("clubId", "=", clubId).and("year", "=", year).andEX("id", "!=", id)); List instanceList = dao.query( ProcessInstance.class, Cnd.where(ProcessInstance::getBusinessNo, "in", list.stream().map(SysClubExamineRegister::getId).toList()) @@ -146,8 +147,9 @@ public class ClubExamineApplyController { if(StrUtil.isBlank(clubId)) { return Result.error("社团信息为空,请核查"); } + // 上年度结余按登记年度查询,避免申请时间跨年导致取错数据。 SysClubExamineRegister register = dao.fetch(SysClubExamineRegister.class, Cnd.where("clubId", "=", clubId) - .and("YEAR(registerDate)", "=", DateUtil.thisYear() - 1)); + .and("year", "=", DateUtil.thisYear() - 1)); if (Lang.isNotEmpty(register)) { List list = register.getIncomeCensus(); float surplus = list.get(0).getFloat("surplus"); diff --git a/src/main/java/com/budwk/app/zhgh/club/controller/examine/ClubExamineMineController.java b/src/main/java/com/budwk/app/zhgh/club/controller/examine/ClubExamineMineController.java index 52ce8927..045c1569 100644 --- a/src/main/java/com/budwk/app/zhgh/club/controller/examine/ClubExamineMineController.java +++ b/src/main/java/com/budwk/app/zhgh/club/controller/examine/ClubExamineMineController.java @@ -87,7 +87,8 @@ public class ClubExamineMineController { nutMap.setv("clubName", register.getClubName()); nutMap.setv("create_time", register.getFoundTime()); nutMap.setv("dues_standard", register.getDue()); - nutMap.setv("year", register.getRegisterDate().substring(0, 4)); + // 生成材料中的年度与列表展示的登记年度保持一致。 + nutMap.setv("year", register.getYear()); nutMap.setv("registerDate", register.getRegisterDate()); nutMap.setv("incomeCensus", incomeCensus); nutMap.setv("jgUser", jgUser); diff --git a/src/main/java/com/budwk/app/zhgh/club/param/ClubUserPageForm.java b/src/main/java/com/budwk/app/zhgh/club/param/ClubUserPageForm.java index 0e69c58f..236b6179 100644 --- a/src/main/java/com/budwk/app/zhgh/club/param/ClubUserPageForm.java +++ b/src/main/java/com/budwk/app/zhgh/club/param/ClubUserPageForm.java @@ -24,6 +24,10 @@ public class ClubUserPageForm extends PageForm { private Integer auditType; private Integer source; private Integer year; + /** 社团评优申报开始年度筛选条件。 */ + private String applyStartYear; + /** 社团评优申报结束年度筛选条件。 */ + private String applyEndYear; private Boolean giveMoney; private Integer radioType; } diff --git a/src/main/java/com/budwk/app/zhgh/club/service/impl/SysClubEvaluateServiceImpl.java b/src/main/java/com/budwk/app/zhgh/club/service/impl/SysClubEvaluateServiceImpl.java index f0372d68..2b293d9e 100644 --- a/src/main/java/com/budwk/app/zhgh/club/service/impl/SysClubEvaluateServiceImpl.java +++ b/src/main/java/com/budwk/app/zhgh/club/service/impl/SysClubEvaluateServiceImpl.java @@ -71,7 +71,9 @@ public class SysClubEvaluateServiceImpl extends BaseServiceImpl Cnd cnd = Cnd.NEW(); cnd.andEX("info.clubId", "=", pageForm.getClubId()); - cnd.andEX("year(info.applyTime)", "=", pageForm.getYear()); + // 评优年度以申报填写的起止年度为准,不能使用申请提交时间所在年份代替。 + cnd.andEX("info.applyStartYear", "=", pageForm.getApplyStartYear()); + cnd.andEX("info.applyEndYear", "=", pageForm.getApplyEndYear()); cnd.and("info.userId", "=", SecurityUtil.getUserId()); cnd.groupBy("info.id"); @@ -144,7 +146,9 @@ public class SysClubEvaluateServiceImpl extends BaseServiceImpl """); cnd.andEX("ce.clubId", "=", pageForm.getClubId()); - cnd.andEX("year(ce.applyTime)", "=", pageForm.getYear()); + // 审核列表与参考项目保持一致,分别按申报开始年度和申报结束年度筛选。 + cnd.andEX("ce.applyStartYear", "=", pageForm.getApplyStartYear()); + cnd.andEX("ce.applyEndYear", "=", pageForm.getApplyEndYear()); if (pageForm.getAudit()) { cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode())); diff --git a/src/main/java/com/budwk/app/zhgh/club/service/impl/SysClubExamineServiceImpl.java b/src/main/java/com/budwk/app/zhgh/club/service/impl/SysClubExamineServiceImpl.java index c52d0e4d..505a5b59 100644 --- a/src/main/java/com/budwk/app/zhgh/club/service/impl/SysClubExamineServiceImpl.java +++ b/src/main/java/com/budwk/app/zhgh/club/service/impl/SysClubExamineServiceImpl.java @@ -537,6 +537,7 @@ public class SysClubExamineServiceImpl extends BaseServiceImpl yearActivitySource = examineVo.getYearActivityList(); if (yearActivitySource == null || yearActivitySource.isEmpty()) { yearActivitySource = examineVo.getYearActivitys(); @@ -553,6 +554,27 @@ public class SysClubExamineServiceImpl extends BaseServiceImpl normalizeChangeUserNum(List changeUserNum) { + if (changeUserNum == null || changeUserNum.isEmpty()) { + return new ArrayList<>(); + } + return changeUserNum.stream() + .filter(Objects::nonNull) + .peek(item -> { + if (!item.containsKey("yearReduceNum") && item.containsKey("yearEditNum")) { + item.set("yearReduceNum", item.get("yearEditNum")); + } + }) + .collect(Collectors.toList()); + } + /** * 将V3工作总结附件的文件主键包装为V4文件预览组件所需的response.data格式。 * @@ -725,7 +747,8 @@ public class SysClubExamineServiceImpl extends BaseServiceImpl list = new ArrayList<>(); // 获取总投稿量 list.add(ArticleAnalysisOverviewVO.builder() .label("总投稿量") - .value(articleService.count()) + .value(articleService.count(buildStatisticsCondition(startDate, endDate, unionId, clubId))) .icon("el-icon-document") .bgColor("rgba(24, 103, 176, 0.1)") .trend(null) .build()); // 获取本月投稿量 - long monthlyCount = articleService.count(Cnd.where("MONTH(submitTime)", "=", DateUtil.thisMonth() + 1)); + Cnd monthlyCondition = buildStatisticsCondition(startDate, endDate, unionId, clubId); + monthlyCondition.and("MONTH(submitTime)", "=", DateUtil.thisMonth() + 1); + long monthlyCount = articleService.count(monthlyCondition); //上月投稿量 - long lastMonthCount = articleService.count(Cnd.where("MONTH(submitTime)", "=", DateUtil.offsetMonth(new Date(), -1))); + Cnd lastMonthCondition = buildStatisticsCondition(startDate, endDate, unionId, clubId); + lastMonthCondition.and("MONTH(submitTime)", "=", DateUtil.month(DateUtil.offsetMonth(new Date(), -1)) + 1); + long lastMonthCount = articleService.count(lastMonthCondition); list.add(ArticleAnalysisOverviewVO.builder() .label("本月投稿") @@ -70,7 +75,9 @@ public class ArticleAnalysisController { // 获取活跃投稿人数 DateTime dateTime = DateUtil.offsetMonth(new Date(), -1); - long activeUsers = Math.max(articleService.count(Cnd.where("submitTime", ">=", dateTime).groupBy("userId")), 0L); + Cnd activeUserCondition = buildStatisticsCondition(startDate, endDate, unionId, clubId); + activeUserCondition.and("submitTime", ">=", dateTime).groupBy("userId"); + long activeUsers = Math.max(articleService.count(activeUserCondition), 0L); list.add(ArticleAnalysisOverviewVO.builder() .label("活跃投稿人") .value(activeUsers) @@ -81,7 +88,11 @@ public class ArticleAnalysisController { // 获取参与分工会数量 - long unionCount = articleService.count(Sqls.create("SELECT COUNT(distinct unionId) FROM article WHERE unionId IS NOT NULL")); + Sql unionCountSql = Sqls.create("SELECT COUNT(distinct unionId) FROM article $condition"); + Cnd unionCountCondition = buildStatisticsCondition(startDate, endDate, unionId, clubId); + unionCountCondition.and("unionId", "IS NOT", null); + unionCountSql.setCondition(unionCountCondition); + long unionCount = articleService.count(unionCountSql); list.add(ArticleAnalysisOverviewVO.builder() .label("参与分工会") .value(unionCount) @@ -91,7 +102,11 @@ public class ArticleAnalysisController { .build()); // 获取参与社团数量 - long clubCount = articleService.count(Sqls.create("SELECT COUNT(distinct clubId) FROM article WHERE clubId IS NOT NULL")); + Sql clubCountSql = Sqls.create("SELECT COUNT(distinct clubId) FROM article $condition"); + Cnd clubCountCondition = buildStatisticsCondition(startDate, endDate, unionId, clubId); + clubCountCondition.and("clubId", "IS NOT", null); + clubCountSql.setCondition(clubCountCondition); + long clubCount = articleService.count(clubCountSql); list.add(ArticleAnalysisOverviewVO.builder() .label("参与社团") .value(clubCount) @@ -102,22 +117,43 @@ public class ArticleAnalysisController { return Result.success(list); } + /** + * 构建概览统计的筛选条件,与图表接口保持相同的时间范围、分工会和社团口径。 + */ + private Cnd buildStatisticsCondition(Date startDate, Date endDate, String unionId, String clubId) { + Cnd cnd = Cnd.NEW(); + if (startDate != null && endDate != null) { + cnd.and(Cnd.cri().where().andBetween("submitTime", startDate, endDate)); + } + cnd.andEX("unionId", "=", unionId); + cnd.andEX("clubId", "=", clubId); + return cnd; + } + @At @SaCheckPermission("article.analysis") @ApiOperation(value = "投稿趋势") - public Result trend(@Valid String type, Date startDate, Date endDate) { - List submissionTrend = articleAnalysisService.getSubmissionTrend(type, startDate, endDate); + public Result trend(@Valid String type, Date startDate, Date endDate, String unionId, String clubId) { + List submissionTrend = articleAnalysisService.getSubmissionTrend(type, startDate, endDate, unionId, clubId); return Result.success(submissionTrend); } @At @SaCheckPermission("article.analysis") @ApiOperation(value = "分工会投稿分布") - public Result distribution(Date startDate, Date endDate) { - List unionDistribution = articleAnalysisService.getUnionDistribution(startDate, endDate); + public Result distribution(Date startDate, Date endDate, String unionId, String clubId) { + List unionDistribution = articleAnalysisService.getUnionDistribution(startDate, endDate, unionId, clubId); return Result.success(unionDistribution); } + @At + @SaCheckPermission("article.analysis") + @ApiOperation(value = "社团投稿分布") + public Result clubDistribution(Date startDate, Date endDate, String unionId, String clubId) { + List clubDistribution = articleAnalysisService.getClubDistribution(startDate, endDate, unionId, clubId); + return Result.success(clubDistribution); + } + @At @SaCheckPermission("article.analysis") @ApiOperation(value = "投稿排名") diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/article/controller/ArticleMineController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/article/controller/ArticleMineController.java index 72fa1134..18a76e3d 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/article/controller/ArticleMineController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/article/controller/ArticleMineController.java @@ -52,6 +52,7 @@ public class ArticleMineController { @SaCheckPermission("article.mine") @ApiOperation("分页查询") public Result pageData(@Valid ArticleInfoPageParam pageForm) { + // 每篇投稿仅关联最新的一条待办任务,避免多办理人或并行待办将同一投稿重复展示。 Sql sql = Sqls.create(""" SELECT info.id, @@ -79,8 +80,11 @@ public class ArticleMineController { FROM article info LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id - LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10 - LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id + LEFT JOIN wf_process_task t ON t.id = ( + SELECT MAX(currentTask.id) + FROM wf_process_task currentTask + WHERE currentTask.processInstanceId = ins.id AND currentTask.taskState = 10 + ) $condition """); Cnd cnd = Cnd.NEW(); diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/article/service/ArticleAnalysisService.java b/src/main/java/com/budwk/app/zhgh/dayofficework/article/service/ArticleAnalysisService.java index 9dc9ae66..212c9065 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/article/service/ArticleAnalysisService.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/article/service/ArticleAnalysisService.java @@ -13,12 +13,17 @@ public interface ArticleAnalysisService extends BaseService
{ /** * 获取投稿趋势数据 */ - List getSubmissionTrend(String type, Date startDate, Date endDate); + List getSubmissionTrend(String type, Date startDate, Date endDate, String unionId, String clubId); /** * 获取分工会投稿分布 */ - List getUnionDistribution(Date startDate, Date endDate); + List getUnionDistribution(Date startDate, Date endDate, String unionId, String clubId); + + /** + * 获取社团投稿分布 + */ + List getClubDistribution(Date startDate, Date endDate, String unionId, String clubId); /** * 获取排行榜数据 diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/article/service/impl/ArticleAnalysisServiceImpl.java b/src/main/java/com/budwk/app/zhgh/dayofficework/article/service/impl/ArticleAnalysisServiceImpl.java index ed35ad98..d53687e4 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/article/service/impl/ArticleAnalysisServiceImpl.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/article/service/impl/ArticleAnalysisServiceImpl.java @@ -22,7 +22,7 @@ public class ArticleAnalysisServiceImpl extends BaseServiceImpl
impleme } @Override - public List getSubmissionTrend(String type, Date startDate, Date endDate) { + public List getSubmissionTrend(String type, Date startDate, Date endDate, String unionId, String clubId) { String groupFormat = switch (type) { case "week" -> "%Y-%u"; // 按周分组 case "month" -> "%Y-%m"; // 按月分组 @@ -40,10 +40,8 @@ public class ArticleAnalysisServiceImpl extends BaseServiceImpl
impleme """); sql.setParam("groupFormat",groupFormat); - Cnd cnd = Cnd.NEW(); - if(ObjectUtil.isAllNotEmpty(startDate,endDate)){ - cnd.and(Cnd.cri().where().andBetween("submitTime", startDate, endDate)); - } + Cnd cnd = buildStatisticsCondition(startDate, endDate, unionId, clubId); + cnd.groupBy("DATE_FORMAT(submitTime, @groupFormat)"); sql.setCondition(cnd); return listMap(sql); @@ -53,7 +51,7 @@ public class ArticleAnalysisServiceImpl extends BaseServiceImpl
impleme * 获取分工会投稿分布 */ @Override - public List getUnionDistribution(Date startDate, Date endDate) { + public List getUnionDistribution(Date startDate, Date endDate, String unionId, String clubId) { Sql sql = Sqls.create(""" SELECT unionName AS type, @@ -62,10 +60,7 @@ public class ArticleAnalysisServiceImpl extends BaseServiceImpl
impleme article $condition """); - Cnd cnd = Cnd.NEW(); - if(ObjectUtil.isAllNotEmpty(startDate,endDate)){ - cnd.and(Cnd.cri().where().andBetween("submitTime", startDate, endDate)); - } + Cnd cnd = buildStatisticsCondition(startDate, endDate, unionId, clubId); cnd.groupBy("unionId","unionName"); cnd.desc("value"); sql.setCondition(cnd); @@ -73,6 +68,47 @@ public class ArticleAnalysisServiceImpl extends BaseServiceImpl
impleme return listMap(sql); } + /** + * 获取社团投稿分布 + */ + @Override + public List getClubDistribution(Date startDate, Date endDate, String unionId, String clubId) { + Sql sql = Sqls.create(""" + SELECT + clubName AS type, + COUNT(*) AS value + FROM + article + $condition + """); + Cnd cnd = buildStatisticsCondition(startDate, endDate, unionId, clubId); + cnd.and("clubId", "IS NOT", null); + cnd.groupBy("clubId", "clubName"); + cnd.desc("value"); + sql.setCondition(cnd); + + return listMap(sql); + } + + /** + * 为统计图表统一拼接时间范围和分工会筛选条件,保证各图表的查询口径一致。 + * + * @param startDate 查询开始日期,为空时不限制开始时间 + * @param endDate 查询结束日期,为空时不限制结束时间 + * @param unionId 分工会 ID,为空时查询全部分工会 + * @param clubId 社团 ID,为空时查询全部社团 + * @return 可直接设置到统计 SQL 的查询条件 + */ + private Cnd buildStatisticsCondition(Date startDate, Date endDate, String unionId, String clubId) { + Cnd cnd = Cnd.NEW(); + if (ObjectUtil.isAllNotEmpty(startDate, endDate)) { + cnd.and(Cnd.cri().where().andBetween("submitTime", startDate, endDate)); + } + cnd.andEX("unionId", "=", unionId); + cnd.andEX("clubId", "=", clubId); + return cnd; + } + /** * 获取排行榜数据 */ diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/buildHome/config/BuildHomeKpiWriteDynamicTableRenderPolicy.java b/src/main/java/com/budwk/app/zhgh/dayofficework/buildHome/config/BuildHomeKpiWriteDynamicTableRenderPolicy.java index 1aed9624..af3d48d3 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/buildHome/config/BuildHomeKpiWriteDynamicTableRenderPolicy.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/buildHome/config/BuildHomeKpiWriteDynamicTableRenderPolicy.java @@ -58,6 +58,10 @@ public class BuildHomeKpiWriteDynamicTableRenderPolicy extends DynamicTableRende // 处理合并 if(ObjectUtil.isNotEmpty(dataList)){ for (int[] value : groupRanges.values()) { + // 单条明细无需合并;POI 不支持对同一行进行纵向合并。 + if (value[0] == value[1]) { + continue; + } TableTools.mergeCellsVertically(xwpfTable, 0, value[0] + 1, value[1] + 1); TableTools.mergeCellsVertically(xwpfTable, 1, value[0] + 1, value[1] + 1); TableTools.mergeCellsVertically(xwpfTable, 4, value[0] + 1, value[1] + 1); diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/buildHome/controller/BuildHomeKpiWriteController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/buildHome/controller/BuildHomeKpiWriteController.java index 7e34fc55..42e19c6e 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/buildHome/controller/BuildHomeKpiWriteController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/buildHome/controller/BuildHomeKpiWriteController.java @@ -94,7 +94,7 @@ public class BuildHomeKpiWriteController { buildHomeKpiWriteService.exportDocx(id, os); // 下载生成的文件 CommonDownloadUtil.download( - "南京邮电大学分工会教职工之家建设考核评议自评表.docx", + "中国地质大学分工会教职工之家建设考核评议自评表.docx", os.toByteArray(), response ); diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/buildHome/controller/BuildHomeLogBookController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/buildHome/controller/BuildHomeLogBookController.java index a9481d42..b268c108 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/buildHome/controller/BuildHomeLogBookController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/buildHome/controller/BuildHomeLogBookController.java @@ -136,7 +136,7 @@ public class BuildHomeLogBookController { template.render(map).writeAndClose(os); // 下载生成的文件 CommonDownloadUtil.download( - "南京邮电大学分工会建家记录册.docx", + "中国地质大学分工会建家记录册.docx", os.toByteArray(), response ); diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/buildHome/controller/BuildHomeMaterialQueryController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/buildHome/controller/BuildHomeMaterialQueryController.java index 3fdb3972..a2efd303 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/buildHome/controller/BuildHomeMaterialQueryController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/buildHome/controller/BuildHomeMaterialQueryController.java @@ -2,6 +2,7 @@ package com.budwk.app.zhgh.dayofficework.buildHome.controller; import cn.dev33.satoken.annotation.SaCheckPermission; import cn.hutool.core.util.StrUtil; +import cn.hutool.core.util.URLUtil; import com.budwk.app.base.page.Pagination; import com.budwk.app.base.param.PageForm; import com.budwk.app.base.result.Result; @@ -104,8 +105,13 @@ public class BuildHomeMaterialQueryController { } @At + @Ok("void") @SaCheckPermission("buildHome.material.query") public void exportZip(String actId, HttpServletResponse response) throws IOException { + BuildHomeAct act = buildHomeActService.fetch(actId); + if (act == null) { + throw new IllegalArgumentException("未找到评比事项"); + } Sql sql = Sqls.create(""" SELECT t1.id, @@ -123,7 +129,6 @@ public class BuildHomeMaterialQueryController { AND t2.actId = @actId LEFT JOIN build_home_act t3 ON t3.id = t2.actId AND t3.id = @actId - WHERE t1.id = '3742a919fb6847f7a8dbe051a2ef0025' GROUP BY t1.id, t2.unionId @@ -135,7 +140,9 @@ public class BuildHomeMaterialQueryController { // 2. 设置响应头 response.setContentType("application/zip"); - response.setHeader("Content-Disposition", "attachment; filename=\"工会文件汇总.zip\""); + // 使用评比事项名称作为压缩包名称,避免下载文件无法区分来源。 + String zipFileName = sanitizeFileName(act.getName()) + "汇总材料.zip"; + response.setHeader("Content-Disposition", "attachment; filename=" + URLUtil.encode(zipFileName)); // 3. 使用try-with-resources创建ZIP输出流 try (ZipOutputStream zos = new ZipOutputStream(response.getOutputStream())) { @@ -164,6 +171,18 @@ public class BuildHomeMaterialQueryController { } + /** + * 清理评比事项名称中的 Windows 文件名非法字符,确保浏览器可正常保存压缩包。 + * + * @param fileName 原始评比事项名称 + * @return 可用于下载文件名的评比事项名称 + */ + private String sanitizeFileName(String fileName) { + String sanitizedFileName = StrUtil.blankToDefault(fileName, "评比事项"); + return sanitizedFileName.replaceAll("[\\\\/:*?\"<>|]", "_"); + } + + private void processFileList(ZipOutputStream zos, String unionName, String fileType, String filesJson) throws IOException { if (StrUtil.isNotBlank(filesJson)) { List files = Json.fromJsonAsList(NutMap.class, filesJson); diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/cadreTraining/controller/CadreTrainingSignUpController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/cadreTraining/controller/CadreTrainingSignUpController.java index 7ee056cb..2d3146f4 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/cadreTraining/controller/CadreTrainingSignUpController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/cadreTraining/controller/CadreTrainingSignUpController.java @@ -67,8 +67,8 @@ public class CadreTrainingSignUpController { @SaCheckPermission("cadreTraining.branchUnionSignUp") @ApiOperation("分页查询") public Result pageData(@Valid PageForm pageForm,Integer year, boolean isEnrolled) { + // 同一活动存在多条代报名记录时,活动列表仅展示一次。 Sql sql = Sqls.create(""" - -- 同一活动存在多条代报名记录时,活动列表仅展示一次。 SELECT DISTINCT info.*, CASE WHEN cts.id IS NOT NULL THEN 1 ELSE 0 END AS isEnrolled diff --git a/src/main/resources/views/platform/zhgh/club/evaluate/clubAudit/index.html b/src/main/resources/views/platform/zhgh/club/evaluate/clubAudit/index.html index e975abc2..d7757db2 100644 --- a/src/main/resources/views/platform/zhgh/club/evaluate/clubAudit/index.html +++ b/src/main/resources/views/platform/zhgh/club/evaluate/clubAudit/index.html @@ -7,12 +7,21 @@ layout("/layouts/platform.html"){ - + + + + @@ -41,11 +50,8 @@ layout("/layouts/platform.html"){ {{ row.foundTime ? $moment(row.foundTime).format('YYYY-MM-DD') : '无' }} - - - + + @@ -104,7 +110,8 @@ layout("/layouts/platform.html"){ return { pageForm: { clubId: "", - year: this.$moment().format("YYYY"), + applyStartYear: "", + applyEndYear: "", audit: false }, viewData: {}, diff --git a/src/main/resources/views/platform/zhgh/club/evaluate/mine/index.html b/src/main/resources/views/platform/zhgh/club/evaluate/mine/index.html index 781f7e38..258758e8 100644 --- a/src/main/resources/views/platform/zhgh/club/evaluate/mine/index.html +++ b/src/main/resources/views/platform/zhgh/club/evaluate/mine/index.html @@ -8,12 +8,21 @@ layout("/layouts/platform.html"){ - - - + + @@ -88,7 +94,8 @@ layout("/layouts/platform.html"){ return { pageForm: { clubId: "", - year: this.$moment().format("YYYY") + applyStartYear: "", + applyEndYear: "" }, clubList: [] } diff --git a/src/main/resources/views/platform/zhgh/club/evaluate/schoolAudit/index.html b/src/main/resources/views/platform/zhgh/club/evaluate/schoolAudit/index.html index d247503d..2d4012cc 100644 --- a/src/main/resources/views/platform/zhgh/club/evaluate/schoolAudit/index.html +++ b/src/main/resources/views/platform/zhgh/club/evaluate/schoolAudit/index.html @@ -7,12 +7,21 @@ layout("/layouts/platform.html"){ - + + + + @@ -41,11 +50,8 @@ layout("/layouts/platform.html"){ {{ row.foundTime ? $moment(row.foundTime).format('YYYY-MM-DD') : '无' }} - - - + + @@ -104,7 +110,8 @@ layout("/layouts/platform.html"){ return { pageForm: { clubId: "", - year: this.$moment().format("YYYY"), + applyStartYear: "", + applyEndYear: "", audit: false }, viewData: {}, diff --git a/src/main/resources/views/platform/zhgh/club/evaluate/schoolLeaderAudit/index.html b/src/main/resources/views/platform/zhgh/club/evaluate/schoolLeaderAudit/index.html index dbd38d97..17e168f2 100644 --- a/src/main/resources/views/platform/zhgh/club/evaluate/schoolLeaderAudit/index.html +++ b/src/main/resources/views/platform/zhgh/club/evaluate/schoolLeaderAudit/index.html @@ -7,12 +7,21 @@ layout("/layouts/platform.html"){ - + + + + @@ -41,11 +50,8 @@ layout("/layouts/platform.html"){ {{ row.foundTime ? $moment(row.foundTime).format('YYYY-MM-DD') : '无' }} - - - + + @@ -104,7 +110,8 @@ layout("/layouts/platform.html"){ return { pageForm: { clubId: "", - year: this.$moment().format("YYYY"), + applyStartYear: "", + applyEndYear: "", audit: false }, viewData: {}, diff --git a/src/main/resources/views/platform/zhgh/club/examine/common/examineInfo.js b/src/main/resources/views/platform/zhgh/club/examine/common/examineInfo.js index 60b72e07..32cc0fbb 100644 --- a/src/main/resources/views/platform/zhgh/club/examine/common/examineInfo.js +++ b/src/main/resources/views/platform/zhgh/club/examine/common/examineInfo.js @@ -199,10 +199,10 @@ } const viewData = resp.data || {} this.$set(this, "viewData", viewData) + this.$set(this.viewData, "changeUserNum", viewData.changeUserNum || []) this.$set(this, "legacyAuditRecords", viewData.legacyAuditRecords || []) - // 三类补充数据独立加载,成员变化统计失败不能阻断成员和审核记录显示。 + // 历史成员变化直接展示年审保存数据,成员和审核记录继续独立加载。 await Promise.all([ - this.getClubUserNum(viewData.clubId), this.getJgUser(viewData.clubId), this.getDoneTasks() ]) @@ -210,27 +210,6 @@ this.$message.error("查询年审详情失败") } }, - async getClubUserNum(clubId) { - if (!clubId) { - this.$set(this.viewData, "changeUserNum", []) - return - } - try { - const resp = await this.$axios.post("/platform/club/examine/apply/getClubUserNum", { - clubId: clubId, - year: this.row.year - }) - if (resp.code === 0) { - this.$set(this.viewData, "changeUserNum", resp.data || []) - } else { - this.$set(this.viewData, "changeUserNum", []) - this.$message.warning(resp.msg || "查询社团成员变化情况失败") - } - } catch (error) { - this.$set(this.viewData, "changeUserNum", []) - this.$message.warning("查询社团成员变化情况失败") - } - }, async getJgUser(clubId) { if (!clubId) { this.$set(this.viewData, "jgUser", []) diff --git a/src/main/resources/views/platform/zhgh/dayofficework/article/analysis/index.html b/src/main/resources/views/platform/zhgh/dayofficework/article/analysis/index.html index 0da539a0..6c379e7c 100644 --- a/src/main/resources/views/platform/zhgh/dayofficework/article/analysis/index.html +++ b/src/main/resources/views/platform/zhgh/dayofficework/article/analysis/index.html @@ -142,8 +142,13 @@ layout("/layouts/platform.html"){ > - - + + + + + + + @@ -169,12 +174,15 @@ layout("/layouts/platform.html"){
分工会投稿分布 - - -
+
+
+ 社团投稿分布 +
+
+
@@ -208,7 +216,8 @@ layout("/layouts/platform.html"){ diff --git a/src/main/resources/views/platform/zhgh/dayofficework/buildHome/material/index.html b/src/main/resources/views/platform/zhgh/dayofficework/buildHome/material/index.html index d4f8ec06..67388a6c 100644 --- a/src/main/resources/views/platform/zhgh/dayofficework/buildHome/material/index.html +++ b/src/main/resources/views/platform/zhgh/dayofficework/buildHome/material/index.html @@ -34,6 +34,159 @@ layout("/layouts/platform.html"){ + +