From 81fd5cb773ec99e50ce0c20397afaae9c4a81e26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B0=8C=E5=85=88=E8=88=9C?= <2499071264@qq.com> Date: Fri, 30 Oct 2026 20:30:12 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E7=89=B9=E6=AE=8A=E6=85=B0=E9=97=AE?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E4=BC=98=E5=8C=962?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/CondolenceReadController.java | 9 ---- .../SpecialCondolenceApplyController.java | 10 ++-- .../SpecialCondolenceReadController.java | 24 +++++----- .../20261030/特殊慰问_模块菜单及流程.sql | 3 ++ ..._import.xlsx => 特殊慰问对象导入模板.xlsx} | Bin .../specialcondolence/apply/config.html | 6 +-- .../specialcondolence/apply/index.html | 31 +++++------- .../specialcondolence/apply/recipients.js | 14 ++++++ .../specialcondolence/common/info.js | 25 +++++----- .../specialcondolence/apply/index.html | 44 +++++++++++++----- .../specialcondolence/common/info.css | 8 +++- .../specialcondolence/common/info.js | 2 +- .../fourthApproval/index.html | 12 +++-- .../schoolPrincipalApproval/index.html | 12 +++-- .../schoolUnionApproval/index.html | 12 +++-- 15 files changed, 130 insertions(+), 82 deletions(-) rename src/main/resources/templates/special_condolence/{special_condolence_import.xlsx => 特殊慰问对象导入模板.xlsx} (100%) diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/condolence/controller/CondolenceReadController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/condolence/controller/CondolenceReadController.java index 718f61a..033776e 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/condolence/controller/CondolenceReadController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/condolence/controller/CondolenceReadController.java @@ -6,7 +6,6 @@ import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity; import cn.dev33.satoken.annotation.SaCheckPermission; import cn.hutool.core.util.StrUtil; -import com.budwk.app.base.constant.RoleConstant; import com.budwk.app.base.page.Pagination; import com.budwk.app.base.param.PageForm; import com.budwk.app.base.result.Result; @@ -15,8 +14,6 @@ import com.budwk.app.base.utils.PageUtil; import com.budwk.app.flow.entity.ProcessInstance; import com.budwk.app.flow.enums.ProcessInstanceStateEnum; import com.budwk.app.sys.param.SysMsgSummaryPageForm; -import com.budwk.app.web.commons.auth.utils.AuthUtil; -import com.budwk.app.web.commons.auth.utils.SecurityUtil; import com.budwk.app.zhgh.staffbenefit.condolence.model.Condolence; import com.budwk.app.zhgh.staffbenefit.condolence.service.CondolenceService; import io.swagger.annotations.Api; @@ -107,9 +104,6 @@ public class CondolenceReadController { cnd.and(seg); } - if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_CHAIRMAN.name())) { - cnd.and("info.applyUnionId", "=", SecurityUtil.getUnionId()); - } if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) { cnd.desc("info.createTime"); @@ -154,9 +148,6 @@ public class CondolenceReadController { seg.or("con.helpLoginName", "like", "%" + pageForm.getSearchKeyword() + "%"); cnd.and(seg); } - if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_CHAIRMAN.name())) { - cnd.and("con.applyUnionId", "=", SecurityUtil.getUnionId()); - } sql.setCondition(cnd); List list = condolenceService.listMap(sql); diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/specialcondolence/controller/SpecialCondolenceApplyController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/specialcondolence/controller/SpecialCondolenceApplyController.java index dfe97fd..ba6f725 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/specialcondolence/controller/SpecialCondolenceApplyController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/specialcondolence/controller/SpecialCondolenceApplyController.java @@ -11,6 +11,7 @@ import com.budwk.app.base.annotation.SLog; import com.budwk.app.base.constant.RoleConstant; import com.budwk.app.base.page.Pagination; import com.budwk.app.base.result.Result; +import com.budwk.app.base.utils.SysOfficeTemplateUtil; import com.budwk.app.flow.constant.FlowConst; import com.budwk.app.flow.engine.FlowEngine; import com.budwk.app.flow.entity.ProcessInstance; @@ -62,6 +63,8 @@ public class SpecialCondolenceApplyController { private SpecialCondolenceService specialcondolenceService; @Inject private FlowCommonService flowCommonService; + @Inject + private SysOfficeTemplateUtil sysOfficeTemplateUtil; @At("/") @Ok("beetl:/platform/zhgh/staffbenefit/specialcondolence/apply/index.html") @@ -181,9 +184,10 @@ public class SpecialCondolenceApplyController { @Ok("void") @SaCheckPermission(value = {"special_condolence.apply", "h5.special_condolence.apply"}, mode = SaMode.OR) public void importTemplate(javax.servlet.http.HttpServletResponse response) throws Exception { - try (java.io.InputStream input = getClass().getResourceAsStream("/templates/special_condolence/special_condolence_import.xlsx")) { - if (input == null) throw new com.budwk.app.base.exception.BaseException("导入模板不存在"); - com.budwk.app.base.utils.CommonDownloadUtil.download("特殊慰问导入模板.xlsx", input.readAllBytes(), response); + String templateCode = "special_condolence_import"; + try (java.io.InputStream input = sysOfficeTemplateUtil.getTemplate(templateCode)) { + com.budwk.app.base.utils.CommonDownloadUtil.download( + sysOfficeTemplateUtil.getTemplateFileName(templateCode), input.readAllBytes(), response); } } diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/specialcondolence/controller/SpecialCondolenceReadController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/specialcondolence/controller/SpecialCondolenceReadController.java index dc04eb5..6fe106e 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/specialcondolence/controller/SpecialCondolenceReadController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/specialcondolence/controller/SpecialCondolenceReadController.java @@ -6,7 +6,6 @@ import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; import cn.afterturn.easypoi.excel.entity.params.ExcelExportEntity; import cn.dev33.satoken.annotation.SaCheckPermission; import cn.hutool.core.util.StrUtil; -import com.budwk.app.base.constant.RoleConstant; import com.budwk.app.base.page.Pagination; import com.budwk.app.base.param.PageForm; import com.budwk.app.base.result.Result; @@ -15,8 +14,6 @@ import com.budwk.app.base.utils.PageUtil; import com.budwk.app.flow.entity.ProcessInstance; import com.budwk.app.flow.enums.ProcessInstanceStateEnum; import com.budwk.app.sys.param.SysMsgSummaryPageForm; -import com.budwk.app.web.commons.auth.utils.AuthUtil; -import com.budwk.app.web.commons.auth.utils.SecurityUtil; import com.budwk.app.zhgh.staffbenefit.specialcondolence.model.SpecialCondolence; import com.budwk.app.zhgh.staffbenefit.specialcondolence.service.SpecialCondolenceService; import io.swagger.annotations.Api; @@ -107,9 +104,6 @@ public class SpecialCondolenceReadController { cnd.and(seg); } - if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_CHAIRMAN.name())) { - cnd.and("info.applyUnionId", "=", SecurityUtil.getUnionId()); - } if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) { cnd.desc("info.createTime"); @@ -134,13 +128,22 @@ public class SpecialCondolenceReadController { //查询审核通过的数据 Sql sql = Sqls.create(""" select - con.*, - type.name as typeName + con.subject, + case when recipient.id is null then con.helpUserName else recipient.helpUserName end as helpUserName, + case when recipient.id is null then con.helpLoginName else recipient.helpLoginName end as helpLoginName, + con.applyUserName, + con.helpUnionName, + con.helpUnitName, + case when recipient.id is null then type.name else recipient.typeName end as typeName, + case when recipient.id is null then con.money else recipient.money end as money, + con.remark from special_condolence con + left join special_condolence_recipient recipient on recipient.applyId = con.id and recipient.delFlag = false left join wf_process_instance ins on ins.businessNo = con.id left join special_condolence_type type on type.id = con.type $condition + order by con.createTime desc, con.id, recipient.sortNum, recipient.id """); Cnd cnd = Cnd.NEW(); cnd.and("ins.state", "=", ProcessInstanceStateEnum.FINISHED.getCode()); @@ -154,9 +157,6 @@ public class SpecialCondolenceReadController { seg.or("con.helpLoginName", "like", "%" + pageForm.getSearchKeyword() + "%"); cnd.and(seg); } - if (!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_CHAIRMAN.name())) { - cnd.and("con.applyUnionId", "=", SecurityUtil.getUnionId()); - } sql.setCondition(cnd); List list = specialcondolenceService.listMap(sql); @@ -168,7 +168,7 @@ public class SpecialCondolenceReadController { exportEntities.add(new ExcelExportEntity("所在工会", "helpUnionName", 20)); exportEntities.add(new ExcelExportEntity("所在单位", "helpUnitName", 20)); exportEntities.add(new ExcelExportEntity("慰问类型", "typeName", 20)); - exportEntities.add(new ExcelExportEntity("拟补贴金额", "money", 20)); + exportEntities.add(new ExcelExportEntity("慰问金额", "money", 20)); exportEntities.add(new ExcelExportEntity("申请理由", "remark", 20)); ExportParams exportParams = new ExportParams(); diff --git a/src/main/resources/db/script/20261030/特殊慰问_模块菜单及流程.sql b/src/main/resources/db/script/20261030/特殊慰问_模块菜单及流程.sql index 757d94f..6eba55c 100644 --- a/src/main/resources/db/script/20261030/特殊慰问_模块菜单及流程.sql +++ b/src/main/resources/db/script/20261030/特殊慰问_模块菜单及流程.sql @@ -186,6 +186,7 @@ VALUES ('7f4a820d5a394bb8a0a92d6699afe7c8', '42b4b5f54593cf023961ad1c9ce36f53'), INSERT INTO sys_role_menu (roleId, menuId) VALUES ('494ac71eb8b44d0e99e19b7fde6bd469', '4c46696d75ff0eddf5cb57fac3e5d06d'), + ('494ac71eb8b44d0e99e19b7fde6bd469', '8d5ebaa091eee01abb33e89e3dcc92f8'), ('494ac71eb8b44d0e99e19b7fde6bd469', '7f66eb63b6ebd81c5eee9c5c2de2ed98'); -- 特殊慰问 h5 @@ -199,6 +200,7 @@ VALUES INSERT INTO sys_role_menu (roleId, menuId) VALUES ('6aece46b946e4fb9ac4cb15c0cd8c3e6', '4c46696d75ff0eddf5cb57fac3e5d06d'), + ('6aece46b946e4fb9ac4cb15c0cd8c3e6', '8d5ebaa091eee01abb33e89e3dcc92f8'), ('6aece46b946e4fb9ac4cb15c0cd8c3e6', 'b24a5bef9ccbf7241c5bb85e80352f8f'); -- 特殊慰问 h5 @@ -212,6 +214,7 @@ VALUES INSERT INTO sys_role_menu (roleId, menuId) VALUES ('b3854469e6f44901b22bb791cb538431', '4c46696d75ff0eddf5cb57fac3e5d06d'), + ('b3854469e6f44901b22bb791cb538431', '8d5ebaa091eee01abb33e89e3dcc92f8'), ('b3854469e6f44901b22bb791cb538431', '9c37242f50c5fb4a9c1b2b9b9dd0e2fd'); -- 特殊慰问 h5 diff --git a/src/main/resources/templates/special_condolence/special_condolence_import.xlsx b/src/main/resources/templates/special_condolence/特殊慰问对象导入模板.xlsx similarity index 100% rename from src/main/resources/templates/special_condolence/special_condolence_import.xlsx rename to src/main/resources/templates/special_condolence/特殊慰问对象导入模板.xlsx diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/specialcondolence/apply/config.html b/src/main/resources/views/platform/zhgh/staffbenefit/specialcondolence/apply/config.html index d4cd800..b712feb 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/specialcondolence/apply/config.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/specialcondolence/apply/config.html @@ -1,16 +1,16 @@ - + - + - + diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/specialcondolence/apply/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/specialcondolence/apply/index.html index fc2da6c..c64602b 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/specialcondolence/apply/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/specialcondolence/apply/index.html @@ -12,24 +12,25 @@ layout("/layouts/platform.html"){ class="flow-task-form"> - - + + - {{formData.applyUserName}} - {{formData.applyLoginName}} - {{formData.applyUnitName}} - {{formData.applyUnionName}} + {{formData.applyUserName}} + {{formData.applyLoginName}} - + {{formData.applyUnitName}} + {{formData.applyUnionName}} + + - +