From 501e64022bb745f71b45cd5aca5d31c9499a840a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=A3=E4=BA=9B=E8=8A=B1=E5=84=BF?= <1156921458@qq.com> Date: Fri, 17 Oct 2025 14:18:52 +0800 Subject: [PATCH] .. --- .../dashboard/FundDashBoardController.java | 136 +++++ .../FundSubsidyAnalysisController.java | 10 + .../TeacherCongressSessionController.java | 2 +- .../dayofficework/fund/dashboard/index.html | 422 ++++++++++++++ .../fund/subsidy/analysis/index.html | 550 ++++++++++++++++++ .../meeting/approval/index.html | 2 +- .../proposal/query/history/index.html | 2 +- .../proposal/transact/delegation/index.html | 2 +- .../proposal/transact/mine/index.html | 2 +- 9 files changed, 1123 insertions(+), 5 deletions(-) create mode 100644 src/main/java/com/budwk/app/zhgh/dayofficework/fund/dashboard/FundDashBoardController.java create mode 100644 src/main/resources/views/platform/zhgh/dayofficework/fund/dashboard/index.html create mode 100644 src/main/resources/views/platform/zhgh/dayofficework/fund/subsidy/analysis/index.html diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/fund/dashboard/FundDashBoardController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/fund/dashboard/FundDashBoardController.java new file mode 100644 index 00000000..cf4ecd14 --- /dev/null +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/fund/dashboard/FundDashBoardController.java @@ -0,0 +1,136 @@ +package com.budwk.app.zhgh.dayofficework.fund.dashboard; + +import cn.dev33.satoken.annotation.SaCheckPermission; +import cn.hutool.core.date.DateUtil; +import com.budwk.app.base.result.Result; +import com.budwk.app.sys.models.Sys_user; +import com.budwk.app.zhgh.dayofficework.fund.member.service.FundMemberService; +import com.budwk.app.zhgh.dayofficework.fund.subsidy.models.FundSubsidy; +import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.nutz.dao.Cnd; +import org.nutz.dao.Dao; +import org.nutz.dao.Sqls; +import org.nutz.dao.sql.Sql; +import org.nutz.ioc.loader.annotation.Inject; +import org.nutz.ioc.loader.annotation.IocBean; +import org.nutz.lang.util.NutMap; +import org.nutz.mvc.annotation.At; +import org.nutz.mvc.annotation.Ok; + +import java.util.HashMap; +import java.util.List; + +@IocBean +@At("/platform/fund/dashBoard") +@Ok("json:full") +@Slf4j +public class FundDashBoardController { + + @Inject + private Dao dao; + @Inject + private FundMemberService fundMemberService; + + @At("") + @Ok("beetl:/platform/zhgh/dayofficework/fund/dashboard/index.html") + @SaCheckPermission("fund.dashBoard") + public void index() { + } + + @At + @SaCheckPermission("fund.dashBoard") + @ApiOperation("统计数量") + public Result statCount() { + // 基金会员总数 + int count = dao.count(Sys_user.class, Cnd.where(Sys_user::getAidFundMember, "=", 1)); + // 本年新增基金会员数 + Sql sql = Sqls.create(""" + SELECT + count(1) + FROM + fund_member_change_record r + LEFT JOIN sys_user u ON u.loginname = r.loginName + WHERE + r.isJoin = 1 + AND YEAR(r.changeTime) = @year + AND u.aidFundMember = 1 + """); + sql.params().set("year", DateUtil.thisYear()); + sql.setCallback(Sqls.callback.integer()); + dao.execute(sql); + int newCount = sql.getInt(); + + // 医疗补助数 + int subsidyCount = dao.count(FundSubsidy.class, Cnd.NEW()); + + // 总补助金额 + int totalSubsidyCost = dao.func(FundSubsidy.class, "sum", "subsidyCost"); + + HashMap map = new HashMap<>(); + map.put("count", count); + map.put("newCount", newCount); + map.put("subsidyCount", subsidyCount); + map.put("totalSubsidyCost", totalSubsidyCost); + + return Result.success(map); + } + + @At + @SaCheckPermission("fund.dashBoard") + @ApiOperation("各分工会基金会员数") + public Result statUnionCount() { + Sql sql = Sqls.create(""" + SELECT + gh.id, + gh.`name`, + COUNT(vu.id) AS count + FROM + sys_union gh + LEFT JOIN + vw_user vu ON vu.unionId = gh.id AND vu.aidFundMember = 1 + GROUP BY + gh.id, gh.`name` + ORDER BY + gh.unionCode ASC; + """); + sql.setCallback(Sqls.callback.maps()); + dao.execute(sql); + return Result.success(sql.getList(HashMap.class)); + } + + @At + @SaCheckPermission("fund.dashBoard") + @ApiOperation("各在职状态基金会员数") + public Result userStateCount(){ + Sql sql = Sqls.create(""" + SELECT + COUNT(CASE WHEN userState != '退休' THEN 1 END) AS onDutyCount, + COUNT(CASE WHEN userState = '退休' THEN 1 END) AS retireCount + FROM + sys_user + WHERE + aidFundMember = 1; + """); + return Result.success(fundMemberService.listMap(sql)); + } + + @At + @SaCheckPermission("fund.dashBoard") + @ApiOperation("各人员类型基金会员数") + public Result personTypeCount(){ + Sql sql = Sqls.create(""" + SELECT + personType, + COUNT(*) AS userCount + FROM + sys_user + WHERE + aidFundMember = 1 + GROUP BY + personType; + """); + return Result.success(fundMemberService.listMap(sql)); + } + +} diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/fund/subsidy/controller/FundSubsidyAnalysisController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/fund/subsidy/controller/FundSubsidyAnalysisController.java index b7605dea..334ed221 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/fund/subsidy/controller/FundSubsidyAnalysisController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/fund/subsidy/controller/FundSubsidyAnalysisController.java @@ -1,7 +1,9 @@ package com.budwk.app.zhgh.dayofficework.fund.subsidy.controller; import cn.dev33.satoken.annotation.SaCheckPermission; +import com.budwk.app.base.result.Result; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; import org.nutz.ioc.loader.annotation.IocBean; import org.nutz.mvc.annotation.At; import org.nutz.mvc.annotation.Ok; @@ -19,4 +21,12 @@ public class FundSubsidyAnalysisController { } + @At + @SaCheckPermission("fundSubsidy.analysis") + @ApiOperation("年度补助人数") + public Result yearSubsidyCount() { + return Result.success(); + } + + } diff --git a/src/main/java/com/budwk/app/zhgh/democratic/teachercongress/prepare/controller/TeacherCongressSessionController.java b/src/main/java/com/budwk/app/zhgh/democratic/teachercongress/prepare/controller/TeacherCongressSessionController.java index d9dc8ce5..ee82ea1c 100644 --- a/src/main/java/com/budwk/app/zhgh/democratic/teachercongress/prepare/controller/TeacherCongressSessionController.java +++ b/src/main/java/com/budwk/app/zhgh/democratic/teachercongress/prepare/controller/TeacherCongressSessionController.java @@ -52,7 +52,7 @@ public class TeacherCongressSessionController { public Result pageData(PageForm pageForm, String j, String c, Integer year) { Sql sql = Sqls.create("select * from teacher_congress_session $condition"); Cnd cnd = Cnd.NEW(); - cnd.andEX("YEAR(startDate)", "=", year); + cnd.andEX("year", "=", year); cnd.andEX("j", "=", j); cnd.andEX("c", "=", c); cnd.desc("startDate"); diff --git a/src/main/resources/views/platform/zhgh/dayofficework/fund/dashboard/index.html b/src/main/resources/views/platform/zhgh/dayofficework/fund/dashboard/index.html new file mode 100644 index 00000000..02b417e5 --- /dev/null +++ b/src/main/resources/views/platform/zhgh/dayofficework/fund/dashboard/index.html @@ -0,0 +1,422 @@ + + + + +
+
+ +
+
+
+
+ +
+
+
{{ statCount.subsidyCount || 0 }}
+
医疗补助数
+
+
+ +
+
+ +
+
+
{{ statCount.newCount || 0 }}
+
本年新增会员数
+
+
+ +
+
+ +
+
+
{{ statCount.count || 0 }}
+
基金会员总数
+
+
+ +
+
+ +
+
+
{{ (statCount.totalSubsidyCost || 0).toLocaleString() }}
+
医疗补助总金额
+
+
+
+
+ + +
+ +
+
+
各分工会会员数量
+ + + + + + +
+
+ + +
+ +
+
在职状态分布
+
+
+ + +
+
人员类型统计
+
+
+
+
+
+
+ + + + diff --git a/src/main/resources/views/platform/zhgh/dayofficework/fund/subsidy/analysis/index.html b/src/main/resources/views/platform/zhgh/dayofficework/fund/subsidy/analysis/index.html new file mode 100644 index 00000000..1c16f3ea --- /dev/null +++ b/src/main/resources/views/platform/zhgh/dayofficework/fund/subsidy/analysis/index.html @@ -0,0 +1,550 @@ + + + + +
+
+ +
+ + 数据加载中... +
+ + +
+ + {{ error }} +
+ + +
+ + + +
+
{{ totalStats.totalPeople | number }}
+
总补助人数
+
+
+ +
+
{{ (totalStats.totalAmount / 10000) | currency }}
+
总补助金额(万元)
+
+
+ +
+
{{ totalStats.avgAmount | currency }}
+
平均补助金额(元)
+
+
+ +
+
{{ totalStats.yearCount }}
+
统计年度数
+
+
+
+ + + + + +
+ 年度补助人数趋势 + + {{ growthRates.people > 0 ? '+' : '' }}{{ growthRates.people }}% + +
+
+
+
+ + +
+ 年度补助金额趋势 + + {{ growthRates.amount > 0 ? '+' : '' }}{{ growthRates.amount }}% + +
+
+
+
+
+ + + +
+ 年度对比分析 +
+ + + + + + + + + + + + + + + + + + +
+
+
+
+ + + + diff --git a/src/main/resources/views/platform/zhgh/democratic/grassrootscongress/meeting/approval/index.html b/src/main/resources/views/platform/zhgh/democratic/grassrootscongress/meeting/approval/index.html index c32bf676..80743807 100644 --- a/src/main/resources/views/platform/zhgh/democratic/grassrootscongress/meeting/approval/index.html +++ b/src/main/resources/views/platform/zhgh/democratic/grassrootscongress/meeting/approval/index.html @@ -84,7 +84,7 @@ layout("/layouts/platform.html"){ 取消 - 退回到提案人 + 退回修改 不同意 同意 diff --git a/src/main/resources/views/platform/zhgh/democratic/proposal/query/history/index.html b/src/main/resources/views/platform/zhgh/democratic/proposal/query/history/index.html index 68164bc8..1318fb13 100644 --- a/src/main/resources/views/platform/zhgh/democratic/proposal/query/history/index.html +++ b/src/main/resources/views/platform/zhgh/democratic/proposal/query/history/index.html @@ -174,7 +174,7 @@ layout("/layouts/platform.html"){ }) }, exportDocx(id) { - window.open(loc() + "/exportDocx") + this.$downLoad("/platform/proposal/common/exportProposalAsDocx", {id}) }, tagToggle(key, val) { if (this.pageForm[key].includes(val)) { diff --git a/src/main/resources/views/platform/zhgh/democratic/proposal/transact/delegation/index.html b/src/main/resources/views/platform/zhgh/democratic/proposal/transact/delegation/index.html index db6af5d6..3416c3da 100644 --- a/src/main/resources/views/platform/zhgh/democratic/proposal/transact/delegation/index.html +++ b/src/main/resources/views/platform/zhgh/democratic/proposal/transact/delegation/index.html @@ -83,7 +83,7 @@ layout("/layouts/platform.html"){ 取消 退回到提案人 - 不同意 + 不同意 同意 diff --git a/src/main/resources/views/platform/zhgh/democratic/proposal/transact/mine/index.html b/src/main/resources/views/platform/zhgh/democratic/proposal/transact/mine/index.html index b9bb7a3c..fc4e9941 100644 --- a/src/main/resources/views/platform/zhgh/democratic/proposal/transact/mine/index.html +++ b/src/main/resources/views/platform/zhgh/democratic/proposal/transact/mine/index.html @@ -106,7 +106,7 @@ layout("/layouts/platform.html"){ {label: "提案类别", prop: "typeName"}, {label: "届次", prop: "sessionName"}, {label: "代表团", prop: "delegationName"}, - {label: "当前节点", prop: "curTaskName"}, + {label: "当前节点", prop: "taskName"}, {label: "流程状态", prop: "instanceState"} ] }