From a08ae49f0380616749038018fa06b425db98185d Mon Sep 17 00:00:00 2001 From: = <=> Date: Fri, 29 Aug 2025 17:43:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E4=BC=9A=E6=8A=A5=E9=94=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/budwk/app/sys/models/Sys_dict.java | 5 + .../UnionReimburseApplyController.java | 240 ++++++++ .../UnionReimburseCollectController.java | 217 ++++++++ .../UnionReimburseMineController.java | 117 ++++ .../UnionReimburseReviewController.java | 115 ++++ .../UnionReimburseFundSourceInterceptor.java | 117 ++++ .../unionReimburse/model/UnionReimburse.java | 228 ++++++++ .../service/UnionReimburseService.java | 7 + .../impl/UnionReimburseServiceImpl.java | 18 + .../vo/UnionReimburseCollectExcelVO.java | 46 ++ .../views/platform/sys/dict/index.html | 6 + .../zhgh/unionReimburse/apply/index.html | 517 ++++++++++++++++++ .../zhgh/unionReimburse/collect/index.html | 208 +++++++ .../platform/zhgh/unionReimburse/info.js | 140 +++++ .../zhgh/unionReimburse/mine/index.html | 209 +++++++ .../zhgh/unionReimburse/review/index.html | 255 +++++++++ 16 files changed, 2445 insertions(+) create mode 100644 src/main/java/com/budwk/app/zhgh/unionReimburse/controller/UnionReimburseApplyController.java create mode 100644 src/main/java/com/budwk/app/zhgh/unionReimburse/controller/UnionReimburseCollectController.java create mode 100644 src/main/java/com/budwk/app/zhgh/unionReimburse/controller/UnionReimburseMineController.java create mode 100644 src/main/java/com/budwk/app/zhgh/unionReimburse/controller/UnionReimburseReviewController.java create mode 100644 src/main/java/com/budwk/app/zhgh/unionReimburse/interceptor/UnionReimburseFundSourceInterceptor.java create mode 100644 src/main/java/com/budwk/app/zhgh/unionReimburse/model/UnionReimburse.java create mode 100644 src/main/java/com/budwk/app/zhgh/unionReimburse/service/UnionReimburseService.java create mode 100644 src/main/java/com/budwk/app/zhgh/unionReimburse/service/impl/UnionReimburseServiceImpl.java create mode 100644 src/main/java/com/budwk/app/zhgh/unionReimburse/vo/UnionReimburseCollectExcelVO.java create mode 100644 src/main/resources/views/platform/zhgh/unionReimburse/apply/index.html create mode 100644 src/main/resources/views/platform/zhgh/unionReimburse/collect/index.html create mode 100644 src/main/resources/views/platform/zhgh/unionReimburse/info.js create mode 100644 src/main/resources/views/platform/zhgh/unionReimburse/mine/index.html create mode 100644 src/main/resources/views/platform/zhgh/unionReimburse/review/index.html diff --git a/src/main/java/com/budwk/app/sys/models/Sys_dict.java b/src/main/java/com/budwk/app/sys/models/Sys_dict.java index e8e1a281..e3cdbd3a 100644 --- a/src/main/java/com/budwk/app/sys/models/Sys_dict.java +++ b/src/main/java/com/budwk/app/sys/models/Sys_dict.java @@ -42,6 +42,11 @@ public class Sys_dict extends BaseModel implements Serializable { @ColDefine(type = ColType.VARCHAR, width = 100) private String name; + @Column + @Comment("备注") + @ColDefine(type = ColType.VARCHAR, width = 100) + private String remark; + @Column @Comment("编码") @ColDefine(type = ColType.VARCHAR, width = 100) diff --git a/src/main/java/com/budwk/app/zhgh/unionReimburse/controller/UnionReimburseApplyController.java b/src/main/java/com/budwk/app/zhgh/unionReimburse/controller/UnionReimburseApplyController.java new file mode 100644 index 00000000..ee439bd0 --- /dev/null +++ b/src/main/java/com/budwk/app/zhgh/unionReimburse/controller/UnionReimburseApplyController.java @@ -0,0 +1,240 @@ +package com.budwk.app.zhgh.unionReimburse.controller; + +import cn.dev33.satoken.annotation.SaCheckLogin; +import cn.dev33.satoken.annotation.SaCheckPermission; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.lang.Dict; +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.flow.constant.FlowConst; +import com.budwk.app.flow.engine.FlowEngine; +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.views.View_user; +import com.budwk.app.web.commons.auth.utils.AuthUtil; +import com.budwk.app.web.commons.auth.utils.SecurityUtil; +import com.budwk.app.zhgh.democratic.suggestionBox.models.SuggestionBox; +import com.budwk.app.zhgh.outlay.outlayManage.club.model.OutlayManageClub; +import com.budwk.app.zhgh.outlay.outlayManage.school.model.OutlayManageSchool; +import com.budwk.app.zhgh.outlay.outlayManage.union.model.OutlayManageUnion; +import com.budwk.app.zhgh.staffbenefit.condolence.service.CondolenceTypeService; +import com.budwk.app.zhgh.unionReimburse.model.UnionReimburse; +import com.budwk.app.zhgh.staffbenefit.condolence.model.CondolenceType; +import com.budwk.app.zhgh.unionReimburse.model.UnionReimburse; +import com.budwk.app.zhgh.unionReimburse.service.UnionReimburseService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.nutz.aop.interceptor.ioc.TransAop; +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.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.util.NutMap; +import org.nutz.mvc.annotation.At; +import org.nutz.mvc.annotation.Ok; +import org.nutz.mvc.annotation.Param; + +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.util.Date; +import java.util.List; + +@IocBean +@At("/platform/unionReimburse/apply") +@Api("工会报销申请") +@Ok("json:full") +public class UnionReimburseApplyController { + + @Inject + private Dao dao; + @Inject + private FlowEngine flowEngine; + @Inject + private UnionReimburseService unionReimburseService; + @Inject + private FlowCommonService flowCommonService; + @Inject + private CondolenceTypeService typeService; + + + @At("") + @Ok("beetl:/platform/zhgh/unionReimburse/apply/index.html") + @SaCheckLogin + public void index() {} + + @At + @ApiOperation("保存申请") + @SaCheckPermission("unionReimburse.apply") + @SLog(type = "unionReimburse", tag = "工会报销-报销申请", msg = "保存报销申请") + public Result save(@Param("data") UnionReimburse unionReimburse) { + if(StrUtil.isBlank(unionReimburse.getId())) unionReimburse.setCreateTime(DateUtil.now()); + dao.insertOrUpdate(unionReimburse); + return Result.success(); + } + + @At + @SaCheckLogin + @ApiOperation("提交申请") + public Result submit(@Param("data") UnionReimburse unionReimburse) { + if(StrUtil.isBlank(unionReimburse.getId())) unionReimburse.setCreateTime(DateUtil.now()); + + dao.insertOrUpdate(unionReimburse); + // 开启流程实例 + Dict args = Dict.create(); + args.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.APPLY.getCode()); + args.set(FlowConst.FORM_DATA, unionReimburse); + ProcessInstance instance = flowEngine.startProcessInstanceByKey("GHBX", unionReimburse.getId(), SecurityUtil.getUserId(), args); + + // 自动完成第一个申请任务 + List doingTaskList = flowEngine.processTaskService().getDoingTaskList(instance.getId(), null); + for (ProcessTask task : doingTaskList) { + flowEngine.executeProcessTask(task.getId(), SecurityUtil.getUserId(), args); + } + return Result.success(); + } + + @At + @SaCheckLogin + @ApiOperation("重新提交申请") + @Aop(TransAop.READ_COMMITTED) + public Result submitAgain(@Param("data") UnionReimburse unionReimburse, @Param("taskId") Long taskId) { + if(StrUtil.isBlank(unionReimburse.getId())) unionReimburse.setCreateTime(DateUtil.now()); + + dao.insertOrUpdate(unionReimburse); + + Dict dict = Dict.create(); + dict.set(FlowConst.PROCESS_TASK_ID_KEY, taskId); + dict.set(FlowConst.SUBMIT_TYPE, ProcessSubmitTypeEnum.RE_APPLY.getCode()); + flowCommonService.executeTask(dict); + return Result.success(); + } + + @At + @SaCheckLogin + @ApiOperation("获取当前登录人的申请信息") + public Result info(@Param("id") String id) { + UnionReimburse unionReimburse = dao.fetch(UnionReimburse.class, id); + CondolenceType type = unionReimburseService.dao().fetch(CondolenceType.class, + Cnd.where(CondolenceType::getId, "=", unionReimburse.getCondolenceType())); + NutMap nutMap = Lang.obj2nutmap(unionReimburse); + // 使用三元运算符处理 null 情况 + nutMap.put("typeName", type != null ? type.getName() : ""); + return Result.success(nutMap); + } + + + @At + @ApiOperation("查询用户") + @SaCheckPermission("unionReimburse.apply") + @SLog(type = "unionReimburse", tag = "查询用户", msg = "查询用户") + public Object listUser(String keyword) { + Sql sql = Sqls.create(""" + select + id, + username as userName, + loginname as loginName, + sex, + mobile, + technicalTitle, + IFNULL(unitname, '暂无') as unitName, + unitid as unitId, + unionid as unionId, + unionname as unionName + from + vw_user + $condition + """); + Cnd cnd = Cnd.NEW(); + if (StrUtil.isNotBlank(keyword)) { + SqlExpressionGroup seg = new SqlExpressionGroup(); + seg.or(View_user::getLoginname, "like", "%" + keyword + "%"); + seg.or(View_user::getUsername, "like", "%" + keyword + "%"); + cnd.and(seg); + } + if(!AuthUtil.hasRoleOr(RoleConstant.SYSADMIN.name(), RoleConstant.SCHOOL_UNION_ADMIN.name())) { + if(AuthUtil.hasRoleOr(RoleConstant.BRANCH_UNION_ADMIN.name(), RoleConstant.BRANCH_UNION_CHAIRMAN.name())) { + cnd.and(View_user::getUnionId, "=", SecurityUtil.getUnionId()); + } else { + cnd.and(View_user::getId, "=", SecurityUtil.getUserId()); + } + + } + sql.setCondition(cnd); + Pagination pagination = unionReimburseService.listPageMap(1, 50, sql); + return Result.success(pagination.getList()); + } + + @At + @ApiOperation("查询职工慰问类型") + @SaCheckLogin + public Result queryCondolenceType() { + List list = typeService.query(Cnd.NEW().desc(CondolenceType::getCode)); + return Result.success(list); + } + + @At + @ApiOperation("查询校工会经费余额") + @SaCheckPermission("unionReimburse.apply") + public Result getSchoolBudget() { + OutlayManageSchool outlayManageSchool = dao.fetch(OutlayManageSchool.class, + Cnd.where("year", "=", DateUtil.year(new Date()))); + if (outlayManageSchool != null) { + BigDecimal balance = outlayManageSchool.getTotalQuota().subtract(outlayManageSchool.getUsedQuota()); + double value = balance.setScale(2, RoundingMode.HALF_UP).doubleValue(); + return Result.success(value); + } + return Result.success(0.0); + } + + + @At + @ApiOperation("查询分工会经费余额") + @SaCheckPermission("unionReimburse.apply") + public Result getUnionBalance() { + OutlayManageUnion outlayManageUnion = dao.fetch(OutlayManageUnion.class, + Cnd.where("unionId", "=", SecurityUtil.getUnionId()).and("year", "=", DateUtil.year(new Date()))); + if (outlayManageUnion != null) { + BigDecimal balance = outlayManageUnion.getTotalQuota().subtract(outlayManageUnion.getUsedQuota()); + double value = balance.setScale(2, RoundingMode.HALF_UP).doubleValue(); + return Result.success(value); + } + return Result.success(0.0); + } + + @At + @ApiOperation("查询社团经费余额") + @SaCheckPermission("unionReimburse.apply") + public Result getClubBudget(@Param("clubId") String clubId) { + // 检查clubId参数是否为空 + if (StrUtil.isBlank(clubId)) { + return Result.error("社团ID不能为空"); + } + // 根据社团ID和年份查询特定社团的经费信息 + OutlayManageClub outlayManageClub = dao.fetch(OutlayManageClub.class, + Cnd.where("clubId", "=", clubId) + .and("year", "=", DateUtil.year(new Date()))); + + if (outlayManageClub != null) { + BigDecimal balance = outlayManageClub.getTotalQuota().subtract(outlayManageClub.getUsedQuota()); + double value = balance.setScale(2, RoundingMode.HALF_UP).doubleValue(); + return Result.success(value); + } + + // 如果没有找到该社团的经费记录,返回0 + return Result.success(0.0); + } + + + + +} diff --git a/src/main/java/com/budwk/app/zhgh/unionReimburse/controller/UnionReimburseCollectController.java b/src/main/java/com/budwk/app/zhgh/unionReimburse/controller/UnionReimburseCollectController.java new file mode 100644 index 00000000..d2bb005e --- /dev/null +++ b/src/main/java/com/budwk/app/zhgh/unionReimburse/controller/UnionReimburseCollectController.java @@ -0,0 +1,217 @@ +package com.budwk.app.zhgh.unionReimburse.controller; + +import cn.afterturn.easypoi.excel.ExcelExportUtil; +import cn.afterturn.easypoi.excel.entity.ExportParams; +import cn.afterturn.easypoi.excel.entity.enmus.ExcelType; +import cn.dev33.satoken.annotation.SaCheckLogin; +import cn.dev33.satoken.annotation.SaCheckPermission; +import cn.hutool.core.util.StrUtil; +import com.budwk.app.base.page.Pagination; +import com.budwk.app.base.param.PageForm; +import com.budwk.app.base.result.Result; +import com.budwk.app.base.utils.CommonDownloadUtil; +import com.budwk.app.flow.engine.FlowEngine; +import com.budwk.app.sys.models.Sys_dict; +import com.budwk.app.sys.services.SysDictService; +import com.budwk.app.zhgh.unionReimburse.service.UnionReimburseService; +import com.budwk.app.zhgh.unionReimburse.vo.UnionReimburseCollectExcelVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.apache.poi.ss.usermodel.Workbook; +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 org.nutz.mvc.annotation.Param; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; + +@IocBean +@At("/platform/unionReimburse/collect") +@Ok("json:full") +@Api("查询统计") +public class UnionReimburseCollectController { + + @Inject + private Dao dao; + @Inject + private FlowEngine flowEngine; + + @Inject + private SysDictService sysDictService; + + @Inject + private UnionReimburseService unionReimburseService; + + @At("") + @Ok("beetl:/platform/zhgh/unionReimburse/collect/index.html") + @SaCheckLogin + public void index() {} + + @At + @ApiOperation("分页查询") + @SaCheckPermission("unionReimburse.collect") + public Result pageData(PageForm pageForm, + @Param(value = "year") Integer year, + @Param(value = "unionId") String unionId, + @Param(value = "unitId") String unitId, + @Param(value = "reimburseProject") String reimburseProject, + @Param(value = "userName") String userName) { + Sql sql = Sqls.create(""" + SELECT + info.*, + 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 + union_reimburse info + LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id + LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10 + LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id + $condition + """); + Cnd cnd = Cnd.NEW(); + // 年度查询条件 + cnd.andEX("year(info.createTime)", "=", year); + + // 工会、单位名称查询条件 + cnd.andEX("info.unionId", "=", unionId); + cnd.andEX("info.unitId", "=", unitId); + + // 报销项目查询条件 + cnd.andEX("info.reimburseProject", "=", reimburseProject); + // 经办人姓名查询条件 + if (StrUtil.isNotBlank(userName)) { + cnd.and("info.userName", "like", "%" + userName + "%"); + } + + // 只查询流程实例状态为20的数据(已完成状态) + cnd.and("ins.state", "=", 20); + + cnd.desc("info.createTime"); + sql.setCondition(cnd); + Pagination pagination = unionReimburseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); + return Result.success(pagination); + } + + @At + @Ok("void") + @SaCheckPermission("unionReimburse.collect") + @ApiOperation("导出报销汇总表") + public void onExport(@Param(value = "year") Integer year, + @Param(value = "unionId") String unionId, + @Param(value = "unitId") String unitId, + @Param(value = "reimburseProject") String reimburseProject, + @Param(value = "userName") String userName, + HttpServletResponse response) { + //查询审核通过的数据 + Sql sql = Sqls.create(""" + SELECT + t1.*, + ins.state instanceState + FROM + union_reimburse t1 + LEFT JOIN `wf_process_instance` ins ON ins.businessNo = t1.id + $condition + """); + Cnd cnd = buildCondition(year, unionId, unitId, reimburseProject, userName, "t1."); + // 只查询流程实例状态为20的数据(已完成状态) + cnd.and("ins.state", "=", 20); + cnd.desc("t1.createTime"); + + sql.setCondition(cnd); + List list = unionReimburseService.listVO(sql,UnionReimburseCollectExcelVO.class); + + // 获取字典列表 + List reimburseProjectDictList = sysDictService.getSubListByCode("UNION_REIMBURSE_PROJECT"); + List reimburseFundSourceDictList = sysDictService.getSubListByCode("UNION_REIMBURSE_FUND_SOURCE"); + + // 转换字典编码为文字并处理备注字段 + list.forEach(item -> { + // 转换报销项目 + if (item.getReimburseProject() != null) { + Sys_dict projectDict = reimburseProjectDictList.stream() + .filter(d -> d.getCode().equals(item.getReimburseProject())) + .findFirst() + .orElse(null); + if (projectDict != null) { + item.setReimburseProject(projectDict.getName()); + } + } + // 转换报销经费来源 + if (item.getReimburseFundSource() != null) { + Sys_dict typeDict = reimburseFundSourceDictList.stream() + .filter(d -> d.getCode().equals(item.getReimburseFundSource())) + .findFirst() + .orElse(null); + if (typeDict != null) { + item.setReimburseFundSource(typeDict.getName()); + } + } + + // 拼接备注字段(仿照系统代码逻辑,使用activityName和condolenceName字段) + if (cn.hutool.core.util.StrUtil.isNotBlank(item.getActivityName())) { + item.setRemark("活动名称:" + item.getActivityName()); + } else if (cn.hutool.core.util.StrUtil.isNotBlank(item.getCondolenceName())) { + item.setRemark("慰问对象:" + item.getCondolenceName()); + } + }); + + ExportParams exportParams = new ExportParams(); + exportParams.setType(ExcelType.XSSF); + + Workbook workbook = ExcelExportUtil.exportExcel(exportParams, UnionReimburseCollectExcelVO.class, list); + CommonDownloadUtil.download("工会报销汇总表.xlsx", workbook, response); + } + + /** + * 构建查询条件 + * @param year 年度 + * @param unionId 工会ID + * @param unitId 单位ID + * @param reimburseProject 报销项目 + * @param userName 经办人姓名 + * @param prefix 表前缀 + * @return 查询条件 + */ + private Cnd buildCondition(Integer year, String unionId, String unitId, + String reimburseProject, String userName, String prefix) { + Cnd cnd = Cnd.NEW(); + + // 年度查询条件 + cnd.andEX("year(" + prefix + "createTime)", "=", year); + + // 工会、单位名称查询条件 + cnd.andEX(prefix + "unionId", "=", unionId); + cnd.andEX(prefix + "unitId", "=", unitId); + + // 报销项目查询条件 + cnd.andEX(prefix + "reimburseProject", "=", reimburseProject); + + // 经办人姓名查询条件 + if (StrUtil.isNotBlank(userName)) { + cnd.and(prefix + "userName", "like", "%" + userName + "%"); + } + + return cnd; + } +} diff --git a/src/main/java/com/budwk/app/zhgh/unionReimburse/controller/UnionReimburseMineController.java b/src/main/java/com/budwk/app/zhgh/unionReimburse/controller/UnionReimburseMineController.java new file mode 100644 index 00000000..81da1f02 --- /dev/null +++ b/src/main/java/com/budwk/app/zhgh/unionReimburse/controller/UnionReimburseMineController.java @@ -0,0 +1,117 @@ +package com.budwk.app.zhgh.unionReimburse.controller; + +import cn.dev33.satoken.annotation.SaCheckLogin; +import cn.dev33.satoken.annotation.SaCheckPermission; +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.param.PageForm; +import com.budwk.app.base.result.Result; +import com.budwk.app.flow.engine.FlowEngine; +import com.budwk.app.web.commons.auth.utils.SecurityUtil; +import com.budwk.app.zhgh.staffbenefit.condolence.model.Condolence; +import com.budwk.app.zhgh.unionReimburse.service.UnionReimburseService; +import io.swagger.annotations.Api; +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.dao.util.cri.SqlExpressionGroup; +import org.nutz.ioc.aop.Aop; +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 org.nutz.mvc.annotation.Param; + +/** + * @ClassName UnionReimburseMineController + * @Author hongqiwei + * @Date 2025/8/27 14:00 + * @Version 1.0 + * @Description TODO + */ +@IocBean +@At("/platform/unionReimburse/mine") +@Api("工会报销我的") +@Ok("json:full") +public class UnionReimburseMineController { + + @Inject + private UnionReimburseService unionReimburseService; + @Inject + private FlowEngine flowEngine; + + @At("") + @Ok("beetl:/platform/zhgh/unionReimburse/mine/index.html") + @SaCheckLogin + public void index() {} + + @At + @ApiOperation("分页查询") + @SaCheckPermission("unionReimburse.mine") + public Result pageData(PageForm pageForm, + @Param(value = "year") Integer year, + @Param(value = "unionId") String unionId, + @Param(value = "unitId") String unitId, + @Param(value = "reimburseProject") String reimburseProject, + @Param(value = "userName") String userName) { + Sql sql = Sqls.create(""" + SELECT + info.*, + 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') AS startTaskId + FROM + union_reimburse info + LEFT JOIN `wf_process_instance` ins ON ins.businessNo = info.id + LEFT JOIN wf_process_task t ON t.processInstanceId = ins.id AND t.taskState = 10 + LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id + $condition + """); + Cnd cnd = Cnd.NEW(); + // 年度查询条件 + cnd.andEX("year(info.createTime)", "=", year); + + // 工会、单位名称查询条件 + cnd.andEX("info.unionId", "=", unionId); + cnd.andEX("info.unitId", "=", unitId); + + // 报销项目查询条件 + cnd.andEX("info.reimburseProject", "=", reimburseProject); + // 经办人姓名查询条件 + if (StrUtil.isNotBlank(userName)) { + cnd.and("info.userName", "like", "%" + userName + "%"); + } + cnd.desc("info.createTime"); + sql.setCondition(cnd); + Pagination pagination = unionReimburseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); + return Result.success(pagination); + } + + @At + @ApiOperation("删除") + @Aop(TransAop.READ_COMMITTED) + @SaCheckPermission("unionReimburse.mine") + @SLog(type = "unionReimburse", tag = "删除工会报销", msg = "删除工会报销") + public Result delete(@Param("id") String id) { + unionReimburseService.delete(id); + flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id); + return Result.success(); + } +} diff --git a/src/main/java/com/budwk/app/zhgh/unionReimburse/controller/UnionReimburseReviewController.java b/src/main/java/com/budwk/app/zhgh/unionReimburse/controller/UnionReimburseReviewController.java new file mode 100644 index 00000000..915015b0 --- /dev/null +++ b/src/main/java/com/budwk/app/zhgh/unionReimburse/controller/UnionReimburseReviewController.java @@ -0,0 +1,115 @@ +package com.budwk.app.zhgh.unionReimburse.controller; + + +import cn.dev33.satoken.annotation.SaCheckLogin; +import cn.dev33.satoken.annotation.SaCheckPermission; +import cn.hutool.core.util.StrUtil; +import com.budwk.app.base.page.Pagination; +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.unionReimburse.service.UnionReimburseService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.nutz.dao.Cnd; +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 org.nutz.mvc.annotation.Param; + +import java.util.List; + +@IocBean +@At("/platform/unionReimburse/review") +@Ok("json:full") +@Api("审核报销") +public class UnionReimburseReviewController { + + @Inject + private UnionReimburseService unionReimburseService; + + @At("") + @Ok("beetl:/platform/zhgh/unionReimburse/review/index.html") + @SaCheckLogin + public void index() {} + + @At + @ApiOperation("分页查询") + @SaCheckPermission("unionReimburse.review") + public Result pageData(PageForm pageForm, + boolean approval, + Integer year, + String unionId, + String unitId, + String reimburseProject, + String userName) { + Sql sql = Sqls.create(""" + SELECT + info.*, + 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 union_reimburse 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(); + cnd.and("t.taskName", "=", "019925d2-6f33-449a-9fb0-34c470222e99"); + cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId())); + + if (approval) { + cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.WITHDRAW.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode())); + } else { + cnd.and("t.taskState", "=", ProcessTaskStateEnum.DOING.getCode()); + } + // 年度查询条件 + cnd.andEX("year(info.createTime)", "=", year); + + // 工会、单位名称查询条件 + cnd.andEX("info.unionId", "=", unionId); + cnd.andEX("info.unitId", "=", unitId); + + // 报销项目查询条件 + cnd.andEX("info.reimburseProject", "=", reimburseProject); + + + // 经办人姓名查询条件 + if (StrUtil.isNotBlank(userName)) { + cnd.and("info.userName", "like", "%" + userName + "%"); + } + if (StrUtil.isAllBlank(pageForm.getPageOrderName(), pageForm.getPageOrderBy())) { + cnd.desc("info.createTime"); + } else { + cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy())); + } + cnd.groupBy("t.id"); + cnd.desc("t.createdAt"); + sql.setCondition(cnd); + Pagination pagination = unionReimburseService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); + return Result.success(pagination); + } +} diff --git a/src/main/java/com/budwk/app/zhgh/unionReimburse/interceptor/UnionReimburseFundSourceInterceptor.java b/src/main/java/com/budwk/app/zhgh/unionReimburse/interceptor/UnionReimburseFundSourceInterceptor.java new file mode 100644 index 00000000..7668f9fd --- /dev/null +++ b/src/main/java/com/budwk/app/zhgh/unionReimburse/interceptor/UnionReimburseFundSourceInterceptor.java @@ -0,0 +1,117 @@ +package com.budwk.app.zhgh.unionReimburse.interceptor; + +import cn.hutool.core.date.DateUtil; +import com.budwk.app.base.exception.BaseException; +import com.budwk.app.flow.constant.FlowConst; +import com.budwk.app.flow.engine.FlowInterceptor; +import com.budwk.app.flow.engine.core.Execution; +import com.budwk.app.flow.engine.core.ServiceContext; +import com.budwk.app.web.commons.auth.utils.SecurityUtil; +import com.budwk.app.zhgh.outlay.outlayManage.club.model.OutlayManageClub; +import com.budwk.app.zhgh.outlay.outlayManage.model.OutlayUseDetail; +import com.budwk.app.zhgh.outlay.outlayManage.school.model.OutlayManageSchool; +import com.budwk.app.zhgh.outlay.outlayManage.union.model.OutlayManageUnion; +import com.budwk.app.zhgh.outlay.outlayReimburse.model.OutlayReimburse; +import com.budwk.app.zhgh.unionReimburse.model.UnionReimburse; +import org.nutz.dao.Cnd; +import org.nutz.dao.Dao; +import org.nutz.ioc.loader.annotation.Inject; +import org.nutz.json.Json; + +import java.math.BigDecimal; +import java.math.RoundingMode; +import java.util.Date; + +//审核同意后扣除校工会、分工会、社团的经费 +public class UnionReimburseFundSourceInterceptor implements FlowInterceptor { + + + @Override + public void intercept(Execution execution) { + String formDataStr = execution.getArgs().getStr(FlowConst.FORM_DATA); + UnionReimburse unionReimburse = Json.fromJson(UnionReimburse.class, formDataStr); + // 从ServiceContext获取Dao实例 + Dao dao = ServiceContext.find(Dao.class); + String reimburseFundSource = unionReimburse.getReimburseFundSource(); + //经费使用记录表 + OutlayUseDetail detail = new OutlayUseDetail(); + //校工会 + if ("UNION_REIMBURSE_FUND_SOURCE_1".equals(reimburseFundSource)) { + OutlayManageSchool outlayManageSchool = dao.fetch(OutlayManageSchool.class, + Cnd.where("year", "=", DateUtil.year(new Date()))); + if (outlayManageSchool != null) { + //balance已使用额度 + BigDecimal balance = outlayManageSchool.getUsedQuota().add(BigDecimal.valueOf(unionReimburse.getMoney())); + outlayManageSchool.setUsedQuota(balance); + dao.updateIgnoreNull(outlayManageSchool); + + detail.setAdjustUserId(SecurityUtil.getUserId()); + detail.setAdjustUserName(SecurityUtil.getUserUsername()); + detail.setAdjustLoginName(SecurityUtil.getUserLoginname()); + detail.setOutlayReimburseId(unionReimburse.getId()); + detail.setAdjustMoney(BigDecimal.valueOf(unionReimburse.getMoney())); + detail.setAdjustReason(unionReimburse.getReimburseProject()); + detail.setProjectName(unionReimburse.getActivityName()); + detail.setActivityNumber(unionReimburse.getActivityNumber()); + detail.setActivityTime(unionReimburse.getCreateTime()); + detail.setOutlayManageId(outlayManageSchool.getId()); + + dao.insert(detail); + } + } + //分工会 + else if ("UNION_REIMBURSE_FUND_SOURCE_2".equals(reimburseFundSource)) { + OutlayManageUnion outlayManageUnion = dao.fetch(OutlayManageUnion.class, + Cnd.where("unionId", "=", SecurityUtil.getUnionId()).and("year", "=", DateUtil.year(new Date()))); + if (outlayManageUnion != null) { + //balance已使用额度 + BigDecimal balance = outlayManageUnion.getUsedQuota().add(BigDecimal.valueOf(unionReimburse.getMoney())); + outlayManageUnion.setUsedQuota(balance); + dao.updateIgnoreNull(outlayManageUnion); + + detail.setAdjustUserId(SecurityUtil.getUserId()); + detail.setAdjustUserName(SecurityUtil.getUserUsername()); + detail.setAdjustLoginName(SecurityUtil.getUserLoginname()); + detail.setOutlayReimburseId(unionReimburse.getId()); + detail.setAdjustMoney(BigDecimal.valueOf(unionReimburse.getMoney())); + detail.setAdjustReason(unionReimburse.getReimburseProject()); + detail.setProjectName(unionReimburse.getActivityName()); + detail.setActivityNumber(unionReimburse.getActivityNumber()); + detail.setActivityTime(unionReimburse.getCreateTime()); + detail.setOutlayManageId(outlayManageUnion.getId()); + + dao.insert(detail); + } + } + //社团 + else if ("UNION_REIMBURSE_FUND_SOURCE_3".equals(reimburseFundSource)){ + OutlayManageClub outlayManageClub = dao.fetch(OutlayManageClub.class, + Cnd.where("year", "=", DateUtil.year(new Date()))); + if (outlayManageClub != null) { + //balance已使用额度 + BigDecimal balance = outlayManageClub.getUsedQuota().add(BigDecimal.valueOf(unionReimburse.getMoney())); + outlayManageClub.setUsedQuota(balance); + dao.updateIgnoreNull(outlayManageClub); + + detail.setAdjustUserId(SecurityUtil.getUserId()); + detail.setAdjustUserName(SecurityUtil.getUserUsername()); + detail.setAdjustLoginName(SecurityUtil.getUserLoginname()); + detail.setOutlayReimburseId(unionReimburse.getId()); + detail.setAdjustMoney(BigDecimal.valueOf(unionReimburse.getMoney())); + detail.setAdjustReason(unionReimburse.getReimburseProject()); + detail.setProjectName(unionReimburse.getActivityName()); + detail.setActivityNumber(unionReimburse.getActivityNumber()); + detail.setActivityTime(unionReimburse.getCreateTime()); + detail.setOutlayManageId(outlayManageClub.getId()); + + dao.insert(detail); + } + } + else { + // 处理未知的经费来源类型 + throw new BaseException("不支持的经费来源类型: " + reimburseFundSource); + } + } + +} + diff --git a/src/main/java/com/budwk/app/zhgh/unionReimburse/model/UnionReimburse.java b/src/main/java/com/budwk/app/zhgh/unionReimburse/model/UnionReimburse.java new file mode 100644 index 00000000..b29966ef --- /dev/null +++ b/src/main/java/com/budwk/app/zhgh/unionReimburse/model/UnionReimburse.java @@ -0,0 +1,228 @@ +package com.budwk.app.zhgh.unionReimburse.model; + +import cn.hutool.db.DaoTemplate; +import cn.hutool.json.JSONObject; +import com.budwk.app.base.model.BaseModel; +import com.budwk.app.sys.models.Sys_file; +import lombok.Data; +import lombok.EqualsAndHashCode; +import org.nutz.dao.entity.annotation.*; +import org.nutz.dao.interceptor.annotation.PrevInsert; + +import java.util.Date; +import java.util.List; + +/** + * @ClassName UnionReimburse + * @Author hongqiwei + * @Date 2025/8/28 14:43 + * @Version 1.0 + * @Description TODO + */ + +@Data +@EqualsAndHashCode(callSuper = true) +@Table("union_reimburse") +@TableMeta("{'mysql-charset':'utf8mb4'}") +@Comment("工会报销系统") +public class UnionReimburse extends BaseModel { + + + @Name + @Comment("ID") + @ColDefine(type = ColType.VARCHAR, width = 32) + @PrevInsert(uu32 = true) + private String id; + + @Column + @Comment("经办人id") + @ColDefine(type = ColType.VARCHAR, width = 32) + private String userId; + + + @Column + @Comment("经办人姓名") + @ColDefine(type = ColType.VARCHAR, width = 32) + private String userName; + + @Column + @Comment("工号") + @ColDefine(type = ColType.VARCHAR, width = 32) + private String loginName; + + @Column + @Comment("经办人单位ID") + @ColDefine(type = ColType.VARCHAR, width = 32) + private String unitId; + + @Column + @Comment("经办人单位名称") + @ColDefine(type = ColType.VARCHAR, width = 100) + private String unitName; + + @Column + @Comment("经办人分工会ID") + @ColDefine(type = ColType.VARCHAR, width = 32) + private String unionId; + + @Column + @Comment("经办人分工会名称") + @ColDefine(type = ColType.VARCHAR, width = 100) + private String unionName; + + + @Column + @Comment("报销类别") + @ColDefine(type = ColType.VARCHAR, width = 500) + private String reimburseType; + + + @Column + @Comment("报销项目") + @ColDefine(type = ColType.VARCHAR, width = 30) + private String reimburseProject; + + + @Column + @Comment("支付方式") + @ColDefine(type = ColType.VARCHAR, width = 30) + private String paymentWay; + + @Column + @Comment("报销经费来源") + @ColDefine(type = ColType.VARCHAR, width = 32) + private String reimburseFundSource; + + + @Column + @Comment("联系方式(经办人电话)") + @ColDefine(type = ColType.VARCHAR, width = 32) + private String mobile; + + @Column + @Comment("经费余额") + @ColDefine(type = ColType.VARCHAR, width = 100) + private Double fundBalance; + + @Column + @Comment("户名") + @ColDefine(type = ColType.VARCHAR, width = 100) + private String bankUserName; + + @Column + @Comment("银行账号") + @ColDefine(type = ColType.VARCHAR, width = 100) + private String bankCardNumber; + + @Column + @Comment("开户行") + @ColDefine(type = ColType.VARCHAR, width = 100) + private String bankOfDeposit; + + @Column + @Comment("发票张数") + @ColDefine(type = ColType.VARCHAR, width = 30) + private String invoiceNumber; + + @Column + @Comment("发票号码") + @ColDefine(type = ColType.VARCHAR, width = 30) + private String invoice; + + @Column + @Comment("支付内容") + @ColDefine(type = ColType.VARCHAR, width = 20) + private String paymentNotes; + + @Column + @Comment("附件") + @ColDefine(type = ColType.MYSQL_JSON) + private List files; + + + /** + * 慰问 + */ + + @Column + @Comment("慰问对象id") + @ColDefine(type = ColType.VARCHAR, width = 32) + private String condolenceId; + + @Column + @Comment("慰问对象名称") + @ColDefine(type = ColType.VARCHAR, width = 32) + private String condolenceName; + + @Column + @Comment("联系方式(慰问对象电话)") + @ColDefine(type = ColType.VARCHAR, width = 32) + private String condolenceMobile; + + @Column + @Comment("慰问类型") + @ColDefine(type = ColType.VARCHAR, width = 32) + private String condolenceType; + + @Column + @Comment("慰问金额/报销金额") + @ColDefine(type = ColType.FLOAT, width = 10, precision = 2) + private Double money; + + + @Column + @Comment("慰问时间") + @ColDefine(type = ColType.DATETIME, width = 30) + private Date condolenceTime; + + + /** + * 活动/建家/日常 + */ + + @Column + @Comment("活动名称") + @ColDefine(type = ColType.VARCHAR, width = 60) + private String activityName; + + @Column + @Comment("活动类型(1.分工会,2.校工会,3.社团)") + @ColDefine(type = ColType.INT, width = 2) + private Integer activityType; + + @Column + @Comment("活动人数") + @ColDefine(type = ColType.VARCHAR, width = 50) + private String activityNumber; + + + @Column + @Comment("活动时间") + @ColDefine(type = ColType.DATETIME, width = 30) + private Date activityTime; + + @Column + @Comment("活动地点") + @ColDefine(type = ColType.VARCHAR, width = 50) + private String activityPlace; + + /* + * 所属社团 + */ + + @Column + @Comment("社团id") + @ColDefine(type = ColType.VARCHAR, width = 32) + private String clubId; + + @Column + @Comment("所属社团") + @ColDefine(type = ColType.VARCHAR, width = 32) + private String clubName; + + @Column + @Comment("申请时间") + @ColDefine(type = ColType.VARCHAR, width = 30) + private String createTime; + +} diff --git a/src/main/java/com/budwk/app/zhgh/unionReimburse/service/UnionReimburseService.java b/src/main/java/com/budwk/app/zhgh/unionReimburse/service/UnionReimburseService.java new file mode 100644 index 00000000..ba2502b9 --- /dev/null +++ b/src/main/java/com/budwk/app/zhgh/unionReimburse/service/UnionReimburseService.java @@ -0,0 +1,7 @@ +package com.budwk.app.zhgh.unionReimburse.service; + +import com.budwk.app.base.service.BaseService; +import com.budwk.app.zhgh.unionReimburse.model.UnionReimburse; + +public interface UnionReimburseService extends BaseService { +} diff --git a/src/main/java/com/budwk/app/zhgh/unionReimburse/service/impl/UnionReimburseServiceImpl.java b/src/main/java/com/budwk/app/zhgh/unionReimburse/service/impl/UnionReimburseServiceImpl.java new file mode 100644 index 00000000..cdd72184 --- /dev/null +++ b/src/main/java/com/budwk/app/zhgh/unionReimburse/service/impl/UnionReimburseServiceImpl.java @@ -0,0 +1,18 @@ +package com.budwk.app.zhgh.unionReimburse.service.impl; + + +import com.budwk.app.base.service.BaseService; +import com.budwk.app.base.service.impl.BaseServiceImpl; +import com.budwk.app.zhgh.unionReimburse.model.UnionReimburse; +import com.budwk.app.zhgh.unionReimburse.service.UnionReimburseService; +import lombok.extern.slf4j.Slf4j; +import org.nutz.dao.Dao; +import org.nutz.ioc.loader.annotation.IocBean; + +@Slf4j +@IocBean(args = {"refer:dao"}) +public class UnionReimburseServiceImpl extends BaseServiceImpl implements UnionReimburseService { + public UnionReimburseServiceImpl(Dao dao) { + super(dao); + } +} diff --git a/src/main/java/com/budwk/app/zhgh/unionReimburse/vo/UnionReimburseCollectExcelVO.java b/src/main/java/com/budwk/app/zhgh/unionReimburse/vo/UnionReimburseCollectExcelVO.java new file mode 100644 index 00000000..f0b1f451 --- /dev/null +++ b/src/main/java/com/budwk/app/zhgh/unionReimburse/vo/UnionReimburseCollectExcelVO.java @@ -0,0 +1,46 @@ +package com.budwk.app.zhgh.unionReimburse.vo; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.io.Serializable; + + +//工会报销导出 +@Data +public class UnionReimburseCollectExcelVO implements Serializable { + + @Excel(name = "经办人工号", width = 20) + private String loginName; + + @Excel(name = "姓名", width = 20) + private String userName; + + @Excel(name = "所属工会", width = 20) + private String unionName; + + @Excel(name = "所属单位", width = 20) + private String unitName; + + @Excel(name = "报销项目", width = 20) + private String reimburseProject; + + @Excel(name = "备注", width = 20) + private String remark; + + @Excel(name = "金额", width = 20) + private Double money; + + @Excel(name = "申请时间", width = 30) + private String createTime; + + @Excel(name = "经费来源", width = 30) + private String reimburseFundSource; + + //活动名称 + private String activityName; + + //被慰问人 + private String condolenceName; + +} diff --git a/src/main/resources/views/platform/sys/dict/index.html b/src/main/resources/views/platform/sys/dict/index.html index 7f4209a9..cd668d79 100644 --- a/src/main/resources/views/platform/sys/dict/index.html +++ b/src/main/resources/views/platform/sys/dict/index.html @@ -83,6 +83,9 @@ layout("/layouts/platform.html"){ + + + @@ -100,6 +103,9 @@ layout("/layouts/platform.html"){ + + + diff --git a/src/main/resources/views/platform/zhgh/unionReimburse/apply/index.html b/src/main/resources/views/platform/zhgh/unionReimburse/apply/index.html new file mode 100644 index 00000000..b917a08d --- /dev/null +++ b/src/main/resources/views/platform/zhgh/unionReimburse/apply/index.html @@ -0,0 +1,517 @@ + + +
+ + + + + {{formData.userName}} + {{formData.loginName}} + + + + + {{item.name}} + + + + + + + + + {{item.name}} + + + + + + + + + + + {{item.name}} + + + + + + + + + + {{item.name}} + + + + + + + + + + + + + + + + + + + + {{formData.fundBalance}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{formData.money}} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 保存 + 提交 + 提交1 + + +
+ + + + + + diff --git a/src/main/resources/views/platform/zhgh/unionReimburse/collect/index.html b/src/main/resources/views/platform/zhgh/unionReimburse/collect/index.html new file mode 100644 index 00000000..098c7132 --- /dev/null +++ b/src/main/resources/views/platform/zhgh/unionReimburse/collect/index.html @@ -0,0 +1,208 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 导出 + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + diff --git a/src/main/resources/views/platform/zhgh/unionReimburse/info.js b/src/main/resources/views/platform/zhgh/unionReimburse/info.js new file mode 100644 index 00000000..ca922283 --- /dev/null +++ b/src/main/resources/views/platform/zhgh/unionReimburse/info.js @@ -0,0 +1,140 @@ +const unionReimburseInfo = { + template: /*language=HTML*/ ` +
+
+ 申请信息 + 点击查看流程图 +
+ + {{viewData.userName}} + {{viewData.loginName}} + {{viewData.unitName}} + {{viewData.unionName}} + + + + + + + + + + + + + + + + + {{viewData.mobile}} + {{viewData.clubName}} + {{viewData.fundBalance}} + {{viewData.bankUserName}} + {{viewData.bankCardNumber}} + {{viewData.bankOfDeposit}} + {{viewData.condolenceName}} + {{viewData.condolenceMobile}} + {{viewData.typeName}} + {{viewData.money}} + {{viewData.condolenceTime}} + {{viewData.activityName}} + {{viewData.activityType}} + {{viewData.activityNumber}} + {{viewData.activityPlace}} + {{viewData.money}} + {{viewData.activityTime}} + {{viewData.invoiceNumber}} + {{viewData.invoice}} + {{viewData.paymentNotes}} + + + 暂无附件 + + + + + + + + +
+ `, + store, + dicts: ["UNION_REIMBURSE_TYPE", "UNION_REIMBURSE_PAYMENT_WAY", "UNION_REIMBURSE_FUND_SOURCE","UNION_REIMBURSE_PROJECT","PROCESS_TASK_SUBMIT_TYPE"], + data() { + return { + visible: false, + viewData: {}, + doneTasks: [], + row: null + } + }, + methods: { + // 打开 + onOpen(row) { + this.row = row + this.visible = true + this.getInfo() + this.getDoneTasks() + }, + + // 获取申请信息 + getInfo() { + this.$axios.post('/platform/unionReimburse/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 + } + }) + }, + + // 查看流程图 + openChart(){ + this.$refs.snakerChartRef.onOpenFull(this.row.instanceProcessDefineId,this.row.instanceId) + } + + } + + +} diff --git a/src/main/resources/views/platform/zhgh/unionReimburse/mine/index.html b/src/main/resources/views/platform/zhgh/unionReimburse/mine/index.html new file mode 100644 index 00000000..5f95ede2 --- /dev/null +++ b/src/main/resources/views/platform/zhgh/unionReimburse/mine/index.html @@ -0,0 +1,209 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + diff --git a/src/main/resources/views/platform/zhgh/unionReimburse/review/index.html b/src/main/resources/views/platform/zhgh/unionReimburse/review/index.html new file mode 100644 index 00000000..b3dc2914 --- /dev/null +++ b/src/main/resources/views/platform/zhgh/unionReimburse/review/index.html @@ -0,0 +1,255 @@ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 已审核 + 未审核 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + +