From 7e4fd94817b8bf7ef88d1893fc2e97692320bcbb Mon Sep 17 00:00:00 2001 From: zhouhefeng Date: Tue, 9 Dec 2025 09:58:25 +0800 Subject: [PATCH] commit --- .../budwk/app/base/constant/RoleConstant.java | 5 + .../declare/models/ActivityDeclareInfo.java | 2 + .../ActivityReimbursementApplyController.java | 102 ++- ...ityReimbursementBranchUnionController.java | 9 + ...yReimbursementClubPrincipalController.java | 9 + .../ActivityReimbursementMineController.java | 18 +- ...eimbursementSchoolPrincipalController.java | 9 + ...ityReimbursementSchoolUnionController.java | 34 + .../models/ActivityReimbursementInfo.java | 19 +- ...tivityReimbursementSchoolUnionService.java | 10 + .../service/ActivityReimbursementService.java | 19 + ...tyReimbursementSchoolUnionServiceImpl.java | 130 +++ .../ActivityReimbursementServiceImpl.java | 96 ++ .../vo/CommonPageParam.java | 6 + .../ActivityBudgetApplyListController.java | 18 +- ...tivityBudgetApplyStatisticsController.java | 16 +- ...tivityBudgetQueryStatisticsController.java | 8 +- .../ActivityBudgetSchoolAuditController.java | 4 +- .../activityBudget/models/ActivityBudget.java | 4 + .../ActivityBudgetApplyStatisticsService.java | 2 +- .../ActivityBudgetQueryStatisticsService.java | 2 +- .../service/ActivityBudgetService.java | 5 +- ...ivityBudgetApplyStatisticsServiceImpl.java | 3 +- ...ivityBudgetQueryStatisticsServiceImpl.java | 5 +- .../impl/ActivityBudgetServiceImpl.java | 7 +- .../OutlayManageClubController.java | 12 +- .../OutlayManageSchoolController.java | 6 +- .../OutlayManageUnionController.java | 12 +- .../components/plugins/sysSignature/pc.vue | 1 - .../resources/views/layouts/platform.html | 8 - .../resources/views/layouts/platform_h5.html | 1 - .../views/layouts/v4/baseLayout.html | 5 +- .../reimbursement/apply/index.html | 855 +++++++++++------- .../reimbursement/branchunion/index.html | 43 +- .../reimbursement/clubprincipal/index.html | 43 +- .../reimbursement/common/info.js | 247 ++--- .../reimbursement/mine/index.html | 398 ++++---- .../reimbursement/schoolprincipal/index.html | 44 +- .../reimbursement/schoolunion/index.html | 48 +- .../activityBudget/applyList/index.html | 15 +- .../activityBudget/applyStatistics/index.html | 13 +- .../outlay/activityBudget/info.js | 9 +- .../activityBudget/queryStatistics/index.html | 8 +- .../activityBudget/schoolAudit/index.html | 12 + 44 files changed, 1548 insertions(+), 774 deletions(-) create mode 100644 src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/service/ActivityReimbursementSchoolUnionService.java create mode 100644 src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/service/impl/ActivityReimbursementSchoolUnionServiceImpl.java diff --git a/src/main/java/com/budwk/app/base/constant/RoleConstant.java b/src/main/java/com/budwk/app/base/constant/RoleConstant.java index 1c86960..a93eec8 100644 --- a/src/main/java/com/budwk/app/base/constant/RoleConstant.java +++ b/src/main/java/com/budwk/app/base/constant/RoleConstant.java @@ -92,6 +92,11 @@ RoleConstant { PSYCHOLOGY_DOCTOR("心理咨询师"), LEGAL_DOCTOR("法律顾问"), + + UNION_REIMBURSEMENT_MANAGER("分工会报销负责人"), + CLUB_REIMBURSEMENT_MANAGER("协会报销负责人"), + SCHOOL_REIMBURSEMENT_MANAGER("校工会报销负责人"), + ; /** * 避免和枚举类的name冲突 diff --git a/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/declare/models/ActivityDeclareInfo.java b/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/declare/models/ActivityDeclareInfo.java index 7f47188..4b789a4 100644 --- a/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/declare/models/ActivityDeclareInfo.java +++ b/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/declare/models/ActivityDeclareInfo.java @@ -3,6 +3,7 @@ package com.budwk.app.zhgh.activity.declarereimbursement.declare.models; import cn.hutool.json.JSONObject; import com.budwk.app.base.model.BaseModel; import com.budwk.app.zhgh.activity.declarereimbursement.vo.ActivityBudgetVO; +import io.swagger.annotations.ApiOperation; import lombok.Data; import lombok.EqualsAndHashCode; import org.nutz.dao.entity.annotation.*; @@ -22,6 +23,7 @@ import java.util.List; @Data @Table @EqualsAndHashCode(callSuper = true) +@ApiOperation(value = "活动经费申报信息") public class ActivityDeclareInfo extends BaseModel { @Name diff --git a/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/controller/ActivityReimbursementApplyController.java b/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/controller/ActivityReimbursementApplyController.java index 546b163..8413a58 100644 --- a/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/controller/ActivityReimbursementApplyController.java +++ b/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/controller/ActivityReimbursementApplyController.java @@ -6,6 +6,7 @@ import cn.hutool.core.lang.Dict; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; 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.PageUtil; @@ -15,11 +16,13 @@ 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.web.commons.auth.utils.AuthUtil; import com.budwk.app.web.commons.auth.utils.SecurityUtil; import com.budwk.app.zhgh.activity.declarereimbursement.declare.models.ActivityDeclareInfo; import com.budwk.app.zhgh.activity.declarereimbursement.vo.CommonPageParam; import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.models.ActivityReimbursementInfo; import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service.ActivityReimbursementService; +import com.budwk.app.zhgh.dayofficework.outlay.outlayReimburse.service.OutlayReimburseApplyService; import io.swagger.annotations.ApiOperation; import org.nutz.aop.interceptor.ioc.TransAop; import org.nutz.dao.Cnd; @@ -38,7 +41,9 @@ import org.nutz.mvc.annotation.Param; import javax.validation.Valid; import java.math.BigDecimal; import java.util.ArrayList; +import java.util.Date; import java.util.List; +import java.util.Objects; /** * @version 1.0 @@ -61,6 +66,8 @@ public class ActivityReimbursementApplyController { private FlowCommonService flowCommonService; @Inject private ActivityReimbursementService activityReimbursementService; + @Inject + private OutlayReimburseApplyService outlayReimburseApplyService; @At("") @SaCheckPermission("activityReimbursement.apply") @@ -80,6 +87,10 @@ public class ActivityReimbursementApplyController { @SaCheckPermission("member.apply.submit") @SLog(tag = "活动申报", msg = "保存申请,申请人: ${args[0].username}") public Result save(@Param("data") ActivityReimbursementInfo activityReimbursementInfo) { + activityReimbursementInfo.setUserId(SecurityUtil.getUserId()); + activityReimbursementInfo.setLoginName(SecurityUtil.getUserLoginname()); + activityReimbursementInfo.setUserName(SecurityUtil.getUserUsername()); + activityReimbursementInfo.setApplyTime(new Date()); if (StrUtil.isBlank(activityReimbursementInfo.getDeclareId())) { activityReimbursementInfo.setDeclareId(activityReimbursementInfo.getDeclareId()); } @@ -88,6 +99,12 @@ public class ActivityReimbursementApplyController { .mapToDouble(v -> ObjectUtil.defaultIfNull(v.getActualPrice(), 0D)) .sum(); activityReimbursementInfo.setActualMoney(new BigDecimal(sum)); + + // 验证金额 + Result result = activityReimbursementService.bxAddValidate(activityReimbursementInfo.getDeductionBudgetId(), activityReimbursementInfo.getActualMoney(), activityReimbursementInfo.getOutlayManageSource(), activityReimbursementInfo.getClubId()); + if (Lang.isNotEmpty(result)) { + return result; + } dao.insertOrUpdate(activityReimbursementInfo); return Result.success(); } @@ -98,7 +115,11 @@ public class ActivityReimbursementApplyController { @Aop(TransAop.READ_COMMITTED) @SaCheckPermission("member.apply.submit") @SLog(tag = "活动申报", msg = "提交申请,申请人: ${args[0].username}") - public Result submit(@Param("data") ActivityReimbursementInfo activityReimbursementInfo){ + public Result submit(@Param("data") ActivityReimbursementInfo activityReimbursementInfo) { + activityReimbursementInfo.setUserId(SecurityUtil.getUserId()); + activityReimbursementInfo.setLoginName(SecurityUtil.getUserLoginname()); + activityReimbursementInfo.setUserName(SecurityUtil.getUserUsername()); + activityReimbursementInfo.setApplyTime(new Date()); if (StrUtil.isBlank(activityReimbursementInfo.getDeclareId())) { activityReimbursementInfo.setDeclareId(activityReimbursementInfo.getDeclareId()); } @@ -108,13 +129,20 @@ public class ActivityReimbursementApplyController { .mapToDouble(v -> ObjectUtil.defaultIfNull(v.getActualPrice(), 0D)) .sum(); activityReimbursementInfo.setActualMoney(new BigDecimal(sum)); + + // 验证金额 + Result result = activityReimbursementService.bxAddValidate(activityReimbursementInfo.getDeductionBudgetId(), activityReimbursementInfo.getActualMoney(), activityReimbursementInfo.getOutlayManageSource(), activityReimbursementInfo.getClubId()); + if (Lang.isNotEmpty(result)) { + return result; + } + dao.insertOrUpdate(activityReimbursementInfo); // 开启流程实例 Dict args = Dict.create(); args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode()); args.set(FlowConst.FORM_DATA, activityReimbursementInfo); - args.set("type", activityReimbursementInfo.getActivityType()); + args.set("outlayManageSource", activityReimbursementInfo.getOutlayManageSource()); ProcessInstance instance = flowEngine.startProcessInstanceByKey("HDBX", activityReimbursementInfo.getId(), SecurityUtil.getUserId(), args); // 自动完成第一个申请任务 @@ -141,6 +169,13 @@ public class ActivityReimbursementApplyController { .mapToDouble(v -> ObjectUtil.defaultIfNull(v.getActualPrice(), 0D)) .sum(); activityReimbursementInfo.setActualMoney(new BigDecimal(sum)); + +// 验证金额 + Result result = activityReimbursementService.bxAddValidate(activityReimbursementInfo.getDeductionBudgetId(), activityReimbursementInfo.getActualMoney(), activityReimbursementInfo.getOutlayManageSource(), activityReimbursementInfo.getClubId()); + if (Lang.isNotEmpty(result)) { + return result; + } + dao.insertOrUpdate(activityReimbursementInfo); Dict dict = Dict.create(); @@ -154,29 +189,48 @@ public class ActivityReimbursementApplyController { @At @ApiOperation("获取当前用户活动报销") @SaCheckPermission("activityReimbursement.apply") - public Result getActivityReimbursementByUser(String id) { + public Result getActivityReimbursementByUser(String id, String outlayManageSource, String clubId) { + String activityType = ""; if (StrUtil.isNotBlank(id)) { ActivityReimbursementInfo reimbursementInfo = dao.fetch(ActivityReimbursementInfo.class, id); + if (Objects.equals(reimbursementInfo.getActivityReimbursementMode(), "daily")) { + return Result.success(); + } ActivityDeclareInfo info = dao.fetch(ActivityDeclareInfo.class, reimbursementInfo.getDeclareId()); return Result.success().addData(List.of(info)); } // 查询已经报销成功的记录 + Cnd reiCnd = Cnd.NEW(); + reiCnd.and("info.outlayManageSource", "=", outlayManageSource); + if (Objects.equals(outlayManageSource, "ACTIVITY_BUDGET_TYPE_TWO")) { + reiCnd.and("info.unionId", "=", SecurityUtil.getUnionId()); + } else if (Objects.equals(outlayManageSource, "ACTIVITY_BUDGET_TYPE_THREE")) { + reiCnd.and("info.clubId", "=", clubId); + } + reiCnd.and("ins.state", "in", List.of(10, 20)); Sql reiSql = Sqls.create(""" SELECT info.declareId FROM activity_reimbursement_info info LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id - WHERE - userId = @userId - AND ins.state IN (10, 20) - """).setParam("userId", SecurityUtil.getUserId()); + $condition + """); + reiSql.setCondition(reiCnd); reiSql.setCallback(Sqls.callback.strList()); dao.execute(reiSql); List reiDecIdList = reiSql.getList(String.class); - Sql sql = Sqls.create("select declareId from activity_reimbursement_info where userId = @userId").setParam("userId", SecurityUtil.getUserId()); + Cnd cnd = Cnd.NEW(); + cnd.and("outlayManageSource", "=", outlayManageSource); + if (Objects.equals(outlayManageSource, "ACTIVITY_BUDGET_TYPE_TWO")) { + cnd.and("unionId", "=", SecurityUtil.getUnionId()); + } else if (Objects.equals(outlayManageSource, "ACTIVITY_BUDGET_TYPE_THREE")) { + cnd.and("clubId", "=", clubId); + } + Sql sql = Sqls.create("select declareId from activity_reimbursement_info $condition"); + sql.setCondition(cnd); sql.setCallback(Sqls.callback.strList()); dao.execute(sql); List declareIdList = sql.getList(String.class); @@ -189,23 +243,32 @@ public class ActivityReimbursementApplyController { LEFT JOIN wf_process_instance ins ON info.id = ins.businessNo $condition """); - Cnd cnd = Cnd.NEW(); + Cnd applyCnd = Cnd.NEW(); + + if (Objects.equals(outlayManageSource, "ACTIVITY_BUDGET_TYPE_TWO")) { + applyCnd.and("info.unionId", "=", SecurityUtil.getUnionId()); + activityType="BRANCH_UNION"; + } else if (Objects.equals(outlayManageSource, "ACTIVITY_BUDGET_TYPE_THREE")) { + applyCnd.and("info.clubId", "=", clubId); + activityType="CLUB"; + }else{ + activityType="SCHOOL_UNION"; + } + applyCnd.and("info.activityType", "=", activityType); if (Lang.isNotEmpty(declareIdList)) { - cnd.and("info.id", "not in", declareIdList); + applyCnd.and("info.id", "not in", declareIdList); } if (Lang.isNotEmpty(reiDecIdList)) { - cnd.and("info.id", "not in", reiDecIdList); + applyCnd.and("info.id", "not in", reiDecIdList); } - cnd.and("info.userId", "=", SecurityUtil.getUserId()); - cnd.and("ins.state", "=", 20); - applySql.setCondition(cnd); + applyCnd.and("ins.state", "=", 20); + applySql.setCondition(applyCnd); List resultList = activityReimbursementService.listMap(applySql); return Result.success().addData(resultList); } - @At @ApiOperation("获取收款人卡号") @SaCheckPermission("activityReimbursement.apply") @@ -234,4 +297,13 @@ public class ActivityReimbursementApplyController { return Result.success().addData(map); } + + @At + @ApiOperation("获取申报的记录") + @SaCheckPermission("activityReimbursement.apply") + public Result getBudgetByYear(String outlayManageSource, String clubId) { + List budgetMoney = activityReimbursementService.getBudgetMoney(outlayManageSource, clubId); + return Result.success(budgetMoney); + } + } diff --git a/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/controller/ActivityReimbursementBranchUnionController.java b/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/controller/ActivityReimbursementBranchUnionController.java index 30cfbc7..a66a81f 100644 --- a/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/controller/ActivityReimbursementBranchUnionController.java +++ b/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/controller/ActivityReimbursementBranchUnionController.java @@ -69,6 +69,11 @@ public class ActivityReimbursementBranchUnionController { info.activityType, info.activityContent, info.activityNumber, + info.activityReimbursementMode, + info.outlayManageSource, + info.deductionBudgetId, + info.actualMoney, + outlay.budgetReimburseType, ins.id AS instanceId, ins.businessNo, ins.state instanceState, @@ -89,6 +94,7 @@ public class ActivityReimbursementBranchUnionController { wf_process_task t LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId LEFT JOIN activity_reimbursement_info info ON info.id = ins.businessNo + LEFT JOIN activity_budget outlay on info.deductionBudgetId=outlay.id 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 @@ -99,6 +105,9 @@ public class ActivityReimbursementBranchUnionController { cnd.and("t.taskName", "=", "1e4cc473-beae-427d-b9dc-c1c4d0eb07c8"); cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId())); + cnd.andEX("outlay.budgetReimburseType", "=" , pageParam.getBudgetReimburseType()); + cnd.andEX("info.outlayManageSource", "=", pageParam.getOutlayManageSource()); + cnd.andEX("info.activityReimbursementMode", "=", pageParam.getActivityReimbursementMode()); if (pageParam.getAudit()) { cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode())); diff --git a/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/controller/ActivityReimbursementClubPrincipalController.java b/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/controller/ActivityReimbursementClubPrincipalController.java index 36ff63a..a9ce395 100644 --- a/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/controller/ActivityReimbursementClubPrincipalController.java +++ b/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/controller/ActivityReimbursementClubPrincipalController.java @@ -69,6 +69,11 @@ public class ActivityReimbursementClubPrincipalController { info.activityType, info.activityContent, info.activityNumber, + info.activityReimbursementMode, + info.outlayManageSource, + info.deductionBudgetId, + info.actualMoney, + outlay.budgetReimburseType, ins.id AS instanceId, ins.businessNo, ins.state instanceState, @@ -89,6 +94,7 @@ public class ActivityReimbursementClubPrincipalController { wf_process_task t LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId LEFT JOIN activity_reimbursement_info info ON info.id = ins.businessNo + LEFT JOIN activity_budget outlay on info.deductionBudgetId=outlay.id 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 @@ -99,6 +105,9 @@ public class ActivityReimbursementClubPrincipalController { cnd.and("t.taskName", "=", "5afcf810-7a8b-4896-9aa7-c99995e0856b"); cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId())); + cnd.andEX("outlay.budgetReimburseType", "=" , pageParam.getBudgetReimburseType()); + cnd.andEX("info.outlayManageSource", "=", pageParam.getOutlayManageSource()); + cnd.andEX("info.activityReimbursementMode", "=", pageParam.getActivityReimbursementMode()); if (pageParam.getAudit()) { cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode())); diff --git a/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/controller/ActivityReimbursementMineController.java b/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/controller/ActivityReimbursementMineController.java index a83b127..ced3c4c 100644 --- a/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/controller/ActivityReimbursementMineController.java +++ b/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/controller/ActivityReimbursementMineController.java @@ -97,6 +97,10 @@ public class ActivityReimbursementMineController { info.activityType, info.activityContent, info.activityNumber, + info.activityReimbursementMode, + info.outlayManageSource, + info.deductionBudgetId, + info.actualMoney, ins.id AS instanceId, ins.businessNo, ins.state instanceState, @@ -144,7 +148,19 @@ public class ActivityReimbursementMineController { @ApiOperation("活动报销,查看活动报销") @SaCheckPermission("activityReimbursement.mine") public Result findOne(@Valid String id) { - ActivityReimbursementInfo info = dao.fetch(ActivityReimbursementInfo.class, id); + Sql sql = Sqls.create(""" + SELECT + info.*, + ab.activityMatter deductionBudgetName + FROM + `activity_reimbursement_info` info + LEFT JOIN activity_budget ab ON ab.id = info.deductionBudgetId + WHERE + info.id = @id + """).setParam("id", id); + sql.setCallback(Sqls.callback.map()); + dao.execute(sql); + NutMap info = (NutMap) sql.getResult(); return Result.success().addData(info); } diff --git a/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/controller/ActivityReimbursementSchoolPrincipalController.java b/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/controller/ActivityReimbursementSchoolPrincipalController.java index 54f7189..89167aa 100644 --- a/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/controller/ActivityReimbursementSchoolPrincipalController.java +++ b/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/controller/ActivityReimbursementSchoolPrincipalController.java @@ -69,6 +69,11 @@ public class ActivityReimbursementSchoolPrincipalController { info.activityType, info.activityContent, info.activityNumber, + info.activityReimbursementMode, + info.outlayManageSource, + info.deductionBudgetId, + info.actualMoney, + outlay.budgetReimburseType, ins.id AS instanceId, ins.businessNo, ins.state instanceState, @@ -89,6 +94,7 @@ public class ActivityReimbursementSchoolPrincipalController { wf_process_task t LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId LEFT JOIN activity_reimbursement_info info ON info.id = ins.businessNo + LEFT JOIN activity_budget outlay on info.deductionBudgetId=outlay.id 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 @@ -99,6 +105,9 @@ public class ActivityReimbursementSchoolPrincipalController { cnd.and("t.taskName", "=", "6dd2e8b3-fd0d-4b35-bb2a-1eef227cba96"); cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId())); + cnd.andEX("outlay.budgetReimburseType", "=" , pageParam.getBudgetReimburseType()); + cnd.andEX("info.outlayManageSource", "=", pageParam.getOutlayManageSource()); + cnd.andEX("info.activityReimbursementMode", "=", pageParam.getActivityReimbursementMode()); if (pageParam.getAudit()) { cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode())); diff --git a/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/controller/ActivityReimbursementSchoolUnionController.java b/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/controller/ActivityReimbursementSchoolUnionController.java index bf52c35..e3e2b33 100644 --- a/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/controller/ActivityReimbursementSchoolUnionController.java +++ b/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/controller/ActivityReimbursementSchoolUnionController.java @@ -1,23 +1,34 @@ package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.controller; import cn.dev33.satoken.annotation.SaCheckPermission; +import cn.dev33.satoken.annotation.SaMode; +import cn.hutool.core.lang.Dict; 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.flow.service.FlowCommonService; +import com.budwk.app.sys.models.Sys_home_activity; import com.budwk.app.web.commons.auth.utils.SecurityUtil; +import com.budwk.app.zhgh.activity.culture.models.ActivityTissue; +import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service.ActivityReimbursementSchoolUnionService; import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service.ActivityReimbursementService; import com.budwk.app.zhgh.activity.declarereimbursement.vo.CommonPageParam; import io.swagger.annotations.ApiOperation; +import org.nutz.aop.interceptor.ioc.TransAop; import org.nutz.dao.Cnd; import org.nutz.dao.Sqls; 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.json.Json; 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.List; @@ -37,6 +48,11 @@ public class ActivityReimbursementSchoolUnionController { @Inject private ActivityReimbursementService activityReimbursementService; + + + @Inject + private ActivityReimbursementSchoolUnionService activityReimbursementSchoolUnionService; + @At("") @SaCheckPermission("activityReimbursement.schoolUnion") @Ok("beetl:/platform/zhgh/activity/declarereimbursement/reimbursement/schoolunion/index.html") @@ -69,6 +85,11 @@ public class ActivityReimbursementSchoolUnionController { info.activityType, info.activityContent, info.activityNumber, + info.activityReimbursementMode, + info.outlayManageSource, + info.deductionBudgetId, + info.actualMoney, + outlay.budgetReimburseType, ins.id AS instanceId, ins.businessNo, ins.state instanceState, @@ -89,6 +110,7 @@ public class ActivityReimbursementSchoolUnionController { wf_process_task t LEFT JOIN wf_process_instance ins ON ins.id = t.processInstanceId LEFT JOIN activity_reimbursement_info info ON info.id = ins.businessNo + LEFT JOIN activity_budget outlay on info.deductionBudgetId=outlay.id 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 @@ -99,6 +121,9 @@ public class ActivityReimbursementSchoolUnionController { cnd.and("t.taskName", "=", "47bfdf53-288c-4352-a403-0653483b54eb"); cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId())); + cnd.andEX("outlay.budgetReimburseType", "=" , pageParam.getBudgetReimburseType()); + cnd.andEX("info.outlayManageSource", "=", pageParam.getOutlayManageSource()); + cnd.andEX("info.activityReimbursementMode", "=", pageParam.getActivityReimbursementMode()); if (pageParam.getAudit()) { cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode())); @@ -116,4 +141,13 @@ public class ActivityReimbursementSchoolUnionController { Pagination pagination = activityReimbursementService.listPageMap(pageParam.getPageNumber(), pageParam.getPageSize(), sql); return Result.success().addData(pagination); } + + + @At + @SLog(tag = "报销", msg = "校工会审核了一条记录") + @SaCheckPermission("activityReimbursement.schoolUnion") + public Result doReview(@Param("data") String param, String id) { + activityReimbursementSchoolUnionService.doReview( param, id); + return Result.success(); + } } diff --git a/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/models/ActivityReimbursementInfo.java b/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/models/ActivityReimbursementInfo.java index fde498c..48051c0 100644 --- a/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/models/ActivityReimbursementInfo.java +++ b/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/models/ActivityReimbursementInfo.java @@ -2,6 +2,7 @@ package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.models; import cn.hutool.json.JSONObject; import com.budwk.app.zhgh.activity.declarereimbursement.declare.models.ActivityDeclareInfo; +import io.swagger.annotations.ApiOperation; import lombok.Data; import lombok.EqualsAndHashCode; import org.nutz.dao.entity.annotation.*; @@ -19,8 +20,9 @@ import java.util.List; * @注释 */ @Data -@Table +@Table("activity_reimbursement_info") @EqualsAndHashCode(callSuper = true) +@ApiOperation(value = "报销信息") public class ActivityReimbursementInfo extends ActivityDeclareInfo { @Name @@ -34,6 +36,21 @@ public class ActivityReimbursementInfo extends ActivityDeclareInfo { @ColDefine(type = ColType.VARCHAR, width = 32) private String declareId; + @Column + @Comment("报销模式") + @ColDefine(type = ColType.VARCHAR, width = 30) + private String activityReimbursementMode; + + @Column + @Comment("经费类型") + @ColDefine(type = ColType.VARCHAR, width = 30) + private String outlayManageSource; + + @Column + @Comment("扣款预算") + @ColDefine(type = ColType.VARCHAR, width = 32) + private String deductionBudgetId; + @Column @Comment("实际总金额") @ColDefine(customType = "decimal(10,2)") diff --git a/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/service/ActivityReimbursementSchoolUnionService.java b/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/service/ActivityReimbursementSchoolUnionService.java new file mode 100644 index 0000000..abd7dcd --- /dev/null +++ b/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/service/ActivityReimbursementSchoolUnionService.java @@ -0,0 +1,10 @@ +package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service; + +import com.budwk.app.base.service.BaseService; +import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.models.ActivityReimbursementInfo; + +public interface ActivityReimbursementSchoolUnionService extends BaseService { + + + void doReview(String param, String id); +} diff --git a/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/service/ActivityReimbursementService.java b/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/service/ActivityReimbursementService.java index 6770558..44f0527 100644 --- a/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/service/ActivityReimbursementService.java +++ b/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/service/ActivityReimbursementService.java @@ -1,8 +1,13 @@ package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service; +import com.budwk.app.base.result.Result; import com.budwk.app.base.service.BaseService; import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.models.ActivityReimbursementInfo; import org.nutz.dao.sql.Sql; +import org.nutz.lang.util.NutMap; + +import java.math.BigDecimal; +import java.util.List; /** * @version 1.0 @@ -15,4 +20,18 @@ public interface ActivityReimbursementService extends BaseService getBudgetMoney(String outlayManageSource, String clubId); + + /** + * 预算扣除预算验证 + * @param deductionBudgetId + * @param moneyBig + * @param outlayManageSource + * @param clubId + * @return + */ + Result bxAddValidate(String deductionBudgetId, BigDecimal moneyBig, String outlayManageSource, String clubId); + } diff --git a/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/service/impl/ActivityReimbursementSchoolUnionServiceImpl.java b/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/service/impl/ActivityReimbursementSchoolUnionServiceImpl.java new file mode 100644 index 0000000..5f3c703 --- /dev/null +++ b/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/service/impl/ActivityReimbursementSchoolUnionServiceImpl.java @@ -0,0 +1,130 @@ +package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service.impl; + +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.lang.Dict; +import cn.hutool.core.util.ObjectUtil; +import com.budwk.app.base.exception.BaseException; +import com.budwk.app.base.service.impl.BaseServiceImpl; +import com.budwk.app.flow.service.FlowCommonService; +import com.budwk.app.web.commons.auth.utils.SecurityUtil; +import com.budwk.app.zhgh.activity.culture.models.ActivityTissue; +import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.models.ActivityReimbursementInfo; +import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service.ActivityReimbursementSchoolUnionService; +import com.budwk.app.zhgh.dayofficework.outlay.activityBudget.models.ActivityBudget; +import com.budwk.app.zhgh.dayofficework.outlay.outlayManage.club.model.OutlayManageClub; +import com.budwk.app.zhgh.dayofficework.outlay.outlayManage.model.OutlayUseDetail; +import com.budwk.app.zhgh.dayofficework.outlay.outlayManage.school.model.OutlayManageSchool; +import com.budwk.app.zhgh.dayofficework.outlay.outlayManage.union.model.OutlayManageUnion; +import org.nutz.aop.interceptor.ioc.TransAop; +import org.nutz.dao.Cnd; +import org.nutz.dao.Dao; +import org.nutz.ioc.aop.Aop; +import org.nutz.ioc.loader.annotation.Inject; +import org.nutz.ioc.loader.annotation.IocBean; +import org.nutz.json.Json; + +/** + * @author zhf + * @date 2025/12/4 18:06 + * @description + */ +@IocBean(args = {"refer:dao"}) +public class ActivityReimbursementSchoolUnionServiceImpl extends BaseServiceImpl implements ActivityReimbursementSchoolUnionService { + public ActivityReimbursementSchoolUnionServiceImpl(Dao dao) { + super(dao); + } + + @Inject + private FlowCommonService flowCommonService; + + @Override + @Aop(TransAop.READ_COMMITTED) + public void doReview(String param, String id) { + Dict args = Json.fromJson(Dict.class, param); + if (args.getInt("submitType") == 1) { + ActivityReimbursementInfo info = dao().fetch(ActivityReimbursementInfo.class, id); + OutlayUseDetail detail = new OutlayUseDetail(); + + detail.setProjectName(info.getActivityName()); + detail.setAdjustMoney(info.getActualMoney()); + detail.setAdjustReason(info.getActivityName()); + detail.setAdjustUserId(SecurityUtil.getUserId()); + detail.setAdjustUserName(SecurityUtil.getUserUsername()); + detail.setAdjustLoginName(SecurityUtil.getUserLoginname()); + detail.setOutlayReimburseId(info.getId()); + detail.setActivityTime(String.valueOf(info.getStartTime())); + // 更新校工会经费表 + if (info.getOutlayManageSource().equals("ACTIVITY_BUDGET_TYPE_ONE")) { + detail.setActivityTime(String.valueOf(info.getApplyTime())); + OutlayManageSchool school = dao().fetch(OutlayManageSchool.class, Cnd.where("year", "=", DateUtil.thisYear())); + if (ObjectUtil.isEmpty(school)) { + throw new BaseException("该年份没有设置金额!"); + } + if (school.getTotalQuota().subtract(school.getUsedQuota()).compareTo(info.getActualMoney()) < 0) { + throw new BaseException("剩余配额不足!剩余:" + school.getTotalQuota().subtract(school.getUsedQuota())); + } + school.setUsedQuota(school.getUsedQuota().add(info.getActualMoney())); + dao().updateIgnoreNull(school); + + //添加使用记录到经费管理表 + detail.setOutlayManageId(school.getId()); + dao().insert(detail); + } else if (info.getOutlayManageSource().equals("ACTIVITY_BUDGET_TYPE_TWO")) { + + ActivityBudget budget = dao().fetch(ActivityBudget.class, Cnd.where("id", "=", info.getDeductionBudgetId())); + if (ObjectUtil.isNotEmpty(budget)&&budget.getIsSchoolBudget()){ + //如果分工会报销了校工会的余额 + OutlayManageSchool school = dao().fetch(OutlayManageSchool.class, Cnd.where("year", "=", DateUtil.thisYear())); + if (ObjectUtil.isEmpty(school)) { + throw new BaseException("该年份没有设置金额!"); + } + if (school.getTotalQuota().subtract(school.getUsedQuota()).compareTo(info.getActualMoney()) < 0) { + throw new BaseException("剩余配额不足!剩余:" + school.getTotalQuota().subtract(school.getUsedQuota())); + } + school.setUsedQuota(school.getUsedQuota().add(info.getActualMoney())); + dao().updateIgnoreNull(school); + + //添加使用记录到经费管理表 + detail.setOutlayManageId(school.getId()); + dao().insert(detail); + }else{ + // 更新分工会活动经费表 + OutlayManageUnion manageUnion = dao().fetch(OutlayManageUnion.class, + Cnd.where("year", "=", DateUtil.thisYear()) + .and("unionId", "=", info.getUnionId())); + if (ObjectUtil.isEmpty(manageUnion)) { + throw new BaseException("该年份没有设置金额!"); + } + if (manageUnion.getTotalQuota().subtract(manageUnion.getUsedQuota()).compareTo(info.getActualMoney()) < 0) { + throw new BaseException("剩余配额不足!剩余:" + manageUnion.getTotalQuota().subtract(manageUnion.getUsedQuota())); + } + manageUnion.setUsedQuota(manageUnion.getUsedQuota().add(info.getActualMoney())); + dao().updateIgnoreNull(manageUnion); + + //添加使用记录到经费管理表 + detail.setOutlayManageId(manageUnion.getId()); + dao().insert(detail); + } + }else if (info.getOutlayManageSource().equals("ACTIVITY_BUDGET_TYPE_THREE")){ + // 更新分工会活动经费表 + OutlayManageClub manageClub = dao().fetch(OutlayManageClub.class, + Cnd.where("year", "=", DateUtil.thisYear()) + .and("clubId", "=", info.getClubId())); + if (ObjectUtil.isEmpty(manageClub)) { + throw new BaseException("该年份没有设置金额!"); + } + if (manageClub.getTotalQuota().subtract(manageClub.getUsedQuota()).compareTo(info.getActualMoney()) < 0) { + throw new BaseException("剩余配额不足!剩余:" + manageClub.getTotalQuota().subtract(manageClub.getUsedQuota())); + } + manageClub.setUsedQuota(manageClub.getUsedQuota().add(info.getActualMoney())); + dao().updateIgnoreNull(manageClub); + + //添加使用记录到经费管理表 + detail.setOutlayManageId(manageClub.getId()); + dao().insert(detail); + } + + } + flowCommonService.executeTask(args); + } +} diff --git a/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/service/impl/ActivityReimbursementServiceImpl.java b/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/service/impl/ActivityReimbursementServiceImpl.java index 03594d0..b1a7e35 100644 --- a/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/service/impl/ActivityReimbursementServiceImpl.java +++ b/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/reimbursement/service/impl/ActivityReimbursementServiceImpl.java @@ -1,12 +1,25 @@ package com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service.impl; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.StrUtil; +import com.budwk.app.base.result.Result; import com.budwk.app.base.service.impl.BaseServiceImpl; +import com.budwk.app.web.commons.auth.utils.SecurityUtil; import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.models.ActivityReimbursementInfo; import com.budwk.app.zhgh.activity.declarereimbursement.reimbursement.service.ActivityReimbursementService; +import com.budwk.app.zhgh.dayofficework.outlay.activityBudget.models.ActivityBudget; +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.IocBean; +import org.nutz.lang.Lang; +import org.nutz.lang.util.NutMap; + +import java.math.BigDecimal; +import java.util.List; +import java.util.Objects; /** * @version 1.0 @@ -53,4 +66,87 @@ public class ActivityReimbursementServiceImpl extends BaseServiceImpl getBudgetMoney(String outlayManageSource, String clubId) { + String sqlStr = """ + SELECT + ab.id, + ab.isSchoolBudget, + ab.schoolBudgetId, + ab.totalBudgetMoney, + ab.activityMatter + FROM + activity_budget ab + LEFT JOIN wf_process_instance ins ON ins.businessNo = ab.id + $condition + """; + //找出今年的预算 + Sql sql = Sqls.create(sqlStr); + Cnd cnd = Cnd.NEW(); + cnd.and("YEAR(ab.applyDate)", "=", DateUtil.thisYear()); + cnd.and("ins.state", "=", 20); + cnd.and("ab.outlayManageSource", "=", outlayManageSource); + if (Objects.equals("ACTIVITY_BUDGET_TYPE_TWO", outlayManageSource)) { + cnd.and("ab.unionId", "=", SecurityUtil.getUnionId()); + } else if (Objects.equals("ACTIVITY_BUDGET_TYPE_THREE", outlayManageSource)) { + cnd.and("ab.clubId", "=", clubId); + } + sql.setCondition(cnd); + List budgetList = listMap(sql); + + Sql sql1 = Sqls.create(""" + SELECT + info.deductionBudgetId, + info.actualMoney + FROM + `activity_reimbursement_info` info + LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id + WHERE + ins.state = 20 + """); + List infoList = listMap(sql1); + + budgetList.forEach(v -> { + double usedBudgetMoney = infoList.stream().filter(info -> info.getString("deductionBudgetId").equals(v.getString("id"))) + .mapToDouble(info -> info.getDouble("actualMoney")).sum(); + v.setv("usedBudgetMoney", usedBudgetMoney); + }); + return budgetList; + } + + @Override + @ApiOperation("预算验证") + public Result bxAddValidate(String deductionBudgetId, BigDecimal moneyBig, String outlayManageSource, String clubId) { + + if (StrUtil.isAllEmpty(deductionBudgetId, outlayManageSource)) { + return Result.error("参数错误"); + } + + ActivityBudget budget = dao().fetch(ActivityBudget.class, deductionBudgetId); + if (Lang.isEmpty(budget)) { + return Result.error("预算不存在"); + } + + Sql sql = Sqls.create(""" + SELECT + info.actualMoney + FROM + `activity_reimbursement_info` info + LEFT JOIN wf_process_instance ins ON ins.businessNo = info.id + WHERE + ins.state = 20 and info.deductionBudgetId=@deductionBudgetId + """).setParam("deductionBudgetId", budget.getId()); + List infoList = listMap(sql); + double usedBudgetMoney = infoList.stream().mapToDouble(info -> info.getDouble("actualMoney")).sum(); + BigDecimal usedBudgetMoneyBig = BigDecimal.valueOf(usedBudgetMoney); + + if (usedBudgetMoneyBig.add(moneyBig).compareTo(budget.getTotalBudgetMoney()) > 0) { + BigDecimal subtract = budget.getTotalBudgetMoney().subtract(usedBudgetMoneyBig); + return Result.error("您申报的金额已超过总金额!当前预算还剩下:" + subtract); + } + + + return null; + } } diff --git a/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/vo/CommonPageParam.java b/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/vo/CommonPageParam.java index f86720e..52d106e 100644 --- a/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/vo/CommonPageParam.java +++ b/src/main/java/com/budwk/app/zhgh/activity/declarereimbursement/vo/CommonPageParam.java @@ -30,6 +30,11 @@ public class CommonPageParam extends PageForm { private String unionId; + private String activityReimbursementMode; + + private String outlayManageSource; + private String budgetReimburseType; + public void buildSearch(Cnd cnd, String prefix) { if (cnd == null) { @@ -60,5 +65,6 @@ public class CommonPageParam extends PageForm { cnd.andEX(prefix + "clubId", "=", this.getClubId()); } + } } diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/conteoller/ActivityBudgetApplyListController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/conteoller/ActivityBudgetApplyListController.java index a36ae95..74c112a 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/conteoller/ActivityBudgetApplyListController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/conteoller/ActivityBudgetApplyListController.java @@ -57,8 +57,8 @@ public class ActivityBudgetApplyListController { @At @ApiOperation("分页查询") @SaCheckPermission("activity.budget.applyList") - public Result pageData(PageForm pageForm, Integer year, String activityMatter) { - Sql sqlByApplyList = activityBudgetService.getSqlByApplyList(pageForm, year, activityMatter, Cnd.NEW()); + public Result pageData(PageForm pageForm, Integer year, String activityMatter, String budgetReimburseType) { + Sql sqlByApplyList = activityBudgetService.getSqlByApplyList(pageForm, year, activityMatter, budgetReimburseType, Cnd.NEW()); Pagination pagination = activityBudgetService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sqlByApplyList); return Result.success(pagination); } @@ -67,7 +67,7 @@ public class ActivityBudgetApplyListController { @ApiOperation("批量删除申报数据") @SaCheckPermission("activity.budget.applyList") @Aop(TransAop.READ_COMMITTED) - @SLog( tag = "年度预算申报-我的申报", msg = "删除了${ids.length}条数据,${ids}") + @SLog(tag = "年度预算申报-我的申报", msg = "删除了${ids.length}条数据,${ids}") public Result batchDelete(@Param("ids[]") @Valid String[] ids) { if (ObjectUtil.isNotEmpty(ids)) { activityBudgetService.clear(Cnd.where("id", "in", ids)); @@ -80,7 +80,7 @@ public class ActivityBudgetApplyListController { @ApiOperation("删除一条申报数据") @SaCheckPermission("activity.budget.applyList") @Aop(TransAop.READ_COMMITTED) - @SLog( tag = "年度预算申报-我的申报", msg = "删除了一条条数据,${id}") + @SLog(tag = "年度预算申报-我的申报", msg = "删除了一条条数据,${id}") public Result doDelete(String id) { activityBudgetService.dao().delete(ActivityBudget.class, id); activityBudgetService.dao().clear(ActivityBudgetDetails.class, Cnd.where("budgetId", "=", id)); @@ -90,7 +90,7 @@ public class ActivityBudgetApplyListController { @At @ApiOperation("提交申报数据") @SaCheckPermission("activity.budget.applyList") - @SLog( tag = "年度预算申报-我的申报", msg = "提交了${ids.length}条数据,${ids}") + @SLog(tag = "年度预算申报-我的申报", msg = "提交了${ids.length}条数据,${ids}") public Result batchSubmit(@Valid @Param("ids[]") String[] ids) { List budgetList = activityBudgetService.query(Cnd.where("id", "in", ids)); List budgets = budgetList.stream().filter(a -> @@ -121,11 +121,11 @@ public class ActivityBudgetApplyListController { @At @ApiOperation("查询申报的金额") @SaCheckPermission("activity.budget.applyList") - public Result getApplyMoney(Integer year, String activityMatter) { + public Result getApplyMoney(Integer year, String activityMatter, String budgetReimburseType) { Cnd cnd = Cnd.NEW(); cnd.andEX("info.isSchoolBudget", "=", 0); cnd.andEX("ins.state", "=", 20); - Sql sql = activityBudgetService.getSqlByApplyList(null, year, activityMatter, cnd); + Sql sql = activityBudgetService.getSqlByApplyList(null, year, activityMatter, budgetReimburseType, cnd); sql.setCondition(cnd); List list = activityBudgetService.listMap(sql); double declareTotalBudgetMoney = list.stream().mapToDouble(map -> map.getDouble("declareTotalBudgetMoney")).sum(); @@ -137,9 +137,9 @@ public class ActivityBudgetApplyListController { @At @Ok("void") @SaCheckPermission("activity.budget.applyList") - public void doExport(@Valid Integer year, String activityMatter, HttpServletResponse response) { + public void doExport(@Valid Integer year, String activityMatter, String budgetReimburseType,HttpServletResponse response) { - activityBudgetService.doExport(year, activityMatter, response); + activityBudgetService.doExport(year, activityMatter, budgetReimburseType,response); } diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/conteoller/ActivityBudgetApplyStatisticsController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/conteoller/ActivityBudgetApplyStatisticsController.java index 2663a21..5b54858 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/conteoller/ActivityBudgetApplyStatisticsController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/conteoller/ActivityBudgetApplyStatisticsController.java @@ -61,8 +61,8 @@ public class ActivityBudgetApplyStatisticsController { @At @ApiOperation("分页查询") @SaCheckPermission("activity.budget.applyStatistics") - public Result pageData(PageForm pageForm, Integer year, String unionId, String clubId, String outlayManageSource, String activityMatter) { - Sql sql = activityBudgetService.getsql(year, unionId, clubId, outlayManageSource, activityMatter); + public Result pageData(PageForm pageForm, Integer year, String unionId, String clubId, String outlayManageSource, String budgetReimburseType, String activityMatter) { + Sql sql = activityBudgetService.getsql(year, unionId, clubId, outlayManageSource, activityMatter, budgetReimburseType); Pagination pagination = activityBudgetService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); return Result.success(pagination); } @@ -70,8 +70,8 @@ public class ActivityBudgetApplyStatisticsController { @At @ApiOperation("查询预算有多少钱") @SaCheckPermission("activity.budget.applyStatistics") - public Result getApplyMoney(Integer year, String unionId, String clubId, String outlayManageSource, String activityMatter) { - Sql sql = activityBudgetService.getsql(year, unionId, clubId, outlayManageSource, activityMatter); + public Result getApplyMoney(Integer year, String unionId, String clubId, String outlayManageSource, String activityMatter, String budgetReimburseType) { + Sql sql = activityBudgetService.getsql(year, unionId, clubId, outlayManageSource, activityMatter, budgetReimburseType); List list = activityBudgetService.listMap(sql); list = list.stream().filter(v -> !v.getBoolean("isSchoolBudget")).toList(); double declareTotalBudgetMoney = list.stream().mapToDouble(map -> map.getDouble("declareTotalBudgetMoney")).sum(); @@ -83,13 +83,16 @@ public class ActivityBudgetApplyStatisticsController { @Ok("void") @ApiOperation("导出") @SaCheckPermission("activity.budget.applyStatistics") - public void doExport(@Valid Integer year, String clubId, String unionId, @Valid String outlayManageSource, HttpServletResponse response) { - Sql sql = activityBudgetService.getsql(year, unionId, clubId, outlayManageSource, null); + public void doExport(@Valid Integer year, String clubId, String unionId, @Valid String outlayManageSource, String budgetReimburseType, HttpServletResponse response) { + Sql sql = activityBudgetService.getsql(year, unionId, clubId, outlayManageSource, null, budgetReimburseType); List mapList = activityBudgetService.listMap(sql); List dictList = sysDictService.getSubListByCode("ACTIVITY_BUDGET_TYPE"); + List dictList2 = sysDictService.getSubListByCode("ACTIVITY_BUDGET_REIMBURSE_TYPE"); mapList.forEach(map -> { Sys_dict dict = dictList.stream().filter(d -> d.getCode().equals(map.getString("outlayManageSource"))).findFirst().orElse(null); map.put("outlayManageSource", dict.getName()); + Sys_dict dict2 = dictList2.stream().filter(d -> d.getCode().equals(map.getString("budgetReimburseType"))).findFirst().orElse(null); + map.put("budgetReimburseType", dict2.getName()); }); ArrayList entities = new ArrayList<>(); entities.add(new ExcelExportEntity("年度", "year", 20)); @@ -97,6 +100,7 @@ public class ActivityBudgetApplyStatisticsController { entities.add(new ExcelExportEntity("申报人工号", "loginName", 20)); entities.add(new ExcelExportEntity("联系方式", "mobile", 20)); entities.add(new ExcelExportEntity("申报类型", "outlayManageSource", 20)); + entities.add(new ExcelExportEntity("预算条目", "budgetReimburseType", 20)); entities.add(new ExcelExportEntity("申报单位", "helpUnitName", 20)); entities.add(new ExcelExportEntity("事项", "activityMatter", 20)); ExcelExportEntity draftCodeEntity = new ExcelExportEntity("申报预算金额", "declareTotalBudgetMoney", 20); diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/conteoller/ActivityBudgetQueryStatisticsController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/conteoller/ActivityBudgetQueryStatisticsController.java index d90a962..78227dd 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/conteoller/ActivityBudgetQueryStatisticsController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/conteoller/ActivityBudgetQueryStatisticsController.java @@ -52,16 +52,16 @@ public class ActivityBudgetQueryStatisticsController { @At @ApiOperation("分页查询") @SaCheckPermission("activity.budget.queryStatistics") - public Result pageData(@Valid Integer year, String clubId, String unionId, @Valid String outlayManageSource) { - return Result.success(statisticsService.getDataByBudgetTypeCode(year, clubId, unionId, outlayManageSource)); + public Result pageData(@Valid Integer year, String clubId, String unionId, @Valid String outlayManageSource,String budgetReimburseType) { + return Result.success(statisticsService.getDataByBudgetTypeCode(year, clubId, unionId, outlayManageSource,budgetReimburseType)); } @At @Ok("void") @ApiOperation("导出") @SaCheckPermission("activity.budget.queryStatistics") - public void doExport(@Valid Integer year, String clubId, String unionId, @Valid String outlayManageSource, HttpServletResponse response) { - List mapList = statisticsService.getDataByBudgetTypeCode(year, clubId, unionId, outlayManageSource); + public void doExport(@Valid Integer year, String clubId, String unionId, @Valid String outlayManageSource, String budgetReimburseType,HttpServletResponse response) { + List mapList = statisticsService.getDataByBudgetTypeCode(year, clubId, unionId, outlayManageSource,budgetReimburseType); if (outlayManageSource.equals("ACTIVITY_BUDGET_TYPE_TWO")){ mapList.forEach(m->{ if (StrUtil.isEmpty(m.getString("unionName"))){ diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/conteoller/ActivityBudgetSchoolAuditController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/conteoller/ActivityBudgetSchoolAuditController.java index 756140f..1f564d5 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/conteoller/ActivityBudgetSchoolAuditController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/conteoller/ActivityBudgetSchoolAuditController.java @@ -54,6 +54,7 @@ public class ActivityBudgetSchoolAuditController { Integer year, String unionId, String clubId, + String budgetReimburseType, Boolean approval, String outlayManageSource, String activityMatter) { @@ -88,9 +89,10 @@ public class ActivityBudgetSchoolAuditController { """); Cnd cnd = Cnd.NEW(); cnd.and("t.taskName", "=", "b6f29037-972d-4b97-8677-c3b3672ef0dc"); - cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId())); +// cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId())); cnd.andEX("info.unionId", "=", unionId); cnd.andEX("info.outlayManageSource", "=", outlayManageSource); + cnd.andEX("info.budgetReimburseType", "=", budgetReimburseType); if (approval) { cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode())); diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/models/ActivityBudget.java b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/models/ActivityBudget.java index 435a2e9..4c1e128 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/models/ActivityBudget.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/models/ActivityBudget.java @@ -78,6 +78,10 @@ public class ActivityBudget extends BaseModel implements Serializable { @ColDefine(type = ColType.VARCHAR, width = 200) private String outlayManageSource; @Column + @Comment("预算条目") + @ColDefine(type = ColType.VARCHAR, width = 200) + private String budgetReimburseType; + @Column @Comment("创建人工会") @ColDefine(type = ColType.VARCHAR, width = 32) private String unionId; diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/service/ActivityBudgetApplyStatisticsService.java b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/service/ActivityBudgetApplyStatisticsService.java index 8106d2b..9e95f26 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/service/ActivityBudgetApplyStatisticsService.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/service/ActivityBudgetApplyStatisticsService.java @@ -5,7 +5,7 @@ import org.nutz.dao.sql.Sql; public interface ActivityBudgetApplyStatisticsService extends BaseService { - Sql getsql(Integer year, String unionId,String clubId, String outlayManageSource,String activityMatter); + Sql getsql(Integer year, String unionId,String clubId, String outlayManageSource,String activityMatter,String budgetReimburseType); void doDelete(String id); diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/service/ActivityBudgetQueryStatisticsService.java b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/service/ActivityBudgetQueryStatisticsService.java index 85df1e2..e0f6842 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/service/ActivityBudgetQueryStatisticsService.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/service/ActivityBudgetQueryStatisticsService.java @@ -7,5 +7,5 @@ import java.util.List; public interface ActivityBudgetQueryStatisticsService extends BaseService { - List getDataByBudgetTypeCode(Integer year, String clubId, String unionId, String outlayManageSource); + List getDataByBudgetTypeCode(Integer year, String clubId, String unionId, String outlayManageSource,String budgetReimburseType); } diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/service/ActivityBudgetService.java b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/service/ActivityBudgetService.java index d1bf2de..dddef8a 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/service/ActivityBudgetService.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/service/ActivityBudgetService.java @@ -13,10 +13,11 @@ import javax.servlet.http.HttpServletResponse; public interface ActivityBudgetService extends BaseService { - Sql getSqlByApplyList(PageForm pageForm, Integer year, String activityMatter, Cnd cnd); + Sql getSqlByApplyList(PageForm pageForm, Integer year, String activityMatter, String budgetReimburseType, Cnd cnd); /** * 提交年度预算申报 + * * @param activityBudget */ Result submit(ActivityBudget activityBudget); @@ -24,5 +25,5 @@ public interface ActivityBudgetService extends BaseService { NutMap findOne(String id); - void doExport(Integer year, String activityMatter, HttpServletResponse response); + void doExport(Integer year, String activityMatter, String budgetReimburseType, HttpServletResponse response); } diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/service/impl/ActivityBudgetApplyStatisticsServiceImpl.java b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/service/impl/ActivityBudgetApplyStatisticsServiceImpl.java index 16b24ed..23ecf1f 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/service/impl/ActivityBudgetApplyStatisticsServiceImpl.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/service/impl/ActivityBudgetApplyStatisticsServiceImpl.java @@ -35,7 +35,7 @@ public class ActivityBudgetApplyStatisticsServiceImpl extends BaseServiceImpl im @Override - public Sql getsql(Integer year, String unionId, String clubId, String outlayManageSource, String activityMatter) { + public Sql getsql(Integer year, String unionId, String clubId, String outlayManageSource, String activityMatter,String budgetReimburseType) { Sql sql = Sqls.create(""" SELECT YEAR(ab.applyDate) year, @@ -60,6 +60,7 @@ public class ActivityBudgetApplyStatisticsServiceImpl extends BaseServiceImpl im }*/ cnd.andEX("ab.clubId", "=", clubId); cnd.andEX("ab.outlayManageSource", "=", outlayManageSource); + cnd.andEX("ab.budgetReimburseType", "=", budgetReimburseType); cnd.andEX("ins.state", "=", 20); cnd.desc("ab.applyDate"); sql.setCondition(cnd); diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/service/impl/ActivityBudgetQueryStatisticsServiceImpl.java b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/service/impl/ActivityBudgetQueryStatisticsServiceImpl.java index a14ccc5..d95147d 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/service/impl/ActivityBudgetQueryStatisticsServiceImpl.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/service/impl/ActivityBudgetQueryStatisticsServiceImpl.java @@ -19,7 +19,7 @@ public class ActivityBudgetQueryStatisticsServiceImpl extends BaseServiceImpl im } @Override - public List getDataByBudgetTypeCode(Integer year, String clubId, String unionId, String outlayManageSource) { + public List getDataByBudgetTypeCode(Integer year, String clubId, String unionId, String outlayManageSource,String budgetReimburseType) { if (List.of("ACTIVITY_BUDGET_TYPE_ONE").contains(outlayManageSource)) { Sql sql = Sqls.create(""" SELECT @@ -34,6 +34,7 @@ public class ActivityBudgetQueryStatisticsServiceImpl extends BaseServiceImpl im Cnd cnd = Cnd.NEW(); cnd.andEX("YEAR(ab.applyDate)", "=", year); cnd.andEX("ab.outlayManageSource", "=", outlayManageSource); + cnd.andEX("ab.budgetReimburseType", "=", budgetReimburseType); cnd.andEX("wpi.state", "=", 20); sql.setCondition(cnd); return listMap(sql); @@ -56,6 +57,7 @@ public class ActivityBudgetQueryStatisticsServiceImpl extends BaseServiceImpl im cnd.andEX("ab.unionId", "=", unionId); cnd.andEX("ab.isSchoolBudget", "=", 0); cnd.andEX("ab.outlayManageSource", "=", "ACTIVITY_BUDGET_TYPE_TWO"); + cnd.andEX("ab.budgetReimburseType", "=", budgetReimburseType); cnd.andEX("wpi.state", "=", 20); cnd.andEX("YEAR(ab.applyDate)", "=", year); cnd.groupBy("ab.unionId"); @@ -81,6 +83,7 @@ public class ActivityBudgetQueryStatisticsServiceImpl extends BaseServiceImpl im cnd.andEX("ab.clubId", "=", clubId); cnd.andEX("ab.isSchoolBudget", "=", 0); cnd.andEX("ab.outlayManageSource", "=", "ACTIVITY_BUDGET_TYPE_THREE"); + cnd.andEX("ab.budgetReimburseType", "=", budgetReimburseType); cnd.andEX("wpi.state", "=", 20); cnd.andEX("YEAR(ab.applyDate)", "=", year); cnd.groupBy("ab.clubId"); diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/service/impl/ActivityBudgetServiceImpl.java b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/service/impl/ActivityBudgetServiceImpl.java index 0ce79e6..ab0efd5 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/service/impl/ActivityBudgetServiceImpl.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/activityBudget/service/impl/ActivityBudgetServiceImpl.java @@ -59,7 +59,7 @@ public class ActivityBudgetServiceImpl extends BaseServiceImpl i private FlowEngine flowEngine; @Override - public Sql getSqlByApplyList(PageForm pageForm, Integer year, String activityMatter,Cnd cnd) { + public Sql getSqlByApplyList(PageForm pageForm, Integer year, String activityMatter,String budgetReimburseType,Cnd cnd) { Sql sql = Sqls.create(""" SELECT @@ -117,6 +117,7 @@ public class ActivityBudgetServiceImpl extends BaseServiceImpl i cnd.and(group); } cnd.andEX("YEAR(info.applyDate)", "=", year); + cnd.andEX("info.budgetReimburseType", "=", budgetReimburseType); cnd.desc("info.applyDate"); sql.setCondition(cnd); return sql; @@ -245,9 +246,9 @@ public class ActivityBudgetServiceImpl extends BaseServiceImpl i } @Override - public void doExport(Integer year, String activityMatter, HttpServletResponse response) { + public void doExport(Integer year, String activityMatter, String budgetReimburseType,HttpServletResponse response) { - Sql sql = getSqlByApplyList(null, year, activityMatter,Cnd.NEW()); + Sql sql = getSqlByApplyList(null, year, activityMatter,budgetReimburseType,Cnd.NEW()); List mapList = listMap(sql); List dictList = sysDictService.getSubListByCode("ACTIVITY_BUDGET_TYPE"); mapList.forEach(map -> { diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/club/controller/OutlayManageClubController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/club/controller/OutlayManageClubController.java index 35fc6a4..47f0755 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/club/controller/OutlayManageClubController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/club/controller/OutlayManageClubController.java @@ -112,7 +112,7 @@ public class OutlayManageClubController { @SaCheckPermission("outlay.outlayManage.club.manage") @SLog(tag = "协会预算分配", msg = "根据申报的金额修改本年的预算预算") public Result issuedOutlay() { - Sql sql = Sqls.create(""" + /* Sql sql = Sqls.create(""" SELECT ab.clubId, ab.totalBudgetMoney @@ -122,11 +122,11 @@ public class OutlayManageClubController { WHERE YEAR(ab.applyDate) = @year AND ab.outlayManageSource = 'ACTIVITY_BUDGET_TYPE_THREE' - AND ab.isSchoolBudget =0 + AND ab.isSchoolBudget =0 AND wpi.state = 20 """).setParam("year", DateUtil.thisYear()); List budgetList = baseService.listMap(sql); - +*/ Sql sqlClub = Sqls.create(""" SELECT c.* @@ -141,16 +141,16 @@ public class OutlayManageClubController { List insertUnionList = new ArrayList<>(); clubList.forEach(v -> { - BigDecimal totalBudgetMoney = budgetList.stream() + /* BigDecimal totalBudgetMoney = budgetList.stream() .filter(budget -> budget.getString("clubId").equals(v.getId())) .map(budget -> new BigDecimal(budget.getString("totalBudgetMoney"))) // 提取 money 属性 - .reduce(BigDecimal.ZERO, BigDecimal::add); + .reduce(BigDecimal.ZERO, BigDecimal::add);*/ OutlayManageClub outlayManageClub = new OutlayManageClub(); outlayManageClub.setYear(DateUtil.thisYear()); outlayManageClub.setClubName(v.getClubName()); outlayManageClub.setClubCode(v.getClubCode()); outlayManageClub.setClubId(v.getId()); - outlayManageClub.setTotalQuota(totalBudgetMoney); +// outlayManageClub.setTotalQuota(totalBudgetMoney); insertUnionList.add(outlayManageClub); }); baseService.insert(insertUnionList); diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/school/controller/OutlayManageSchoolController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/school/controller/OutlayManageSchoolController.java index 17fa61f..ce89d75 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/school/controller/OutlayManageSchoolController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/school/controller/OutlayManageSchoolController.java @@ -95,7 +95,7 @@ public class OutlayManageSchoolController { @SaCheckPermission("outlay.outlayManage.school.manage") @SLog(tag = "校工会预算分配", msg = "下发预算的金额:${args[0]}") public Result issuedOutlay() { - Sql sql = Sqls.create(""" + /* Sql sql = Sqls.create(""" SELECT totalBudgetMoney FROM @@ -109,10 +109,10 @@ public class OutlayManageSchoolController { List budgetList = baseService.listMap(sql); BigDecimal totalBudgetMoney = budgetList.stream() .map(v->new BigDecimal(v.getString("totalBudgetMoney"))) // 提取 money 属性 - .reduce(BigDecimal.ZERO, BigDecimal::add); + .reduce(BigDecimal.ZERO, BigDecimal::add);*/ OutlayManageSchool outlayManageSchool = new OutlayManageSchool(); outlayManageSchool.setYear(DateUtil.thisYear()); - outlayManageSchool.setTotalQuota(totalBudgetMoney); +// outlayManageSchool.setTotalQuota(totalBudgetMoney); baseService.insert(outlayManageSchool); return Result.success(); } diff --git a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/union/controller/OutlayManageUnionController.java b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/union/controller/OutlayManageUnionController.java index 691f6da..4eacf75 100644 --- a/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/union/controller/OutlayManageUnionController.java +++ b/src/main/java/com/budwk/app/zhgh/dayofficework/outlay/outlayManage/union/controller/OutlayManageUnionController.java @@ -106,7 +106,7 @@ public class OutlayManageUnionController { @SaCheckPermission("outlay.outlayManage.union.manage") @SLog(tag = "分工会预算分配", msg = "根据申报的金额修改本年的预算预算") public Result issuedOutlay() { - Sql sql = Sqls.create(""" + /* Sql sql = Sqls.create(""" SELECT unionId, totalBudgetMoney @@ -116,25 +116,25 @@ public class OutlayManageUnionController { WHERE YEAR(ab.applyDate) = @year AND ab.outlayManageSource = 'ACTIVITY_BUDGET_TYPE_TWO' - AND ab.isSchoolBudget =0 + AND ab.isSchoolBudget =0 AND wpi.state = 20 """).setParam("year", DateUtil.thisYear()); - List budgetList = baseService.listMap(sql); + List budgetList = baseService.listMap(sql);*/ List unionList = baseService.dao().query(Sys_union.class, Cnd.NEW()); List insertUnionList = new ArrayList<>(); unionList.forEach(v -> { - BigDecimal totalBudgetMoney = budgetList.stream() + /*BigDecimal totalBudgetMoney = budgetList.stream() .filter(budget -> budget.getString("unionId").equals(v.getId())) .map(budget -> new BigDecimal(budget.getString("totalBudgetMoney"))) // 提取 money 属性 - .reduce(BigDecimal.ZERO, BigDecimal::add); + .reduce(BigDecimal.ZERO, BigDecimal::add);*/ OutlayManageUnion outlayManageUnion = new OutlayManageUnion(); outlayManageUnion.setYear(DateUtil.thisYear()); outlayManageUnion.setUnionName(v.getName()); outlayManageUnion.setUnionCode(v.getUnionCode()); outlayManageUnion.setUnionId(v.getId()); - outlayManageUnion.setTotalQuota(totalBudgetMoney); +// outlayManageUnion.setTotalQuota(totalBudgetMoney); insertUnionList.add(outlayManageUnion); }); baseService.insert(insertUnionList); diff --git a/src/main/resources/static/components/plugins/sysSignature/pc.vue b/src/main/resources/static/components/plugins/sysSignature/pc.vue index 638c775..6afc4fd 100644 --- a/src/main/resources/static/components/plugins/sysSignature/pc.vue +++ b/src/main/resources/static/components/plugins/sysSignature/pc.vue @@ -24,7 +24,6 @@ module.exports = { watch: { value: { handler(val) { - console.log(val) if(val){ this.signatureContent = val this.$emit("input", this.signatureContent) diff --git a/src/main/resources/views/layouts/platform.html b/src/main/resources/views/layouts/platform.html index c4e4444..19eaf32 100644 --- a/src/main/resources/views/layouts/platform.html +++ b/src/main/resources/views/layouts/platform.html @@ -309,7 +309,6 @@ layout("/layouts/v4/baseLayout.html"){ }, methods: { menuSelect(index, indexPath) { - debugger try { const app = JSON.parse(window.sessionStorage.getItem("zhgh_sub_app")) window.sessionStorage.setItem("zhgh_sub_app_left_menu_active_index-" + app.id, index) @@ -319,7 +318,6 @@ layout("/layouts/v4/baseLayout.html"){ }, // 获取菜单 getMenus(appId) { - debugger if (!appId) return this.$axios.post("/platform/sys/user/subAppMenus", {appId}).then((res) => { if (res.code === 0) { @@ -334,7 +332,6 @@ layout("/layouts/v4/baseLayout.html"){ // 设置应用信息 setAppInfo(app) { - debugger if (app) { // 储存到缓存 window.sessionStorage.setItem("zhgh_sub_app", JSON.stringify(app)) @@ -350,13 +347,10 @@ layout("/layouts/v4/baseLayout.html"){ }, // 菜单回显 echoMenus() { - debugger try { const app = JSON.parse(window.sessionStorage.getItem("zhgh_sub_app")) this.activeMenuIndex = window.sessionStorage.getItem("zhgh_sub_app_left_menu_active_index-" + app.id) this.openedMenus = JSON.parse(window.sessionStorage.getItem("zhgh_sub_app_left_menu_opens-" + app.id)) || [] - console.log(this.openedMenus) - console.log(this.activeMenuIndex) // !this.activeMenuIndex && if ('/platform/v4/subApp' === getBaseSubAppPath()) { @@ -371,7 +365,6 @@ layout("/layouts/v4/baseLayout.html"){ // 地址选中 hrefSelect() { - debugger function findMenuPath(menus, targetHref) { function search(items, path) { for (const item of items) { @@ -451,7 +444,6 @@ layout("/layouts/v4/baseLayout.html"){ }, init() { - debugger // 页面加载时获取到正确的菜单 const pathname = window.location.pathname if (!pathname.startsWith("/platform/v4/subApp")) { diff --git a/src/main/resources/views/layouts/platform_h5.html b/src/main/resources/views/layouts/platform_h5.html index eb231e7..73bf154 100644 --- a/src/main/resources/views/layouts/platform_h5.html +++ b/src/main/resources/views/layouts/platform_h5.html @@ -217,7 +217,6 @@ this.subscribers.get(type).add(callback) setTimeout(() => { - console.log(this.ws.readyState) // 所有订阅完成后,发送 join 消息 if (!this.isSubscribed && this.ws.readyState === WebSocket.OPEN) { this.isSubscribed = true diff --git a/src/main/resources/views/layouts/v4/baseLayout.html b/src/main/resources/views/layouts/v4/baseLayout.html index b62aef8..e45cd24 100644 --- a/src/main/resources/views/layouts/v4/baseLayout.html +++ b/src/main/resources/views/layouts/v4/baseLayout.html @@ -149,8 +149,8 @@ } connect() { - //const WS_URL = window.location.host + "${base}/websocket" - const WS_URL = 'zhgh.jshvc.edu.cn' + "${base}/websocket" + const WS_URL = window.location.host + "${base}/websocket" + // const WS_URL = 'zhgh.jshvc.edu.cn' + "${base}/websocket" const protocol = window.location.protocol === "http:" ? "ws://" : "wss://" this.ws = new WebSocket(protocol + WS_URL) } @@ -163,7 +163,6 @@ this.subscribers.get(type).add(callback) setTimeout(() => { - console.log(this.ws.readyState) // 所有订阅完成后,发送 join 消息 if (!this.isSubscribed && this.ws.readyState === WebSocket.OPEN) { this.isSubscribed = true diff --git a/src/main/resources/views/platform/zhgh/activity/declarereimbursement/reimbursement/apply/index.html b/src/main/resources/views/platform/zhgh/activity/declarereimbursement/reimbursement/apply/index.html index ab78360..7d7b880 100644 --- a/src/main/resources/views/platform/zhgh/activity/declarereimbursement/reimbursement/apply/index.html +++ b/src/main/resources/views/platform/zhgh/activity/declarereimbursement/reimbursement/apply/index.html @@ -2,374 +2,551 @@ layout("/layouts/platform.html"){ #-->
-
- - - - - - - - - - - - +
+ + + + - - + + + + + {{i.name}} + + + + - - - - - - + + + + 活动报销 + 日常报销 + + + + + + + + + + + + + + + + + + + + + + + - - - - - - + - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - + + + + + + - - 保存 - 提交 - 提交 - - + + + + + + + + + + 保存 + 提交 + 提交 + + - -
- -
- -
+ +
+ +
+ +
-
+
+ + + + + + 暂无 + + + + + 暂无 + + + + + + 暂无 + + + + + + + + `, store, - dicts: ["PROCESS_TASK_SUBMIT_TYPE"], + dicts: ["PROCESS_TASK_SUBMIT_TYPE", "ACTIVITY_BUDGET_TYPE"], data() { return { viewData: {}, @@ -136,8 +149,10 @@ const INFO = { // 获取申请信息 info() { - this.$axios.post("/platform/activityReimbursement/mine/findOne", { id: this.row.id }).then((res) => { + this.$axios.post("/platform/activityReimbursement/mine/findOne", {id: this.row.id}).then((res) => { if (res.code === 0) { + if (res.data.billFiles) res.data.billFiles = JSON.parse(res.data.billFiles) + if (res.data.budgets) res.data.budgets = JSON.parse(res.data.budgets) this.viewData = res.data } }) @@ -145,7 +160,7 @@ const INFO = { // 获取已办任务审批记录 getDoneTasks() { - this.$axios.post("/flow/common/doneTasks", { bizId: this.row.id }).then((res) => { + this.$axios.post("/flow/common/doneTasks", {bizId: this.row.id}).then((res) => { if (res.code === 0) { this.doneTasks = res.data } @@ -153,7 +168,7 @@ const INFO = { }, // 查看流程图 - openChart(){ + openChart() { this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId, this.row.instanceId) }, diff --git a/src/main/resources/views/platform/zhgh/activity/declarereimbursement/reimbursement/mine/index.html b/src/main/resources/views/platform/zhgh/activity/declarereimbursement/reimbursement/mine/index.html index c14078b..928ad85 100644 --- a/src/main/resources/views/platform/zhgh/activity/declarereimbursement/reimbursement/mine/index.html +++ b/src/main/resources/views/platform/zhgh/activity/declarereimbursement/reimbursement/mine/index.html @@ -2,219 +2,229 @@ layout("/layouts/platform.html"){ #-->
- - - - - - - + + + + + + + - - - + + + - - - - + + + - - - 活动申报 - + + + 活动申报 + - - + + - - - - - - - + + + + - - + +