From a9169e4c9eb7b7d1bdcbb7d3c8ac40abe0adb651 Mon Sep 17 00:00:00 2001 From: zhouhefeng Date: Thu, 19 Mar 2026 17:58:38 +0800 Subject: [PATCH] commit --- ...ndolenceBranchUnionApprovalController.java | 3 +- .../controller/CondolenceMineController.java | 467 +++++++++--------- ...enceSchoolPrincipalApprovalController.java | 4 +- .../condolence/branchUnionApproval/index.html | 4 + .../staffbenefit/condolence/common/info.js | 8 +- .../schoolPrincipalApproval/index.html | 4 + .../condolence/schoolUnionApproval/index.html | 4 + .../condolence/branchUnionApproval/index.html | 9 +- .../staffbenefit/condolence/common/info.js | 5 + .../staffbenefit/condolence/mine/index.html | 12 +- .../schoolPrincipalApproval/index.html | 7 + .../condolence/schoolUnionApproval/index.html | 7 + 12 files changed, 292 insertions(+), 242 deletions(-) diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/condolence/controller/CondolenceBranchUnionApprovalController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/condolence/controller/CondolenceBranchUnionApprovalController.java index 6bbecf2..081efb2 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/condolence/controller/CondolenceBranchUnionApprovalController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/condolence/controller/CondolenceBranchUnionApprovalController.java @@ -77,6 +77,7 @@ public class CondolenceBranchUnionApprovalController { t.finishTime, t.taskParentId, t.variable taskVariable, + GROUP_CONCAT(DISTINCT ta.actorName, '(', ta.actorAccount, ')' ) AS auditUser, IFNULL(GROUP_CONCAT(DISTINCT nt.displayName),'结束') curTaskName, IF(rt.id IS NOT NULL, 1, 0) AS canRevoke FROM @@ -113,7 +114,7 @@ public class CondolenceBranchUnionApprovalController { } else { cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy())); } - cnd.groupBy("t.id"); + cnd.groupBy("info.id"); sql.setCondition(cnd); Pagination pageVO = condolenceService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); return Result.success(pageVO); diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/condolence/controller/CondolenceMineController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/condolence/controller/CondolenceMineController.java index 2e9c069..e332be7 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/condolence/controller/CondolenceMineController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/condolence/controller/CondolenceMineController.java @@ -79,34 +79,36 @@ import java.util.zip.ZipOutputStream; @Slf4j public class CondolenceMineController { - @Inject - private CondolenceService condolenceService; - @Inject - private Dao dao; - @Inject - private FlowEngine flowEngine; - @Inject - private SmsService smsService; - @Inject - private SysOfficeTemplateUtil sysOfficeTemplateUtil; + @Inject + private CondolenceService condolenceService; + @Inject + private Dao dao; + @Inject + private FlowEngine flowEngine; + @Inject + private SmsService smsService; + @Inject + private SysOfficeTemplateUtil sysOfficeTemplateUtil; - @At("/") - @Ok("beetl:/platform/zhgh/staffbenefit/condolence/mine/index.html") - @SaCheckPermission("condolence.mine") - public void index() {} + @At("/") + @Ok("beetl:/platform/zhgh/staffbenefit/condolence/mine/index.html") + @SaCheckPermission("condolence.mine") + public void index() { + } - @At("/h5") - @Ok("beetl:/platform/zhghh5/staffbenefit/condolence/mine/index.html") - @SaCheckPermission("h5.condolence.mine") - public void h5Index() {} + @At("/h5") + @Ok("beetl:/platform/zhghh5/staffbenefit/condolence/mine/index.html") + @SaCheckPermission("h5.condolence.mine") + public void h5Index() { + } - @At - @ApiOperation("分页查询") - @SaCheckPermission(value = {"condolence.mine", "h5.condolence.mine"}, mode = SaMode.OR) - public Result pageData(PageForm pageForm, - @Param(value = "year") Integer year, - @Param(value = "type") String type) { - Sql sql = Sqls.create(""" + @At + @ApiOperation("分页查询") + @SaCheckPermission(value = {"condolence.mine", "h5.condolence.mine"}, mode = SaMode.OR) + public Result pageData(PageForm pageForm, + @Param(value = "year") Integer year, + @Param(value = "type") String type) { + Sql sql = Sqls.create(""" SELECT info.*, type.name as typeName, @@ -124,6 +126,7 @@ public class CondolenceMineController { t.finishTime, t.taskParentId, t.variable taskVariable, + GROUP_CONCAT(DISTINCT ta.actorName, '(', ta.actorAccount, ')' ) AS auditUser, 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 @@ -134,61 +137,61 @@ public class CondolenceMineController { LEFT JOIN wf_process_task_actor ta ON ta.processTaskId = t.id $condition """); - Cnd cnd = Cnd.NEW(); - if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) { - SqlExpressionGroup seg = new SqlExpressionGroup(); - seg.or(Condolence::getHelpUserName, "like", "%" + pageForm.getSearchKeyword() + "%"); - seg.or(Condolence::getHelpLoginName, "like", "%" + pageForm.getSearchKeyword() + "%"); - cnd.and(seg); - } - cnd.andEX("year(info.createTime)", "=", year); - cnd.andEX("info.type", "=", type); - cnd.and("info.createdBy", "=", SecurityUtil.getUserId()); + Cnd cnd = Cnd.NEW(); + if (StrUtil.isNotBlank(pageForm.getSearchKeyword())) { + SqlExpressionGroup seg = new SqlExpressionGroup(); + seg.or(Condolence::getHelpUserName, "like", "%" + pageForm.getSearchKeyword() + "%"); + seg.or(Condolence::getHelpLoginName, "like", "%" + pageForm.getSearchKeyword() + "%"); + cnd.and(seg); + } + cnd.andEX("year(info.createTime)", "=", year); + cnd.andEX("info.type", "=", type); + cnd.and("info.createdBy", "=", SecurityUtil.getUserId()); - if (StrUtil.isNotBlank(pageForm.getPageOrderName()) && StrUtil.isNotBlank(pageForm.getPageOrderBy())) { - cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy())); - } else { - cnd.desc("info.createTime"); - } + if (StrUtil.isNotBlank(pageForm.getPageOrderName()) && StrUtil.isNotBlank(pageForm.getPageOrderBy())) { + cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy())); + } else { + cnd.desc("info.createTime"); + } + cnd.groupBy("info.id"); + sql.setCondition(cnd); + Pagination pagination = condolenceService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); + return Result.success(pagination); + } - sql.setCondition(cnd); - Pagination pagination = condolenceService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); - return Result.success(pagination); - } + @At + @ApiOperation("删除") + @Aop(TransAop.READ_COMMITTED) + @SaCheckPermission(value = {"condolence.mine", "h5.condolence.mine"}, mode = SaMode.OR) + @SLog(tag = "职工慰问系统-我的申请", msg = "删除职工慰问") + public Result delete(@Param("id") String id) { + condolenceService.delete(id); + flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id); + return Result.success(); + } - @At - @ApiOperation("删除") - @Aop(TransAop.READ_COMMITTED) - @SaCheckPermission(value = {"condolence.mine", "h5.condolence.mine"}, mode = SaMode.OR) - @SLog(tag = "职工慰问系统-我的申请", msg = "删除职工慰问") - public Result delete(@Param("id") String id) { - condolenceService.delete(id); - flowEngine.processInstanceService().deleteProcessInstanceByBusinessKey(id); - return Result.success(); - } - - @At - @ApiOperation("查询单个慰问申请信息") - @SaCheckPermission("condolence") - public Result info(String id) { - Condolence condolence = condolenceService.fetch(id); - CondolenceType type = condolenceService.dao().fetch(CondolenceType.class, Cnd.where(CondolenceType::getId, "=", condolence.getType())); - NutMap nutMap = Lang.obj2nutmap(condolence); - nutMap.put("typeName", type.getName()); - //smsService.send("20182040", "这是一条由智慧工会系统发出的测试消息。"); - return Result.success(nutMap); - } + @At + @ApiOperation("查询单个慰问申请信息") + @SaCheckPermission("condolence") + public Result info(String id) { + Condolence condolence = condolenceService.fetch(id); + CondolenceType type = condolenceService.dao().fetch(CondolenceType.class, Cnd.where(CondolenceType::getId, "=", condolence.getType())); + NutMap nutMap = Lang.obj2nutmap(condolence); + nutMap.put("typeName", type.getName()); + //smsService.send("20182040", "这是一条由智慧工会系统发出的测试消息。"); + return Result.success(nutMap); + } - @At - @Ok("void") - public void doExport(String id, HttpServletResponse response) throws Exception { - Condolence condolence = condolenceService.fetch(id); - if (condolence == null) { - throw new RuntimeException("慰问记录不存在"); - } + @At + @Ok("void") + public void doExport(String id, HttpServletResponse response) throws Exception { + Condolence condolence = condolenceService.fetch(id); + if (condolence == null) { + throw new RuntimeException("慰问记录不存在"); + } - Sql sql = Sqls.create(""" + Sql sql = Sqls.create(""" SELECT info.*, ins.id AS instanceId @@ -198,28 +201,28 @@ public class CondolenceMineController { WHERE ins.state = 20 AND info.id = @id """).setParam("id", id); - sql.setCallback(Sqls.callback.map()); - dao.execute(sql); - NutMap info = (NutMap) sql.getResult(); + sql.setCallback(Sqls.callback.map()); + dao.execute(sql); + NutMap info = (NutMap) sql.getResult(); - HashMap docData = new HashMap<>(); - HashMap docData2 = new HashMap<>(); + HashMap docData = new HashMap<>(); + HashMap docData2 = new HashMap<>(); - DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); - LocalDateTime createTime = LocalDateTime.parse(condolence.getCreateTime(), formatter); + DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); + LocalDateTime createTime = LocalDateTime.parse(condolence.getCreateTime(), formatter); - docData.put("createTime", DateUtil.format(createTime, "yyyy年MM月dd日")); - docData.put("applyUnionName", condolence.getApplyUnionName()); - docData.put("info", info); + docData.put("createTime", DateUtil.format(createTime, "yyyy年MM月dd日")); + docData.put("applyUnionName", condolence.getApplyUnionName()); + docData.put("info", info); - docData2.put("createTime", DateUtil.format(createTime, "yyyy年MM月dd日")); - docData2.put("applyUnionName", condolence.getApplyUnionName()); - docData2.put("bankUserName", condolence.getBankUserName()); - docData2.put("bankCardNumber", condolence.getBankCardNumber()); - docData2.put("bankOfDeposit", condolence.getBankOfDeposit()); - docData2.put("info", info); + docData2.put("createTime", DateUtil.format(createTime, "yyyy年MM月dd日")); + docData2.put("applyUnionName", condolence.getApplyUnionName()); + docData2.put("bankUserName", condolence.getBankUserName()); + docData2.put("bankCardNumber", condolence.getBankCardNumber()); + docData2.put("bankOfDeposit", condolence.getBankOfDeposit()); + docData2.put("info", info); - // 金额转大写 + // 金额转大写 // if (condolence.getMoney() != null) { // docData.put("money_big", MoneyUtil.toRMBUpper(String.valueOf(condolence.getMoney()))); // } else { @@ -227,171 +230,171 @@ public class CondolenceMineController { // } // docData.put("money", condolence.getMoney()); - String fileName; - String templateName; - String type = condolence.getType(); + String fileName; + String templateName; + String type = condolence.getType(); - if (("6fb2ae129e674c0dbadc21d9abc22943").equals(type)) { - fileName = "工会会员结婚慰问报销审批单"+ "_" + - DateUtil.format(createTime, "yyyyMMdd") + ".docx"; - templateName = "condolence_marry"; + if (("6fb2ae129e674c0dbadc21d9abc22943").equals(type)) { + fileName = "工会会员结婚慰问报销审批单" + "_" + + DateUtil.format(createTime, "yyyyMMdd") + ".docx"; + templateName = "condolence_marry"; - docData.put("type", "会员结婚慰问"); - docData.put("way", "现金"); - docData.put("occurTime", condolence.getOccurTime()); + docData.put("type", "会员结婚慰问"); + docData.put("way", "现金"); + docData.put("occurTime", condolence.getOccurTime()); - docData2.put("type", "会员结婚慰问"); - docData2.put("money", "1000"); - docData2.put("money_big", "壹仟元整"); - } else if (("cf4ce7af322d464f8f86d818fcc00203").equals(type)){ - fileName = "工会会员生病住院慰问报销审批单"+ "_" + - DateUtil.format(createTime, "yyyyMMdd") + ".docx"; - templateName = "condolence_hospitalization"; + docData2.put("type", "会员结婚慰问"); + docData2.put("money", "1000"); + docData2.put("money_big", "壹仟元整"); + } else if (("cf4ce7af322d464f8f86d818fcc00203").equals(type)) { + fileName = "工会会员生病住院慰问报销审批单" + "_" + + DateUtil.format(createTime, "yyyyMMdd") + ".docx"; + templateName = "condolence_hospitalization"; - docData.put("type", "会员生病慰问"); - docData.put("way", "现金"); - docData.put("hospitalizationTime", condolence.getHospitalizationTime()); - docData.put("leaveHospitalTime", condolence.getLeaveHospitalTime()); - docData.put("thisYearHospitalizationNum", condolence.getThisYearHospitalizationNum()); + docData.put("type", "会员生病慰问"); + docData.put("way", "现金"); + docData.put("hospitalizationTime", condolence.getHospitalizationTime()); + docData.put("leaveHospitalTime", condolence.getLeaveHospitalTime()); + docData.put("thisYearHospitalizationNum", condolence.getThisYearHospitalizationNum()); - docData2.put("type", "会员生病慰问"); - docData2.put("money", "1000"); - docData2.put("money_big", "壹仟元整"); - } else if (("c90cb10dce6542e99ae271bee6fe8cc0").equals(type)){ - fileName = "工会会员生育慰问报销审批单"+ "_" + - DateUtil.format(createTime, "yyyyMMdd") + ".docx"; - templateName = "condolence_birth"; + docData2.put("type", "会员生病慰问"); + docData2.put("money", "1000"); + docData2.put("money_big", "壹仟元整"); + } else if (("c90cb10dce6542e99ae271bee6fe8cc0").equals(type)) { + fileName = "工会会员生育慰问报销审批单" + "_" + + DateUtil.format(createTime, "yyyyMMdd") + ".docx"; + templateName = "condolence_birth"; - docData.put("type", "会员生育慰问"); - docData.put("way", "现金"); - docData.put("occurTime", condolence.getOccurTime()); - docData.put("hospitalizationTime", condolence.getHospitalizationTime()); - docData.put("leaveHospitalTime", condolence.getLeaveHospitalTime()); + docData.put("type", "会员生育慰问"); + docData.put("way", "现金"); + docData.put("occurTime", condolence.getOccurTime()); + docData.put("hospitalizationTime", condolence.getHospitalizationTime()); + docData.put("leaveHospitalTime", condolence.getLeaveHospitalTime()); - docData2.put("type", "会员生育慰问"); - docData2.put("money", "1000"); - docData2.put("money_big", "壹仟元整"); - }else if (("4e316737e71047e0b01aea78524c1416").equals(type)){ - fileName = "工会会员直系亲属去世报销审批单"+ "_" + - DateUtil.format(createTime, "yyyyMMdd") + ".docx"; - templateName = "condolence_relative_died"; + docData2.put("type", "会员生育慰问"); + docData2.put("money", "1000"); + docData2.put("money_big", "壹仟元整"); + } else if (("4e316737e71047e0b01aea78524c1416").equals(type)) { + fileName = "工会会员直系亲属去世报销审批单" + "_" + + DateUtil.format(createTime, "yyyyMMdd") + ".docx"; + templateName = "condolence_relative_died"; - docData.put("type", "会员直系亲属去世慰问"); - docData.put("way", "现金"); - docData.put("relation", condolence.getRelation()); - docData.put("occurTime", condolence.getOccurTime()); + docData.put("type", "会员直系亲属去世慰问"); + docData.put("way", "现金"); + docData.put("relation", condolence.getRelation()); + docData.put("occurTime", condolence.getOccurTime()); - docData2.put("type", "会员直系亲属去世慰问"); - docData2.put("money", "1000"); - docData2.put("money_big", "壹仟元整"); - }else if (("b8ee30faacb2469593dfedb5b52565aa").equals(type)){ - fileName = "工会会员职工去世慰问报销审批单"+ "_" + - DateUtil.format(createTime, "yyyyMMdd") + ".docx"; - templateName = "condolence_died"; + docData2.put("type", "会员直系亲属去世慰问"); + docData2.put("money", "1000"); + docData2.put("money_big", "壹仟元整"); + } else if (("b8ee30faacb2469593dfedb5b52565aa").equals(type)) { + fileName = "工会会员职工去世慰问报销审批单" + "_" + + DateUtil.format(createTime, "yyyyMMdd") + ".docx"; + templateName = "condolence_died"; - docData.put("type", "会员职工去世慰问"); - docData.put("way", "现金"); - docData.put("occurTime", condolence.getOccurTime()); + docData.put("type", "会员职工去世慰问"); + docData.put("way", "现金"); + docData.put("occurTime", condolence.getOccurTime()); - docData2.put("type", "会员职工去世慰问"); - docData2.put("money", "3000"); - docData2.put("money_big", "叁仟元整"); - }else if (("1a2f7e8decb649a6ba8ca76e2af07779").equals(type)){ - fileName = "工会会员退休慰问报销审批单"+ "_" + - DateUtil.format(createTime, "yyyyMMdd") + ".docx"; - templateName = "condolence_retirement"; + docData2.put("type", "会员职工去世慰问"); + docData2.put("money", "3000"); + docData2.put("money_big", "叁仟元整"); + } else if (("1a2f7e8decb649a6ba8ca76e2af07779").equals(type)) { + fileName = "工会会员退休慰问报销审批单" + "_" + + DateUtil.format(createTime, "yyyyMMdd") + ".docx"; + templateName = "condolence_retirement"; - docData.put("type", "会员退休慰问"); - docData.put("way", "工会统一发放慰问信及慰问卷"); - docData.put("occurTime", condolence.getOccurTime()); + docData.put("type", "会员退休慰问"); + docData.put("way", "工会统一发放慰问信及慰问卷"); + docData.put("occurTime", condolence.getOccurTime()); - docData2.put("type", "会员退休慰问"); - docData2.put("money", "1000"); - docData2.put("money_big", "壹仟元整"); - } else { - fileName = "工会会员慰问报销审批单"+ "_" + - DateUtil.format(createTime, "yyyyMMdd") + ".docx"; - templateName = "condolence_other"; + docData2.put("type", "会员退休慰问"); + docData2.put("money", "1000"); + docData2.put("money_big", "壹仟元整"); + } else { + fileName = "工会会员慰问报销审批单" + "_" + + DateUtil.format(createTime, "yyyyMMdd") + ".docx"; + templateName = "condolence_other"; - docData.put("type", "会员其他慰问"); - docData.put("way", "现金"); - docData.put("occurTime", condolence.getOccurTime()); - } + docData.put("type", "会员其他慰问"); + docData.put("way", "现金"); + docData.put("occurTime", condolence.getOccurTime()); + } - List doneTaskVos = new ArrayList<>(); - List doneTaskList = flowEngine.processTaskService().getDoneTaskList(info.getLong("instanceId"), null); - for (ProcessTask doneTask : doneTaskList) { - ProcessTaskVO taskVO = flowEngine.processTaskService().findById(doneTask.getId()); - doneTaskVos.add(taskVO); - } + List doneTaskVos = new ArrayList<>(); + List doneTaskList = flowEngine.processTaskService().getDoneTaskList(info.getLong("instanceId"), null); + for (ProcessTask doneTask : doneTaskList) { + ProcessTaskVO taskVO = flowEngine.processTaskService().findById(doneTask.getId()); + doneTaskVos.add(taskVO); + } - // 分工会审核 - doneTaskVos.stream().filter(task -> "分工会审核".equals(task.getDisplayName())) - .max(Comparator.comparing(ProcessTaskVO::getCreatedAt)) - .ifPresent(v -> { - Dict taskFormData = v.getTaskFormData(); - HashMap approval = new HashMap<>(); + // 分工会审核 + doneTaskVos.stream().filter(task -> "分工会审核".equals(task.getDisplayName())) + .max(Comparator.comparing(ProcessTaskVO::getCreatedAt)) + .ifPresent(v -> { + Dict taskFormData = v.getTaskFormData(); + HashMap approval = new HashMap<>(); - approval.put("date", DateUtil.format(v.getFinishTime(), "yyyy年MM月dd日")); - approval.put("user", taskFormData.getStr("tf_userName")); - if (StrUtil.isNotBlank(taskFormData.getStr("tf_sign"))) { - approval.put("sign", sysOfficeTemplateUtil.createPictureRenderData(taskFormData.getStr("tf_sign"))); - } - approval.put("opinion", taskFormData.getStr("tf_opinion")); - docData.put("fgh", approval); - docData2.put("fgh", approval); - }); + approval.put("date", DateUtil.format(v.getFinishTime(), "yyyy年MM月dd日")); + approval.put("user", taskFormData.getStr("tf_userName")); + if (StrUtil.isNotBlank(taskFormData.getStr("tf_sign"))) { + approval.put("sign", sysOfficeTemplateUtil.createPictureRenderData(taskFormData.getStr("tf_sign"))); + } + approval.put("opinion", taskFormData.getStr("tf_opinion")); + docData.put("fgh", approval); + docData2.put("fgh", approval); + }); - // 校工会副主席审核 - doneTaskVos.stream().filter(task -> "校工会审核".equals(task.getDisplayName())) - .max(Comparator.comparing(ProcessTaskVO::getCreatedAt)) - .ifPresent(v -> { - Dict taskFormData = v.getTaskFormData(); - HashMap approval = new HashMap<>(); + // 校工会副主席审核 + doneTaskVos.stream().filter(task -> "校工会审核".equals(task.getDisplayName())) + .max(Comparator.comparing(ProcessTaskVO::getCreatedAt)) + .ifPresent(v -> { + Dict taskFormData = v.getTaskFormData(); + HashMap approval = new HashMap<>(); - approval.put("date", DateUtil.format(v.getFinishTime(), "yyyy年MM月dd日")); - approval.put("user", taskFormData.getStr("tf_userName")); - if (StrUtil.isNotBlank(taskFormData.getStr("tf_sign"))) { - approval.put("sign", sysOfficeTemplateUtil.createPictureRenderData(taskFormData.getStr("tf_sign"))); - } - approval.put("opinion", taskFormData.getStr("tf_opinion")); - docData.put("xzx", approval); - docData2.put("xzx", approval); - }); + approval.put("date", DateUtil.format(v.getFinishTime(), "yyyy年MM月dd日")); + approval.put("user", taskFormData.getStr("tf_userName")); + if (StrUtil.isNotBlank(taskFormData.getStr("tf_sign"))) { + approval.put("sign", sysOfficeTemplateUtil.createPictureRenderData(taskFormData.getStr("tf_sign"))); + } + approval.put("opinion", taskFormData.getStr("tf_opinion")); + docData.put("xzx", approval); + docData2.put("xzx", approval); + }); - response.setContentType("application/octet-stream"); - response.setHeader("content-disposition", "attachment;filename=" - + URLEncoder.encode("报销审批单.zip", "UTF-8")); + response.setContentType("application/octet-stream"); + response.setHeader("content-disposition", "attachment;filename=" + + URLEncoder.encode("报销审批单.zip", "UTF-8")); - try (ZipOutputStream zipOut = new ZipOutputStream(response.getOutputStream())) { - ZipEntry zipEntry = new ZipEntry(fileName); - zipOut.putNextEntry(zipEntry); + try (ZipOutputStream zipOut = new ZipOutputStream(response.getOutputStream())) { + ZipEntry zipEntry = new ZipEntry(fileName); + zipOut.putNextEntry(zipEntry); - try (ByteArrayOutputStream wordOut = new ByteArrayOutputStream()) { - XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate(templateName)) - .render(docData) - .writeAndClose(wordOut); - zipOut.write(wordOut.toByteArray()); - } + try (ByteArrayOutputStream wordOut = new ByteArrayOutputStream()) { + XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate(templateName)) + .render(docData) + .writeAndClose(wordOut); + zipOut.write(wordOut.toByteArray()); + } - zipOut.closeEntry(); + zipOut.closeEntry(); - String fileName2 = "武汉城市职业学院报销审批单" + ".docx"; - ZipEntry zipEntry2 = new ZipEntry(fileName2); - zipOut.putNextEntry(zipEntry2); + String fileName2 = "武汉城市职业学院报销审批单" + ".docx"; + ZipEntry zipEntry2 = new ZipEntry(fileName2); + zipOut.putNextEntry(zipEntry2); - try (ByteArrayOutputStream wordOut2 = new ByteArrayOutputStream()) { - XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate("reimbursement_approval")) - .render(docData2) - .writeAndClose(wordOut2); - zipOut.write(wordOut2.toByteArray()); - } + try (ByteArrayOutputStream wordOut2 = new ByteArrayOutputStream()) { + XWPFTemplate.compile(sysOfficeTemplateUtil.getTemplate("reimbursement_approval")) + .render(docData2) + .writeAndClose(wordOut2); + zipOut.write(wordOut2.toByteArray()); + } - zipOut.closeEntry(); - zipOut.finish(); - } catch (IOException e) { - log.error("导出 ZIP 文件失败,ID: {}, 错误信息: {}", id, e.getMessage()); - throw e; - } - } + zipOut.closeEntry(); + zipOut.finish(); + } catch (IOException e) { + log.error("导出 ZIP 文件失败,ID: {}, 错误信息: {}", id, e.getMessage()); + throw e; + } + } } diff --git a/src/main/java/com/budwk/app/zhgh/staffbenefit/condolence/controller/CondolenceSchoolPrincipalApprovalController.java b/src/main/java/com/budwk/app/zhgh/staffbenefit/condolence/controller/CondolenceSchoolPrincipalApprovalController.java index 7e7de9d..30193ba 100644 --- a/src/main/java/com/budwk/app/zhgh/staffbenefit/condolence/controller/CondolenceSchoolPrincipalApprovalController.java +++ b/src/main/java/com/budwk/app/zhgh/staffbenefit/condolence/controller/CondolenceSchoolPrincipalApprovalController.java @@ -102,7 +102,7 @@ public class CondolenceSchoolPrincipalApprovalController { cnd.andEX("info.applyUnitId", "=", unitId); cnd.and("t.taskName", "=", "34f7938e-47a3-4b3a-b4e0-92b7a3f47865"); -// cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId())); + cnd.and("ta.actorId", "in", List.of(SecurityUtil.getUserId())); if (approval) { cnd.and("t.taskState", "in", List.of(ProcessTaskStateEnum.FINISHED.getCode(), ProcessTaskStateEnum.INTERRUPT.getCode())); @@ -115,7 +115,7 @@ public class CondolenceSchoolPrincipalApprovalController { } else { cnd.orderBy(pageForm.getPageOrderName(), PageUtil.getOrder(pageForm.getPageOrderBy())); } - cnd.groupBy("t.id"); + cnd.groupBy("info.id"); sql.setCondition(cnd); Pagination pageVO = condolenceService.listPageMap(pageForm.getPageNumber(), pageForm.getPageSize(), sql); return Result.success(pageVO); diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/condolence/branchUnionApproval/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/condolence/branchUnionApproval/index.html index 9afd341..06b9ccc 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/condolence/branchUnionApproval/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/condolence/branchUnionApproval/index.html @@ -81,6 +81,10 @@ layout("/layouts/platform.html"){ :rules="[{required:true,message:'必填',trigger:['change','blur']}]"> + + + 取消 diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/condolence/common/info.js b/src/main/resources/views/platform/zhgh/staffbenefit/condolence/common/info.js index bae8db7..bc59728 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/condolence/common/info.js +++ b/src/main/resources/views/platform/zhgh/staffbenefit/condolence/common/info.js @@ -75,9 +75,15 @@ const condolenceInfo = { - {{ + {{ task.taskFormData.opinion }} + + + 暂无签字 + diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/condolence/schoolPrincipalApproval/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/condolence/schoolPrincipalApproval/index.html index 6283e29..442dc71 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/condolence/schoolPrincipalApproval/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/condolence/schoolPrincipalApproval/index.html @@ -101,6 +101,10 @@ layout("/layouts/platform.html"){ :rules="[{required:true,message:'必填',trigger:['change','blur']}]"> + + + 取消 diff --git a/src/main/resources/views/platform/zhgh/staffbenefit/condolence/schoolUnionApproval/index.html b/src/main/resources/views/platform/zhgh/staffbenefit/condolence/schoolUnionApproval/index.html index 6283e29..442dc71 100644 --- a/src/main/resources/views/platform/zhgh/staffbenefit/condolence/schoolUnionApproval/index.html +++ b/src/main/resources/views/platform/zhgh/staffbenefit/condolence/schoolUnionApproval/index.html @@ -101,6 +101,10 @@ layout("/layouts/platform.html"){ :rules="[{required:true,message:'必填',trigger:['change','blur']}]"> + + + 取消 diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/condolence/branchUnionApproval/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/condolence/branchUnionApproval/index.html index d793193..f0885a4 100644 --- a/src/main/resources/views/platform/zhghh5/staffbenefit/condolence/branchUnionApproval/index.html +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/condolence/branchUnionApproval/index.html @@ -38,7 +38,7 @@ layout("/layouts/platform_h5.html"){ {{row.applyUnionName}} {{row.applyUnitName}} {{row.typeName}} - {{row.curTaskName}} + {{row.curTaskName}}-{{row.auditUser}} diff --git a/src/main/resources/views/platform/zhghh5/staffbenefit/condolence/mine/index.html b/src/main/resources/views/platform/zhghh5/staffbenefit/condolence/mine/index.html index 49aec50..30ca70e 100644 --- a/src/main/resources/views/platform/zhghh5/staffbenefit/condolence/mine/index.html +++ b/src/main/resources/views/platform/zhghh5/staffbenefit/condolence/mine/index.html @@ -33,7 +33,8 @@ layout("/layouts/platform_h5.html"){ {{row.applyUnionName}} {{row.applyUnitName}} {{row.typeName}} - {{row.taskName}} + {{row.taskName}}-{{row.auditUser}} +