From f271b8a084ea995a7912b4f8ecb7641c03107ed8 Mon Sep 17 00:00:00 2001 From: zhouhefeng Date: Tue, 27 Jan 2026 15:29:58 +0800 Subject: [PATCH 1/4] commit --- .../controller/AidFundApplyController.java | 8 +- .../AidFundApplyMineController.java | 6 + .../AidFundFoundationAuditController.java | 9 +- .../controller/AidFundManageController.java | 48 +++- .../AidFundRetirementAuditController.java | 5 + .../AidFundUnionAuditController.java | 6 + .../aidFund/service/AidFundMemberService.java | 6 + .../impl/AidFundMemberServiceImpl.java | 51 ++++ .../aidFund/common/aidFundInfo.js | 104 ++++++- .../aidFund/common/applyInfo.js | 12 +- .../aidFund/common/payRecord.js | 4 +- .../aidFund/foundationAudit/index.html | 6 +- .../medicalMutualAid/aidFund/apply/index.html | 269 +++++++++++++++++ .../aidFund/applyMine/index.html | 113 ++++++++ .../aidFund/common/applyInfo.js | 86 ++++++ .../aidFund/common/payRecord.js | 79 +++++ .../aidFund/foundationAudit/index.html | 271 ++++++++++++++++++ .../aidFund/retirementAudit/index.html | 197 +++++++++++++ .../aidFund/unionAudit/index.html | 187 ++++++++++++ 19 files changed, 1441 insertions(+), 26 deletions(-) create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/apply/index.html create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/applyMine/index.html create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/common/applyInfo.js create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/common/payRecord.js create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/foundationAudit/index.html create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/retirementAudit/index.html create mode 100644 src/main/resources/views/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/unionAudit/index.html diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/controller/AidFundApplyController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/controller/AidFundApplyController.java index fe25e882..308241b0 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/controller/AidFundApplyController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/controller/AidFundApplyController.java @@ -73,10 +73,16 @@ public class AidFundApplyController { public void index() { } + @At("/h5") + @Ok("beetl:/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/apply/index.html") + @SaCheckPermission("h5.medicalMutualAid.aidFund.apply") + public void h5() { + } + @At @ApiOperation("查询申请状态") - @SaCheckPermission("medicalMutualAid.aidFund.apply") + @SaCheckPermission(value = {"medicalMutualAid.aidFund.apply", "h5.medicalMutualAid.aidFund.apply"}, mode = SaMode.OR) public Result canApply() { String aidFundMemberApplyEndTime = Globals.MyConfig.getString("AidFundMemberApplyEndTime"); if (StrUtil.isBlank(aidFundMemberApplyEndTime)) { diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/controller/AidFundApplyMineController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/controller/AidFundApplyMineController.java index d4057b4d..5b6c73e2 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/controller/AidFundApplyMineController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/controller/AidFundApplyMineController.java @@ -63,6 +63,12 @@ public class AidFundApplyMineController { public void index() { } + @At("/h5") + @Ok("beetl:/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/applyMine/index.html") + @SaCheckPermission("h5.medicalMutualAid.aidFund.applyMine") + public void h5() { + } + @At @ApiOperation("分页查询") @SaCheckPermission(value = {"medicalMutualAid.aidFund.applyMine", "h5.medicalMutualAid.aidFund.applyMine"}, mode = SaMode.OR) diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/controller/AidFundFoundationAuditController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/controller/AidFundFoundationAuditController.java index 838600a9..e0f9599f 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/controller/AidFundFoundationAuditController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/controller/AidFundFoundationAuditController.java @@ -9,6 +9,7 @@ import com.budwk.app.base.param.PageForm; import com.budwk.app.base.result.Result; import com.budwk.app.base.utils.PageUtil; import com.budwk.app.flow.enums.ProcessTaskStateEnum; +import com.budwk.app.web.commons.auth.utils.SecurityUtil; import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.service.AidFundMemberChangeRecordService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -51,6 +52,12 @@ public class AidFundFoundationAuditController { public void index() { } + @At("/h5") + @Ok("beetl:/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/foundationAudit/index.html") + @SaCheckPermission("h5.medicalMutualAid.aidFund.foundationAudit") + public void h5() { + } + @At @ApiOperation("分页查询") @SaCheckPermission(value = {"medicalMutualAid.aidFund.foundationAudit", "h5.medicalMutualAid.aidFund.foundationAudit"}, mode = SaMode.OR) @@ -112,7 +119,7 @@ public class AidFundFoundationAuditController { cnd.andEX("info.changeType", "=", changeType); cnd.and("t.taskName", "=", "85c7d148-44f5-4333-b854-ab225357fd3e"); -// cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId())); + cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId())); if (approval) { cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode())); diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/controller/AidFundManageController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/controller/AidFundManageController.java index 3e739a67..44a6bfbc 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/controller/AidFundManageController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/controller/AidFundManageController.java @@ -77,7 +77,7 @@ public class AidFundManageController { @At @ApiOperation("分页查询") - @SaCheckPermission(value = {"medicalMutualAid.aidFund.retirementAudit", "h5.medicalMutualAid.aidFund.retirementAudit"}, mode = SaMode.OR) + @SaCheckPermission(value = {"medicalMutualAid.aidFund.manage", "h5.medicalMutualAid.aidFund.manage"}, mode = SaMode.OR) public Result pageData(AidFundPageForm pageForm) { Sql sql = Sqls.create(""" SELECT @@ -130,7 +130,7 @@ public class AidFundManageController { @At - @SaCheckPermission(value = {"medicalMutualAid.aidFund.retirementAudit", "h5.medicalMutualAid.aidFund.retirementAudit"}, mode = SaMode.OR) + @SaCheckPermission(value = {"medicalMutualAid.aidFund.manage", "h5.medicalMutualAid.aidFund.manage"}, mode = SaMode.OR) @Ok("void") @ApiOperation("导出本年新进会员") public void exportNewMember(HttpServletResponse response) { @@ -166,7 +166,7 @@ public class AidFundManageController { @At - @SaCheckPermission(value = {"medicalMutualAid.aidFund.retirementAudit", "h5.medicalMutualAid.aidFund.retirementAudit"}, mode = SaMode.OR) + @SaCheckPermission(value = {"medicalMutualAid.aidFund.manage", "h5.medicalMutualAid.aidFund.manage"}, mode = SaMode.OR) @ApiOperation("生成缴费名单") @Aop(TransAop.READ_COMMITTED) @SLog(tag = "基金会员-基金会员台账", msg = "生成缴费名单") @@ -177,7 +177,7 @@ public class AidFundManageController { } @At - @SaCheckPermission(value = {"medicalMutualAid.aidFund.retirementAudit", "h5.medicalMutualAid.aidFund.retirementAudit"}, mode = SaMode.OR) + @SaCheckPermission(value = {"medicalMutualAid.aidFund.manage", "h5.medicalMutualAid.aidFund.manage"}, mode = SaMode.OR) @SLog(tag = "基金会员-基金会员台账", msg = "备份基金会员") @ApiOperation("备份基金会员") @Aop(TransAop.READ_COMMITTED) @@ -189,7 +189,7 @@ public class AidFundManageController { @At - @SaCheckPermission(value = {"medicalMutualAid.aidFund.retirementAudit", "h5.medicalMutualAid.aidFund.retirementAudit"}, mode = SaMode.OR) + @SaCheckPermission(value = {"medicalMutualAid.aidFund.manage", "h5.medicalMutualAid.aidFund.manage"}, mode = SaMode.OR) @SLog(tag = "基金会员-基金会员台账", msg = "批量设置退会") @ApiOperation("批量设置退会") @Aop(TransAop.READ_COMMITTED) @@ -213,7 +213,7 @@ public class AidFundManageController { @At - @SaCheckPermission(value = {"medicalMutualAid.aidFund.retirementAudit", "h5.medicalMutualAid.aidFund.retirementAudit"}, mode = SaMode.OR) + @SaCheckPermission(value = {"medicalMutualAid.aidFund.manage", "h5.medicalMutualAid.aidFund.manage"}, mode = SaMode.OR) @SLog(tag = "基金会员-基金会员台账", msg = "修改基金会员类型") @ApiOperation("修改基金会员类型") public Result doEditAidFundMemberUserType(String userId, String aidFundMemberUserType) { @@ -222,7 +222,7 @@ public class AidFundManageController { } @At - @SaCheckPermission(value = {"medicalMutualAid.aidFund.retirementAudit", "h5.medicalMutualAid.aidFund.retirementAudit"}, mode = SaMode.OR) + @SaCheckPermission(value = {"medicalMutualAid.aidFund.manage", "h5.medicalMutualAid.aidFund.manage"}, mode = SaMode.OR) @SLog(tag = "基金会员-基金会员台账", msg = "更改基金会员状态") @ApiOperation("更改基金会员状态") @Aop(TransAop.READ_COMMITTED) @@ -239,4 +239,38 @@ public class AidFundManageController { } + @At + @SaCheckPermission(value = {"medicalMutualAid.aidFund.manage", "h5.medicalMutualAid.aidFund.manage"}, mode = SaMode.OR) + public Result findOne(String userId){ + Sql sql = Sqls.create(""" + SELECT + us.username, + us.loginname, + us.mobile, + us.aidFundMemberUserType, + us.aidFundDeductTime, + us.arrivalAtSchoolDate, + us.sex, + us.unitName, + us.unionName + FROM + vw_user us + WHERE + us.id = '%s' + """.formatted(userId)); + View_user user = userService.fetchVO(sql, View_user.class); + return Result.success(user); + } + + + + @At + @SaCheckPermission(value = {"medicalMutualAid.aidFund.manage", "h5.medicalMutualAid.aidFund.manage"}, mode = SaMode.OR) + public Result findChangeRecordList(String userId){ + + List changeRecordList = aidFundMemberService.findChangeRecordList(userId); + return Result.success(changeRecordList); + } + + } diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/controller/AidFundRetirementAuditController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/controller/AidFundRetirementAuditController.java index 49656bbd..8f445701 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/controller/AidFundRetirementAuditController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/controller/AidFundRetirementAuditController.java @@ -46,6 +46,11 @@ public class AidFundRetirementAuditController { @SaCheckPermission("medicalMutualAid.aidFund.retirementAudit") public void index() { } + @At("/h5") + @Ok("beetl:/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/retirementAudit/index.html") + @SaCheckPermission("h5.medicalMutualAid.aidFund.retirementAudit") + public void h5() { + } @At diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/controller/AidFundUnionAuditController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/controller/AidFundUnionAuditController.java index 204b4147..d051b2ff 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/controller/AidFundUnionAuditController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/controller/AidFundUnionAuditController.java @@ -48,6 +48,12 @@ public class AidFundUnionAuditController { public void index() { } + @At("/h5") + @Ok("beetl:/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/unionAudit/index.html") + @SaCheckPermission("h5.medicalMutualAid.aidFund.unionAudit") + public void h5() { + } + @At @ApiOperation("分页查询") diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/service/AidFundMemberService.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/service/AidFundMemberService.java index 21aac065..106c9699 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/service/AidFundMemberService.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/service/AidFundMemberService.java @@ -2,6 +2,9 @@ package com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.service; import com.budwk.app.base.service.BaseService; import com.budwk.app.sys.models.Sys_user; +import org.nutz.lang.util.NutMap; + +import java.util.List; public interface AidFundMemberService extends BaseService { @@ -26,4 +29,7 @@ public interface AidFundMemberService extends BaseService { * @return */ Double getPayMoney(Sys_user user, Integer year); + + + List findChangeRecordList(String userId); } diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/service/impl/AidFundMemberServiceImpl.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/service/impl/AidFundMemberServiceImpl.java index d27db4f7..618afc44 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/service/impl/AidFundMemberServiceImpl.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/medicalMutualAid/aidFund/service/impl/AidFundMemberServiceImpl.java @@ -11,8 +11,12 @@ import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.model.AidFundMem import com.budwk.app.zhgh.staffbenefit.medicalMutualAid.aidFund.service.AidFundMemberService; import org.nutz.dao.Cnd; import org.nutz.dao.Dao; +import org.nutz.dao.Sqls; +import org.nutz.dao.sql.Sql; +import org.nutz.dao.util.cri.SqlExpressionGroup; import org.nutz.ioc.loader.annotation.IocBean; import org.nutz.lang.Strings; +import org.nutz.lang.util.NutMap; import java.util.ArrayList; import java.util.Calendar; @@ -117,5 +121,52 @@ public class AidFundMemberServiceImpl extends BaseServiceImpl implements AidFund return (year + 1 - beforeYear) * money + (year - beforeYear) * money * 0.1; } + @Override + public List findChangeRecordList(String userId) { + Sql sql = Sqls.create(""" + SELECT + info.*, + us.sex, + us.username, + us.loginname, + us.arrivalAtSchoolDate, + us.mobile, + us.unitName, + us.unionName, + us.aidFundMemberUserType, + ins.id AS instanceId, + ins.businessNo, + ins.state instanceState, + ins.variable instanceVariable, + ins.processDefineId instanceProcessDefineId, + t.id taskId, + t.taskName AS taskKey, + t.displayName taskName, + t.taskType, + t.performType taskPerformType, + t.taskState, + t.finishTime, + t.taskParentId, + t.variable taskVariable, + IF((SELECT taskName FROM wf_process_task tt WHERE tt.id = t.taskParentId) = 'startTask', 1, 0) canRevoke, + (select MAX(id) from wf_process_task where processInstanceId = ins.id and taskName = 'startTask' AND taskState in (10,20)) AS startTaskId + FROM + `aid_fund_member_change_record` info + LEFT JOIN vw_user us ON us.id = info.userId + 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 + $condition + """); + Cnd cnd = Cnd.NEW(); + SqlExpressionGroup group = new SqlExpressionGroup(); + group.or("ins.state", "=", 20); + group.or("ins.state", "is", null); + cnd.and(group); + cnd.and("info.userId", "=", userId); + sql.setCondition(cnd); + return listMap(sql); + } + } diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/medicalMutualAid/aidFund/common/aidFundInfo.js b/src/main/resources/views/platform/zhgh/staffbenefit/medicalMutualAid/aidFund/common/aidFundInfo.js index aef51849..6a963354 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/medicalMutualAid/aidFund/common/aidFundInfo.js +++ b/src/main/resources/views/platform/zhgh/staffbenefit/medicalMutualAid/aidFund/common/aidFundInfo.js @@ -1,6 +1,106 @@ + const AID_FUND_INFO = { template: /*language=HTML*/ ` - - ` +
+ + + + {{viewData.username}} + {{viewData.loginname}} + {{viewData.mobile}} + {{viewData.sex}} + + {{$moment(viewData.arrivalAtSchoolDate).format('YYYY-MM-DD')}} + + + {{viewData.aidFundMemberUserType}} + + + {{viewData.aidFundDeductTime}} + + {{viewData.unitName}} + {{viewData.unionName}} + + + + + + + + + + + + + + + + + `, + store, + dicts: ["AIDFUND_MEMBER_USER_TYPE", "AIDFUND_MEMBER_CHANGE_TYPE"], + data() { + return { + viewData: {}, + changeRecordTableData: [], + activeName:"one", + tableColumns: [ + {prop: "loginname", label: "工号"}, + {prop: "username", label: "姓名"}, + {prop: "sex", label: "性别"}, + {prop: "arrivalAtSchoolDate", label: "入校时间"}, + {prop: "unitName", label: "所属单位"}, + {prop: "unionName", label: "所属工会"}, + {prop: "aidFundMemberUserType", label: "基金会员类型"}, + {prop: "changeType", label: "变更类型"}, + {prop: "applyTime", label: "变更时间"}, + ], + } + }, + components: { + 'pay_record': PAY_RECORD, + }, + methods: { + // 打开 + onOpen(row) { + this.row = row + this.info() + this.findChangeRecordList() + this.$refs.payRecord.getUserPayRecordList(row.id) + }, + // 获取申请信息 + info() { + this.$axios.post("/platform/medicalMutualAid/aidFund/manage/findOne", {userId: this.row.id}).then((res) => { + if (res.code === 0) { + this.viewData = res.data + } + }) + }, + // 获取申请信息 + findChangeRecordList() { + this.$axios.post("/platform/medicalMutualAid/aidFund/manage/findChangeRecordList", {userId: this.row.id}).then((res) => { + if (res.code === 0) { + this.changeRecordTableData = res.data + } + }) + }, + } } diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/medicalMutualAid/aidFund/common/applyInfo.js b/src/main/resources/views/platform/zhgh/staffbenefit/medicalMutualAid/aidFund/common/applyInfo.js index 837972eb..0458e777 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/medicalMutualAid/aidFund/common/applyInfo.js +++ b/src/main/resources/views/platform/zhgh/staffbenefit/medicalMutualAid/aidFund/common/applyInfo.js @@ -5,11 +5,12 @@ const APPLY_INFO = { 点击查看流程图
- {{viewData.username}} + {{viewData.username}} {{viewData.loginname}} {{viewData.mobile}} {{viewData.sex}} - {{$moment(viewData.arrivalAtSchoolDate).format('YYYY-MM-DD')}} + {{$moment(viewData.arrivalAtSchoolDate).format('YYYY-MM-DD')}} + {{viewData.unitName}} {{viewData.unionName}} @@ -40,11 +41,6 @@ const APPLY_INFO = { :value="task.ext.submitType"> - - {{ task.taskFormData.opinion }} @@ -58,7 +54,7 @@ const APPLY_INFO = { `, store, - dicts: ["AIDFUND_MEMBER_USER_TYPE", "AIDFUND_MEMBER_CHANGE_TYPE"], + dicts: ["AIDFUND_MEMBER_USER_TYPE", "AIDFUND_MEMBER_CHANGE_TYPE", "PROCESS_TASK_SUBMIT_TYPE"], data() { return { viewData: {}, diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/medicalMutualAid/aidFund/common/payRecord.js b/src/main/resources/views/platform/zhgh/staffbenefit/medicalMutualAid/aidFund/common/payRecord.js index a2d86385..beb7601b 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/medicalMutualAid/aidFund/common/payRecord.js +++ b/src/main/resources/views/platform/zhgh/staffbenefit/medicalMutualAid/aidFund/common/payRecord.js @@ -29,8 +29,8 @@ const PAY_RECORD = { } }, methods: { - getUserPayRecordList() { - this.$axios.post('/platform/medicalMutualAid/aidFund/apply/getUserPayRecordList').then(resp => { + getUserPayRecordList(userId) { + this.$axios.post('/platform/medicalMutualAid/aidFund/apply/getUserPayRecordList',{userId}).then(resp => { if (resp.code === 0) { this.payRecordList = resp.data } diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/medicalMutualAid/aidFund/foundationAudit/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/medicalMutualAid/aidFund/foundationAudit/index.html index 68c60521..74ede38f 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/medicalMutualAid/aidFund/foundationAudit/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/medicalMutualAid/aidFund/foundationAudit/index.html @@ -130,11 +130,9 @@ layout("/layouts/platform.html"){
{{formData.taskName}}
- + - 审核状态: 拒绝 通过 @@ -146,7 +144,6 @@ layout("/layouts/platform.html"){ - 入校时间: - 缴纳费用: diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/apply/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/apply/index.html new file mode 100644 index 00000000..0f8f02a6 --- /dev/null +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/apply/index.html @@ -0,0 +1,269 @@ + + + + + +
+ + + + + 温馨提醒:入校时间关联会费缴纳金额,请确认是否正确,若有疑问请联系校工会!另外,务必按您的实际情况选择基金会员类型! + + + + + + + + + + + + + + + + + + + + + +
+ +
+ 中国地质大学(武汉)教职工重大疾病互助基金管理办法 +
+
+
+ + +
+ {{ applyInfo.label }} + +
+ +
+ + + + +
+ + + +
+ + 本次入会,您需要缴费会费{{ payMoney }}元,请详知。 + + + +
+ +
+ + + + diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/applyMine/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/applyMine/index.html new file mode 100644 index 00000000..68bd55b6 --- /dev/null +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/applyMine/index.html @@ -0,0 +1,113 @@ + + +
+ + + + + + + +
+ + + + + + diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/common/applyInfo.js b/src/main/resources/views/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/common/applyInfo.js new file mode 100644 index 00000000..18f1c70c --- /dev/null +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/common/applyInfo.js @@ -0,0 +1,86 @@ +const AID_FUND_INFO = { + template: /*language=HTML*/ + ` + +
+ + {{viewData.username}} + {{viewData.loginname}} + {{viewData.mobile}} + {{viewData.sex}} + {{$moment(viewData.arrivalAtSchoolDate).format('YYYY-MM-DD')}} + {{viewData.unitName}} + {{viewData.unionName}} + + + + +
+ +
+ `, + dicts: ["PROCESS_TASK_SUBMIT_TYPE"], + data() { + return { + visible: false, + row: {}, + viewData: {}, + doneTasks: [], + } + }, + methods: { + // 打开 + onOpen(row) { + this.row = row + this.visible = true + this.info() + this.getDoneTasks() + }, + + // 关闭 + onClose() { + this.visible = false + }, + + // 获取申请信息 + info() { + this.$axios.post("/platform/medicalMutualAid/aidFund/apply/info", {id: this.row.id}).then((res) => { + if (res.code === 0) { + this.viewData = res.data + } + }) + }, + + // 获取已办任务审批记录 + getDoneTasks() { + this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => { + if (res.code === 0) { + this.doneTasks = res.data + } + }) + }, + } +} diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/common/payRecord.js b/src/main/resources/views/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/common/payRecord.js new file mode 100644 index 00000000..88ccebe5 --- /dev/null +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/common/payRecord.js @@ -0,0 +1,79 @@ +const payRecord = { + template: /*language=HTML*/ ` +
+ + + + + + + + + + + + + + + + + + +
+ `, + props: { + }, + data() { + return { + loading: true, + activeNames: [] , + records: [] + } + }, + watch: { + userid: 'getPayRecords' + }, + methods: { + onExpand(names) { + // 如需异步加载详情可在此处理 + + }, + titleTemplate(row, idx) { + return '序号 ' + (idx + 1) + ' · ' + row.year + ' · ¥' + row.money + }, + async getPayRecords(userId) { + this.loading = true + try { + this.$axios.post("/platform/medicalMutualAid/aidFund/apply/getUserPayRecordList",{userId}).then(resp=>{ + if (resp.code === 0){ + this.records = resp.data + } + }) + } catch (e) { + this.$notify({ type: 'danger', message: '获取缴费记录失败' }) + } finally { + this.loading = false + } + } + }, + style: /*language=CSS*/ ` + .pay-row { + margin-bottom: 8px; + background: #fafafa; + border-radius: 4px; + overflow: hidden; + } + ` +} diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/foundationAudit/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/foundationAudit/index.html new file mode 100644 index 00000000..bf0d7c90 --- /dev/null +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/foundationAudit/index.html @@ -0,0 +1,271 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + +
+
{{formData.taskName}}
+ + + + +
+ + +
+ +
+
+ 关闭 + 提交 +
+
+
+ +
+ + + + + diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/retirementAudit/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/retirementAudit/index.html new file mode 100644 index 00000000..c8a0f216 --- /dev/null +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/retirementAudit/index.html @@ -0,0 +1,197 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + +
+
{{formData.taskName}}
+ + + +
+ 关闭 + 拒绝 + 同意 +
+
+
+ +
+ + + + + diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/unionAudit/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/unionAudit/index.html new file mode 100644 index 00000000..88c780c9 --- /dev/null +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/medicalMutualAid/aidFund/unionAudit/index.html @@ -0,0 +1,187 @@ + +
+ + + + + + + + + + + + + + + + + + +
+
{{formData.taskName}}
+ + + +
+ 关闭 + 拒绝 + 同意 +
+
+
+ +
+ + + + + From c05f04d7d9ba9c32d90baa238e8d3ded6850edc9 Mon Sep 17 00:00:00 2001 From: zhouhefeng Date: Tue, 27 Jan 2026 15:30:50 +0800 Subject: [PATCH 2/4] commit --- .../staffbenefit/medicalMutualAid/aidFund/payRecord/index.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/medicalMutualAid/aidFund/payRecord/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/medicalMutualAid/aidFund/payRecord/index.html index b39c3728..a3b10a20 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/medicalMutualAid/aidFund/payRecord/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/medicalMutualAid/aidFund/payRecord/index.html @@ -164,8 +164,7 @@ layout("/layouts/platform.html"){ }, methods: { openImport() { - this.$refs.guava.edit() - this.$nextTick(() => { + this.$refs.guava.edit(()=>{ setTimeout(() => { this.$refs.viewImport.resetImportData() this.$refs.viewImport.importData.year = this.pageForm.year From e0fb1f8c7633b890f717bbd43ab0ca1994331047 Mon Sep 17 00:00:00 2001 From: = <=> Date: Wed, 28 Jan 2026 11:45:46 +0800 Subject: [PATCH 3/4] =?UTF-8?q?=E5=9B=B0=E9=9A=BE=E5=B8=AE=E6=89=B6?= =?UTF-8?q?=E7=A7=BB=E6=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/budwk/app/sys/utils/DateUtil.java | 159 +++++++++ .../DifficultHelpApplyController.java | 29 ++ ...cultHelpBranchUnionApprovalController.java | 4 +- ...lpBranchUnionLeaderApprovalController.java | 128 +++++++ .../DifficultHelpMineController.java | 4 +- .../DifficultHelpReadingController.java | 318 +++++++++++++++++- ...cultHelpSchoolUnionApprovalController.java | 18 +- .../models/DifficultHelpInfo.java | 41 ++- .../difficulthelp/apply/index.html | 302 ++++++++++------- .../branchunionapproval/index.html | 9 +- .../staffbenefit/difficulthelp/common/info.js | 64 ++-- .../difficulthelp/mine/index.html | 11 +- .../difficulthelp/reading/index.html | 27 +- .../schoolunionapproval/index.html | 78 +++-- .../unionLeaderApproval/form.html | 45 +++ .../unionLeaderApproval/index.html | 221 ++++++++++++ 16 files changed, 1274 insertions(+), 184 deletions(-) create mode 100644 src/main/java/com/budwk/app/sys/utils/DateUtil.java create mode 100644 src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpBranchUnionLeaderApprovalController.java create mode 100644 src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/unionLeaderApproval/form.html create mode 100644 src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/unionLeaderApproval/index.html diff --git a/src/main/java/com/budwk/app/sys/utils/DateUtil.java b/src/main/java/com/budwk/app/sys/utils/DateUtil.java new file mode 100644 index 00000000..d2c7d4fe --- /dev/null +++ b/src/main/java/com/budwk/app/sys/utils/DateUtil.java @@ -0,0 +1,159 @@ +package com.budwk.app.sys.utils; + +import org.apache.commons.lang3.time.DateFormatUtils; +import org.nutz.ioc.loader.annotation.IocBean; +import org.nutz.lang.Times; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Calendar; +import java.util.Date; +import java.util.Locale; + +/** + * Created by wizzer on 2016/6/24. + */ +@IocBean +public class DateUtil { + private static final Locale DEFAULT_LOCALE = Locale.CHINA; + private static final SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + + public static Integer getYear() { + return Calendar.getInstance().get(Calendar.YEAR); + } + + /** + * 获取当前时间(HH:mm:ss) + * + * @return + */ + public static String getDate() { + return DateFormatUtils.format(new Date(), "yyyy-MM-dd", DEFAULT_LOCALE); + } + + + /** + * 获取当前时间(HH:mm:ss) + * + * @return + */ + public static String getTime() { + return DateFormatUtils.format(new Date(), "HH:mm:ss", DEFAULT_LOCALE); + } + + /** + * 获取当前时间(yyyy-MM-dd HH:mm:ss) + * + * @return + */ + public static String getDateTime() { + return DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm:ss", DEFAULT_LOCALE); + } + + /** + * 获取当前时间(yyyy-MM-dd HH:mm) + * + * @return + */ + public static String getDateTime2() { + return DateFormatUtils.format(new Date(), "yyyy-MM-dd HH:mm", DEFAULT_LOCALE); + } + + /** + * 转换日期格式(yyyy-MM-dd HH:mm:ss) + * + * @param date + * @return + */ + public static String formatDateTime(Date date) { + if (date == null) return ""; + return DateFormatUtils.format(date, "yyyy-MM-dd HH:mm:ss", DEFAULT_LOCALE); + } + + /** + * 转换日期格式(yyyy-MM-dd) + * + * @param date + * @return + */ + public static String formatDate(Date date) { + if (date == null) return ""; + return DateFormatUtils.format(date, "yyyy-MM-dd", DEFAULT_LOCALE); + } + + /** + * 转换日期格式(yyyy-MM-dd HH:mm:ss) + * + * @param date + * @param f + * @return + */ + public static String format(Date date, String f) { + if (date == null) return ""; + return DateFormatUtils.format(date, f, DEFAULT_LOCALE); + } + + /** + * 时间戳日期 + * + * @param time + * @return + */ + public static String getDate(long time) { + return DateFormatUtils.format(new Date(time * 1000), "yyyy-MM-dd HH:mm:ss", DEFAULT_LOCALE); + } + + /** + * 时间戳日期 + * + * @param time + * @param f + * @return + */ + public static String getDate(long time, String f) { + return DateFormatUtils.format(new Date(time * 1000), f, DEFAULT_LOCALE); + } + + /** + * 通过字符串时间获取时间戳 nutzwk5.0改为long + * + * @param date + * @return + */ + public static long getTime(String date) { + try { + return Times.parse(sdf, date).getTime() / 1000; + } catch (ParseException e) { + return 0; + } + } + + /** + * 通过字符串时间获取时间戳 nutzwk5.0改为long + * + * @param date + * @return + */ + public static long getTime(SimpleDateFormat sdf, String date) { + try { + return Times.parse(sdf, date).getTime() / 1000; + } catch (ParseException e) { + return 0; + } + } + + /** + * 通过字符串时间转时间戳 + * + * @param data + * @return + */ + public static long formatDate(String data) { + try { + return new SimpleDateFormat("yyyy-MM-dd HH:mm").parse(data).getTime(); + } catch (ParseException e) { + e.printStackTrace(); + return 0; + } + } +} diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpApplyController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpApplyController.java index 26636ef6..9172c36e 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpApplyController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpApplyController.java @@ -13,6 +13,8 @@ import com.budwk.app.flow.entity.ProcessInstance; import com.budwk.app.flow.entity.ProcessTask; import com.budwk.app.flow.enums.ProcessSubmitTypeEnum; import com.budwk.app.flow.service.FlowCommonService; +import com.budwk.app.sys.models.Sys_config; +import com.budwk.app.sys.utils.DateUtil; import com.budwk.app.web.commons.auth.utils.AuthUtil; import com.budwk.app.web.commons.auth.utils.SecurityUtil; import com.budwk.app.zhgh.staffbenefit.difficulthelp.models.DifficultHelpInfo; @@ -34,6 +36,7 @@ import org.nutz.mvc.annotation.Param; import java.util.Date; import java.util.List; +import java.util.Map; /** * @version 1.0 @@ -75,6 +78,32 @@ public class DifficultHelpApplyController { public void h5() { } + @At + @ApiOperation("获取申请次数和时间") + @SaCheckPermission("member.apply.submit") + public Result getIsCanPlay() { + //获取申请次数,不想再写一个接口, are you ok? .and("zt", "=", 600) + int applyCount = dao.count(DifficultHelpInfo.class, Cnd.where("proxyUserId", "=", SecurityUtil.getUserId())); + Sys_config startConfig = dao.fetch(Sys_config.class, Cnd.where("configKey", "=", "DifficultyApplyStartTime")); + Sys_config endConfig = dao.fetch(Sys_config.class, Cnd.where("configKey", "=", "DifficultyApplyEndTime")); + if(startConfig != null && endConfig != null) { + // 获取今天的日期 + String today = cn.hutool.core.date.DateUtil.today(); + // 开始 + String start = DateUtil.getYear() + "-" + startConfig.getConfigValue(); + // 结束 + String end = DateUtil.getYear() + "-" + endConfig.getConfigValue(); + // 比较 + int startResult = cn.hutool.core.date.DateUtil.compare(cn.hutool.core.date.DateUtil.parse(today), cn.hutool.core.date.DateUtil.parse(start)); + int endResult = cn.hutool.core.date.DateUtil.compare(cn.hutool.core.date.DateUtil.parse(today), cn.hutool.core.date.DateUtil.parse(end)); + + String time = startConfig.getConfigValue().replace("-", "月") + "日-" + endConfig.getConfigValue().replace("-", "月") + "日"; + return Result.success(Map.of("applyCount", applyCount,"time", time, "result", startResult >=0 && endResult <= 0)); + } else { + return Result.success(Map.of("applyCount", applyCount,"time", "", "result", false)); + } + } + @At @ApiOperation("保存申请") @SaCheckPermission("member.apply.submit") diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpBranchUnionApprovalController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpBranchUnionApprovalController.java index 4f95cc7d..f07fbc79 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpBranchUnionApprovalController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpBranchUnionApprovalController.java @@ -73,7 +73,9 @@ public class DifficultHelpBranchUnionApprovalController { info.unitName, info.unionName, info.subsidyStandards, - info.applyTime, + LEFT(info.applyTime, 10) AS applyTime, + info.applyCount, + info.mobile, ins.id AS instanceId, ins.businessNo, ins.state instanceState, diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpBranchUnionLeaderApprovalController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpBranchUnionLeaderApprovalController.java new file mode 100644 index 00000000..6d8f320e --- /dev/null +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpBranchUnionLeaderApprovalController.java @@ -0,0 +1,128 @@ +package com.budwk.app.zhgh.staffbenefit.difficulthelp.controller; + +import cn.dev33.satoken.annotation.SaCheckPermission; +import cn.hutool.core.util.StrUtil; +import com.budwk.app.base.page.Pagination; +import com.budwk.app.base.result.Result; +import com.budwk.app.base.utils.PageUtil; +import com.budwk.app.flow.enums.ProcessTaskStateEnum; +import com.budwk.app.web.commons.auth.utils.SecurityUtil; +import com.budwk.app.zhgh.staffbenefit.difficulthelp.service.DifficultHelpCommonService; +import com.budwk.app.zhgh.staffbenefit.difficulthelp.vo.DifficultHelpPageParam; +import io.swagger.annotations.ApiOperation; +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.List; + +/** + * @version 1.0 + * @Author zzr + * @name:DifficultHelpBranchUnionApprovalController + * @Date 2025/7/31 11:47 + * @注释 + */ +@IocBean +@Ok("json") +@ApiOperation("困难补助二级党组织审核") +@At("/platform/difficultHelp/unionLeaderApproval") +public class DifficultHelpBranchUnionLeaderApprovalController { + + @Inject + private Dao dao; + @Inject + private DifficultHelpCommonService difficultHelpCommonService; + + @At("") + @SaCheckPermission("difficultHelp.unionLeaderApproval") + @Ok("beetl:/platform/zhgh/staffbenefit/difficulthelp/unionLeaderApproval/index.html") + public void index() { + } + + @At + @SaCheckPermission("difficultHelp.unionLeaderApproval") + @Ok("beetl:/platform/zhgh/staffbenefit/difficulthelp/unionLeaderApproval/form.html") + public void form() { + } + + @At + @SaCheckPermission("h5.difficultHelp.unionLeaderApproval") + @Ok("beetl:/platform/zhghh5/staffbenefit/difficulthelp/unionLeaderApproval/index.html") + public void h5() { + } + + + @At + @ApiOperation("困难补助分工会审核列表") + @SaCheckPermission("difficultHelp.unionLeaderApproval") + public Result pageData(DifficultHelpPageParam pageParam) { + Sql sql = Sqls.create(""" + SELECT + info.id, + info.proxyUserName, + info.proxyLoginName, + info.userName, + info.loginName, + info.unitName, + info.unionName, + info.subsidyStandards, + LEFT(info.applyTime, 10) AS applyTime, + info.applyCount, + info.mobile, + ins.id AS instanceId, + ins.businessNo, + ins.state instanceState, + ins.variable instanceVariable, + ins.processDefineId instanceProcessDefineId, + t.id taskId, + t.taskName AS taskKey, + t.displayName taskName, + t.taskType, + t.performType taskPerformType, + t.taskState, + t.finishTime, + t.taskParentId, + t.variable taskVariable, + IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName, + IF(rt.id IS NOT NULL, 1, 0) AS canRevoke + FROM + wf_process_task t + LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId + LEFT JOIN difficult_help_info info ON info.id = ins.businessNo + LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id + LEFT JOIN wf_process_task nt ON nt.processInstanceId = ins.id AND nt.taskState = 10 + LEFT JOIN wf_process_task rt ON rt.processInstanceId = ins.id AND rt.taskParentId = t.id AND rt.taskState = 10 + $condition + """); + Cnd cnd = Cnd.NEW(); + pageParam.buildSearch(cnd, "info."); + + cnd.and("t.taskName", "=", "36ebafda-44c2-4bd3-bd7f-10839a575a0d"); + cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId())); + + if (pageParam.getAudit()) { + cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode())); + } else { + cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode()); + } + if (StrUtil.isAllBlank(pageParam.getPageOrderName(), pageParam.getPageOrderBy())) { + cnd.desc("t.createdAt"); + cnd.desc("info.applyTime"); + } else { + cnd.orderBy("info." + pageParam.getPageOrderName(), PageUtil.getOrder(pageParam.getPageOrderBy())); + } + cnd.groupBy("t.id"); + sql.setCondition(cnd); + + Pagination pagination = difficultHelpCommonService.listPageMap(pageParam.getPageNumber(), pageParam.getPageSize(), sql); + return Result.success().addData(pagination); + } + +} diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpMineController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpMineController.java index c5120d0d..46471a69 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpMineController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpMineController.java @@ -75,7 +75,9 @@ public class DifficultHelpMineController { info.unitName, info.unionName, info.subsidyStandards, - info.applyTime, + LEFT(info.applyTime, 10) AS applyTime, + info.applyCount, + info.mobile, ins.id AS instanceId, ins.businessNo, ins.state instanceState, diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpReadingController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpReadingController.java index 8efb5355..d964ce78 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpReadingController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpReadingController.java @@ -1,13 +1,46 @@ package com.budwk.app.zhgh.staffbenefit.difficulthelp.controller; +import cn.afterturn.easypoi.excel.ExcelExportUtil; +import cn.afterturn.easypoi.excel.entity.TemplateExportParams; import cn.dev33.satoken.annotation.SaCheckLogin; import cn.dev33.satoken.annotation.SaCheckPermission; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.io.FileUtil; +import cn.hutool.core.io.IoUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.json.JSONUtil; +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.CommonDownloadUtil; +import com.budwk.app.base.utils.MoneyUtil; +import com.budwk.app.base.utils.OfficePlusUtil; +import com.budwk.app.base.utils.SysOfficeTemplateUtil; import com.budwk.app.flow.engine.FlowEngine; +import com.budwk.app.sys.models.Sys_union; +import com.budwk.app.sys.models.Sys_user; +import com.budwk.app.sys.services.SysUserService; +import com.budwk.app.web.commons.auth.utils.AuthUtil; +import com.budwk.app.web.commons.auth.utils.SecurityUtil; +import com.budwk.app.web.commons.base.Globals; +import com.budwk.app.zhgh.activity.declarereimbursement.vo.ActivityBudgetVO; +import com.budwk.app.zhgh.dayofficework.unionReimburse.model.UnionReimburse; +import com.budwk.app.zhgh.staffbenefit.difficulthelp.models.DifficultHelpInfo; import com.budwk.app.zhgh.staffbenefit.difficulthelp.service.DifficultHelpCommonService; import com.budwk.app.zhgh.staffbenefit.difficulthelp.vo.DifficultHelpPageParam; +import com.deepoove.poi.XWPFTemplate; +import com.deepoove.poi.config.Configure; +import com.deepoove.poi.data.PictureRenderData; +import com.deepoove.poi.plugin.table.LoopRowTableRenderPolicy; +import com.google.zxing.BarcodeFormat; +import com.google.zxing.client.j2se.MatrixToImageWriter; +import com.google.zxing.common.BitMatrix; +import com.google.zxing.qrcode.QRCodeWriter; import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; +import org.apache.commons.io.IOUtils; +import org.apache.poi.ss.usermodel.Workbook; +import org.ddr.poi.html.HtmlRenderPolicy; import org.nutz.aop.interceptor.ioc.TransAop; import org.nutz.dao.Cnd; import org.nutz.dao.Dao; @@ -16,11 +49,26 @@ import org.nutz.dao.sql.Sql; import org.nutz.ioc.aop.Aop; import org.nutz.ioc.loader.annotation.Inject; import org.nutz.ioc.loader.annotation.IocBean; +import org.nutz.lang.Lang; +import org.nutz.lang.random.R; import org.nutz.lang.util.NutMap; import org.nutz.mvc.annotation.At; import org.nutz.mvc.annotation.Ok; import org.nutz.mvc.annotation.Param; +import javax.servlet.http.HttpServletResponse; +import java.awt.image.BufferedImage; +import java.io.*; +import java.net.URLEncoder; +import java.nio.file.Files; +import java.nio.file.StandardOpenOption; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.zip.ZipEntry; +import java.util.zip.ZipOutputStream; + /** * @version 1.0 * @Author zzr @@ -32,6 +80,7 @@ import org.nutz.mvc.annotation.Param; @Ok("json") @ApiOperation("困难补助汇总阅览") @At("/platform/difficultHelp/reading") +@Slf4j public class DifficultHelpReadingController { @Inject @@ -40,6 +89,10 @@ public class DifficultHelpReadingController { private FlowEngine flowEngine; @Inject private DifficultHelpCommonService difficultHelpCommonService; + @Inject + private SysUserService sysUserService; + @Inject + private SysOfficeTemplateUtil sysOfficeTemplateUtil; @At("") @SaCheckPermission("difficultHelp.reading") @@ -62,7 +115,9 @@ public class DifficultHelpReadingController { info.unitName, info.unionName, info.subsidyStandards, - info.applyTime, + LEFT(info.applyTime, 10) AS applyTime, + info.applyCount, + info.mobile, ins.id AS instanceId, ins.businessNo, ins.state instanceState, @@ -104,4 +159,265 @@ public class DifficultHelpReadingController { flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id); return Result.success(); } + + @At + @Ok("void") + public void doExportAllApply(DifficultHelpPageParam pageParam, HttpServletResponse response) throws Exception { + Sql sql = Sqls.create(""" + SELECT + info.id, + info.proxyUserName, + info.proxyLoginName, + info.userName, + info.loginName, + info.unitName, + info.unionName, + info.subsidyStandards, + LEFT(info.applyTime, 10) AS applyTime, + info.applyCount, + info.mobile, + info.sex, + info.homeIncome, + info.homeNumber, + info.position, + info.officialCapacity, + info.homeAddress, + info.bankOfDeposit, + info.bankCardNum, + info.reason, + info.applyTime as fullApplyTime, + info.familyList + FROM + difficult_help_info info + $condition + """); + Cnd cnd = Cnd.NEW(); + pageParam.buildSearch(cnd, "info."); + cnd.groupBy("info.id"); + sql.setCondition(cnd); + List list = difficultHelpCommonService.listMap(sql); + + response.setContentType("application/octet-stream"); + response.setHeader("content-disposition", "attachment;filename=" + + URLEncoder.encode("申请表汇总.zip", "UTF-8")); + + try (ZipOutputStream zipOutputStream = new ZipOutputStream(response.getOutputStream())) { + for (int i = 0; i < list.size(); i++) { + NutMap record = list.get(i); + + HashMap docData = new HashMap<>(); + docData.put("unionName", record.getString("unitName")); + docData.put("proxyUserName", record.getString("proxyUserName")); + docData.put("sex", record.getString("sex")); + docData.put("loginName", record.getString("loginName")); + docData.put("unitName", record.getString("unitName")); + docData.put("homeIncome", record.getDouble("homeIncome")); + docData.put("homeNumber", record.getInt("homeNumber")); + docData.put("position", record.getString("position")); + docData.put("officialCapacity", record.getString("officialCapacity")); + docData.put("mobile", record.getString("mobile")); + docData.put("userName", record.getString("userName")); + docData.put("homeAddress", record.getString("homeAddress")); + docData.put("bankOfDeposit", record.getString("bankOfDeposit")); + docData.put("bankCardNum", record.getString("bankCardNum")); + docData.put("reason", record.getString("reason")); + docData.put("applyTime", DateUtil.format(DateUtil.parse(record.getString("applyTime")), "yyyy年MM月dd日")); + docData.put("schoolname", "中国地质大学(武汉)"); + docData.put("year", DateUtil.format(DateUtil.parse(record.getString("applyTime")), "yyyy")); + + String familyListStr = record.getString("familyList"); + if (StrUtil.isNotBlank(familyListStr)) { + docData.put("familyList", JSONUtil.toList(familyListStr, Object.class)); + } else { + docData.put("familyList", new ArrayList<>()); + } + + String fileName = (i + 1) + record.getString("userName") + "申请表.docx"; + zipOutputStream.putNextEntry(new ZipEntry(fileName)); + + LoopRowTableRenderPolicy policy = new LoopRowTableRenderPolicy(); + Configure config = Configure.builder().bind("familyList", policy).build(); + + XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate("difficulty_apply"), config) + .render(docData) + .write(zipOutputStream); + zipOutputStream.closeEntry(); + } + zipOutputStream.flush(); + } + } + + + @At + @Ok("void") + public void doExportApply(String id, HttpServletResponse response, Boolean print) throws Exception { + DifficultHelpInfo difficultHelp = difficultHelpCommonService.fetch(id); + if (difficultHelp == null) { + throw new RuntimeException("该条记录不存在"); + } + HashMap docData = new HashMap<>(); + + docData.put("unionName", difficultHelp.getUnitName()); + docData.put("proxyUserName", difficultHelp.getProxyUserName()); + docData.put("sex", difficultHelp.getSex()); + docData.put("loginName", difficultHelp.getLoginName()); + docData.put("unitName", difficultHelp.getUnitName()); + docData.put("homeIncome", difficultHelp.getHomeIncome()); + docData.put("homeNumber", difficultHelp.getHomeNumber()); + docData.put("position", difficultHelp.getPosition()); + docData.put("officialCapacity", difficultHelp.getOfficialCapacity()); + docData.put("mobile", difficultHelp.getMobile()); + docData.put("userName", difficultHelp.getUserName()); + docData.put("homeAddress", difficultHelp.getHomeAddress()); + docData.put("bankOfDeposit", difficultHelp.getBankOfDeposit()); + docData.put("bankCardNum", difficultHelp.getBankCardNum()); + docData.put("reason", difficultHelp.getReason()); + docData.put("applyTime", DateUtil.format(difficultHelp.getApplyTime(), "yyyy-MM-dd")); + docData.put("schoolname","中国地质大学(武汉)"); + docData.put("year",DateUtil.format(difficultHelp.getApplyTime(), "yyyy")); + + docData.put("familyList", difficultHelp.getFamilyList() != null ? difficultHelp.getFamilyList() : new ArrayList<>()); + + LoopRowTableRenderPolicy familyPolicy = new LoopRowTableRenderPolicy(); + Configure config = Configure.builder() + .bind("familyList", familyPolicy) + .build(); + + String templateName= "difficulty_apply"; + if (print) { + exportAsPDF(templateName, docData, config, difficultHelp, response); + } else { + exportAsWord(templateName, docData, config, difficultHelp,response); + } + } + + @At + private void exportAsPDF(String templateName, HashMap docData,Configure config, + DifficultHelpInfo difficultHelp, HttpServletResponse response) throws Exception { + String fileName = "中国地质大学(武汉)困难慰问申请表_" + difficultHelp.getUserName() + "_" + + DateUtil.format(difficultHelp.getApplyTime(), "yyyyMMdd") + ".pdf"; + + try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) { + XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate(templateName),config) + .render(docData) + .writeAndClose(byteArrayOutputStream); + byte[] bytes = byteArrayOutputStream.toByteArray(); + File sourceFile = File.createTempFile("file_convert_origin", ".docx"); + Files.write(sourceFile.toPath(), bytes, StandardOpenOption.WRITE); + + File pdfFile = File.createTempFile("file_convert", ".pdf"); + OfficePlusUtil.convert(sourceFile.getPath(), pdfFile.getPath()); + CommonDownloadUtil.download(fileName, IoUtil.readBytes(FileUtil.getInputStream(pdfFile)), response); + // 删除临时文件 + FileUtil.del(sourceFile); + FileUtil.del(pdfFile.toPath()); + } catch (IOException e) { + log.error("困难慰问申请表导出PDF失败,id:{},错误信息:{}", difficultHelp.getId(), e.getMessage()); + } + } + + @At + private void exportAsWord(String templateName, HashMap docData,Configure config, + DifficultHelpInfo difficultHelp, HttpServletResponse response) throws Exception { + String fileName = "中国地质大学(武汉)困难慰问申请表_" + difficultHelp.getUserName() + "_" + + DateUtil.format(difficultHelp.getApplyTime(), "yyyyMMdd") + ".docx"; + + try (ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream()) { + XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate(templateName),config) + .render(docData) + .writeAndClose(byteArrayOutputStream); + CommonDownloadUtil.download(fileName, byteArrayOutputStream.toByteArray(), response); + } catch (IOException e) { + log.error("困难慰问申请表导出Word失败,id:{},错误信息:{}", difficultHelp.getId(), e.getMessage()); + } + } + + @At + @Ok("void") + public void exportSummary(DifficultHelpPageParam pageParam,String flag, + HttpServletResponse response) throws Exception { + NutMap result = new NutMap(); + Sql sql = Sqls.create(""" + SELECT + info.userName, + info.loginName, + info.sex, + info.idCard, + us.age, + info.position, + info.officialCapacity, + concat(info.position, '/', info.officialCapacity) as zwzc, + info.unitName, + info.mobile, + info.reason, + info.level, + concat(info.homeIncome, '万元') as homeIncome, + info.homeNumber, + info.subsidyStandards, + info.bankOfDeposit, + info.bankCardNum, + info.applyCount + FROM + difficult_help_info info + LEFT JOIN `vw_user` us ON info.userId = us.id + $condition + """); + Cnd cnd = Cnd.NEW(); + pageParam.buildSearch(cnd, "info."); + cnd.groupBy("info.id"); + sql.setCondition(cnd); + List list = difficultHelpCommonService.listMap(sql); + Sys_user user = sysUserService.fetch(SecurityUtil.getUserId()); + + for (int i = 0; i < list.size(); i++) { + list.get(i).put("index", (i + 1)); + } + + result.put("schoolName", "中国地址大学(武汉)"); + result.put("year", DateUtil.format(new Date(), "yyyy")); + result.put("applyTime", DateUtil.format(new Date(), "yyyy年MM月dd日")); + result.put("proxyUserName",SecurityUtil.getUserUsername() ); + result.put("mobile", user.getMobile()); + result.put("da", list); + + String resource; + if ("xlsx".equals(flag)) { + resource = "difficulty_summary_xlsx"; + if (AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) { + resource = "difficulty_summary_school_xlsx"; + } + } else { + resource = "difficulty_summary"; + if (AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) { + resource = "difficulty_summary_school"; + } + } + + String fileName = "困难慰问汇总表_" + DateUtil.format(new Date(), "yyyyMMdd"); + + if ("xlsx".equals(flag)) { + try { + InputStream is = sysOfficeTemplateUtil.getTemplate(resource); + TemplateExportParams exportParams = new TemplateExportParams(is, null); + Workbook workbook = ExcelExportUtil.exportExcel(exportParams, result); + CommonDownloadUtil.download(fileName + ".xlsx", workbook, response); + } catch (Exception e) { + log.error("导出Excel汇总表失败", e); + throw new RuntimeException("导出Excel汇总表失败:" + e.getMessage()); + } + } else if ("docx".equals(flag)) { + try (ByteArrayOutputStream out = new ByteArrayOutputStream()) { + Configure config = Configure.builder() + .bind("da", new LoopRowTableRenderPolicy()) + .build(); + + XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate(resource), config) + .render(result) + .writeAndClose(out); + CommonDownloadUtil.download(fileName + ".docx", out.toByteArray(), response); + } + } + } + + } diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpSchoolUnionApprovalController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpSchoolUnionApprovalController.java index 886b8b3b..a778b68e 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpSchoolUnionApprovalController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/controller/DifficultHelpSchoolUnionApprovalController.java @@ -1,12 +1,15 @@ package com.budwk.app.zhgh.staffbenefit.difficulthelp.controller; import cn.dev33.satoken.annotation.SaCheckPermission; +import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; +import com.budwk.app.base.annotation.SLog; import com.budwk.app.base.page.Pagination; import com.budwk.app.base.result.Result; import com.budwk.app.base.utils.PageUtil; import com.budwk.app.flow.enums.ProcessTaskStateEnum; import com.budwk.app.web.commons.auth.utils.SecurityUtil; +import com.budwk.app.zhgh.staffbenefit.difficulthelp.models.DifficultHelpInfo; import com.budwk.app.zhgh.staffbenefit.difficulthelp.service.DifficultHelpCommonService; import com.budwk.app.zhgh.staffbenefit.difficulthelp.vo.DifficultHelpPageParam; import io.swagger.annotations.ApiOperation; @@ -19,7 +22,9 @@ 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 org.nutz.mvc.annotation.Param; +import java.util.Date; import java.util.List; /** @@ -72,7 +77,9 @@ public class DifficultHelpSchoolUnionApprovalController { info.unitName, info.unionName, info.subsidyStandards, - info.applyTime, + LEFT(info.applyTime, 10) AS applyTime, + info.applyCount, + info.mobile, ins.id AS instanceId, ins.businessNo, ins.state instanceState, @@ -122,4 +129,13 @@ public class DifficultHelpSchoolUnionApprovalController { return Result.success().addData(pagination); } + @At + @ApiOperation("保存补助金额、级别") + @SaCheckPermission("difficultHelp.schoolUnionApproval") + @SLog(tag = "困难补助申请", msg = "保存申请,填写人: ${args[0].proxyUserName}") + public Result save(@Param("data") DifficultHelpInfo difficultHelpInfo) { + dao.updateIgnoreNull(difficultHelpInfo); + return Result.success(); + } + } diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/models/DifficultHelpInfo.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/models/DifficultHelpInfo.java index 795ea8aa..7f16c9e5 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/models/DifficultHelpInfo.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/difficulthelp/models/DifficultHelpInfo.java @@ -114,7 +114,12 @@ public class DifficultHelpInfo extends BaseModel { private String idCard; @Column - @Comment("职务职称") + @Comment("职务") + @ColDefine(type = ColType.VARCHAR, width = 100) + private String position; + + @Column + @Comment("职称") @ColDefine(type = ColType.VARCHAR, width = 100) private String officialCapacity; @@ -140,7 +145,22 @@ public class DifficultHelpInfo extends BaseModel { private String homeAddress; @Column - @Comment("补助标准") + @Comment("家庭年总收入") + @ColDefine(type = ColType.VARCHAR, width = 200) + private Double homeIncome; + + @Column + @Comment("家庭人数") + @ColDefine(type = ColType.VARCHAR, width = 200) + private Integer homeNumber; + + @Column + @Comment("补助类型") + @ColDefine(type = ColType.VARCHAR, width = 500) + private String subsidy; + + @Column + @Comment("困难类型") @ColDefine(type = ColType.VARCHAR, width = 500) private String subsidyStandards; @@ -150,7 +170,7 @@ public class DifficultHelpInfo extends BaseModel { private List familyList; @Column - @Comment("申请理由") + @Comment("生活致困原因") @ColDefine(type = ColType.VARCHAR, width = 500) private String reason; @@ -168,4 +188,19 @@ public class DifficultHelpInfo extends BaseModel { @Comment("申请人签字") @ColDefine(type = ColType.VARCHAR, width = 500) private String sign; + + @Column + @Comment("申请次数") + @ColDefine(type = ColType.INT) + private Integer applyCount; + + @Column + @Comment("补助金额") + @ColDefine(type = ColType.VARCHAR, width = 200) + private Double money; + + @Column + @Comment("补助级别") + @ColDefine(type = ColType.VARCHAR, width = 200) + private String level; } diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/apply/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/apply/index.html index 3f2e41be..bbc4e825 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/apply/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/difficulthelp/apply/index.html @@ -2,7 +2,7 @@ layout("/layouts/platform.html"){ #-->
- + @@ -11,21 +11,20 @@ layout("/layouts/platform.html"){ - - - - - + label="替他人申请" value="2"> - + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + v-model="formData.idCard" maxlength="18"> - - - - - + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - + v-model="formData.bankOfDeposit"> + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + - - - + + + + + + + + + + + + + + + + + + + + + + + + - + - + + + + - + - + + + + @@ -41,12 +41,18 @@ module.exports = { methods: { async isScoreTopEight() { - this.tableColumns = [] - this.tableData = [] - const {data} = await this.$axios.post(loc() + "/isScoreTopEight", this.Form) - const table = data.score.sort(this.compare("totalScore")) - this.tableData = table.slice(0, 8) - + try { + this.tableLoading = true + this.tableColumns = [] + this.tableData = [] + const {data} = await this.$axios.post(loc() + "/isScoreTopEight", this.Form) + const table = data.score.sort(this.compare("totalScore")) + this.tableData = table.slice(0, 8) + } catch (e) { + this.$message.error(e.msg) + } finally { + this.tableLoading = false + } }, diff --git a/src/main/resources/static/components/module/activity/score/topEight.vue b/src/main/resources/static/components/module/activity/score/topEight.vue index 9a4c7c9c..02378b5a 100644 --- a/src/main/resources/static/components/module/activity/score/topEight.vue +++ b/src/main/resources/static/components/module/activity/score/topEight.vue @@ -1,5 +1,5 @@