diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/common/util/FreemarkerWordUtil.java b/pmapi/src/main/java/com/ningdatech/pmapi/common/util/FreemarkerWordUtil.java index dca4042..8fa62f0 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/common/util/FreemarkerWordUtil.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/common/util/FreemarkerWordUtil.java @@ -106,7 +106,7 @@ public class FreemarkerWordUtil { expert.setIdcard("1212121211212121"); dto.getExperts().add(expert); } - create(dto, "专家费.ftl", "/Users/wendy/Desktop/", "专家费.doc"); + create(dto, "meeting/专家费.ftl", "/Users/wendy/Desktop/", "专家费.doc"); } diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/ExpertExportManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/ExpertExportManage.java index 8752cf6..8455cfe 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/ExpertExportManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/meeting/manage/ExpertExportManage.java @@ -33,6 +33,7 @@ import java.util.List; import java.util.Map; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Function; +import java.util.function.Supplier; /** *

@@ -56,6 +57,15 @@ public class ExpertExportManage { //================================================================================================================== + private static final String EXPERT_REVIEW = "meeting/专家评审单.ftl"; + + private static final String EXPERT_FEE = "meeting/专家费.ftl"; + + private static final String LABOR_FEE = "meeting/劳务费发放.ftl"; + + private static final String EXPERT_INVITE = "meeting/专家抽取表.ftl"; + + //================================================================================================================== static Function meetingUsageTime = (type) -> { if (1 == type) { return "半天"; @@ -66,11 +76,11 @@ public class ExpertExportManage { return StrUtil.EMPTY; }; + static Supplier wordName = () -> UUID.randomUUID().toString(true) + ".doc"; + //================================================================================================================== public void exportFeeForExpert(Long meetingId, HttpServletResponse response) { - final String template = "专家费.ftl"; - String fileName = UUID.randomUUID().toString(true) + ".doc"; try { Meeting meeting = meetingService.getById(meetingId); ExpertFeeExportDTO data = new ExpertFeeExportDTO(); @@ -110,7 +120,7 @@ public class ExpertExportManage { } data.getExperts().add(expert); }); - FreemarkerWordUtil.export(fileName, data, response, template); + FreemarkerWordUtil.export(wordName.get(), data, response, EXPERT_FEE); } catch (TemplateException | IOException e) { log.error("专家费用单导出异常:{}", meetingId, e); throw BizException.wrap("专家费用单导出失败"); @@ -118,8 +128,6 @@ public class ExpertExportManage { } public void expertReviewTable(Long meetingId, HttpServletResponse response) { - final String template = "专家评审单.ftl"; - String fileName = UUID.randomUUID().toString(true) + ".doc"; try { Meeting meeting = meetingService.getById(meetingId); ExpertReviewTableDTO data = new ExpertReviewTableDTO(); @@ -137,7 +145,7 @@ public class ExpertExportManage { inners.forEach(w -> projectNames.add(w.getProjectName())); } data.setProjectName(StrUtil.join("、", projectNames)); - FreemarkerWordUtil.export(fileName, data, response, template); + FreemarkerWordUtil.export(wordName.get(), data, response, EXPERT_REVIEW); } catch (TemplateException | IOException e) { log.error("专家评审单导出异常:{}", meetingId, e); throw BizException.wrap("专家评审单导出失败"); @@ -145,8 +153,6 @@ public class ExpertExportManage { } public void laborFeeAuditTable(Long meetingId, HttpServletResponse response) { - final String template = "劳务费发放.ftl"; - String fileName = UUID.randomUUID().toString(true) + ".doc"; try { Meeting meeting = meetingService.getById(meetingId); LaborFeeAuditTableDTO data = new LaborFeeAuditTableDTO(); @@ -180,7 +186,7 @@ public class ExpertExportManage { data.getExperts().add(expert); }); data.setExpertCount(experts.size()); - FreemarkerWordUtil.export(fileName, data, response, template); + FreemarkerWordUtil.export(wordName.get(), data, response, LABOR_FEE); } catch (TemplateException | IOException e) { log.error("劳务费发放审批单导出异常:{}", meetingId, e); throw BizException.wrap("劳务费发放审批单导出失败"); @@ -188,7 +194,6 @@ public class ExpertExportManage { } public void expertInviteTable(Long meetingId, HttpServletResponse response) { - final String template = "专家抽取表.ftl"; try { Meeting meeting = meetingService.getById(meetingId); ExpertInviteTableDTO data = new ExpertInviteTableDTO(); @@ -228,8 +233,7 @@ public class ExpertExportManage { } data.getExperts().add(expert); }); - String fileName = UUID.randomUUID().toString(true) + ".doc"; - FreemarkerWordUtil.export(fileName, data, response, template); + FreemarkerWordUtil.export(wordName.get(), data, response, EXPERT_INVITE); } catch (Exception e) { log.error("专家抽取表导出异常:{}", meetingId, e); throw BizException.wrap("专家抽取表导出失败"); diff --git a/pmapi/src/main/resources/template/专家抽取表.ftl b/pmapi/src/main/resources/template/meeting/专家抽取表.ftl similarity index 96% rename from pmapi/src/main/resources/template/专家抽取表.ftl rename to pmapi/src/main/resources/template/meeting/专家抽取表.ftl index 9514b14..2ff318e 100644 --- a/pmapi/src/main/resources/template/专家抽取表.ftl +++ b/pmapi/src/main/resources/template/meeting/专家抽取表.ftl @@ -7,20 +7,7 @@ xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" w:macrosPresent="no" w:embeddedObjPresent="no" w:ocxPresent="no" xml:space="preserve" - xmlns:wpsCustomData="http://www.wps.cn/officeDocument/2013/wpsCustomData"> - Data - 潦草迷茫 - 2023-07-21T00:04:00Z - 2023-07-24T23:54:20Z - 1440 - 14 - - - wqlLaW5nc29mdCBQREYgdG8gV1BTIDkw - 2023-07-24T17:28:04Z - 2052-5.5.1.7991 - BB348C58014F7E88AC9EBE649F4580AC_43 - + xmlns:wpsCustomData="http://www.wps.cn/officeDocument/2013/wpsCustomData"> diff --git a/pmapi/src/main/resources/template/专家评审单.ftl b/pmapi/src/main/resources/template/meeting/专家评审单.ftl similarity index 95% rename from pmapi/src/main/resources/template/专家评审单.ftl rename to pmapi/src/main/resources/template/meeting/专家评审单.ftl index 849cb3c..0981b1b 100644 --- a/pmapi/src/main/resources/template/专家评审单.ftl +++ b/pmapi/src/main/resources/template/meeting/专家评审单.ftl @@ -7,20 +7,7 @@ xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" w:macrosPresent="no" w:embeddedObjPresent="no" w:ocxPresent="no" xml:space="preserve" - xmlns:wpsCustomData="http://www.wps.cn/officeDocument/2013/wpsCustomData"> - Data - 潦草迷茫 - 2023-07-21T08:04:00Z - 2023-07-24T20:44:34Z - 12960 - 14 - - - wqlLaW5nc29mdCBQREYgdG8gV1BTIDkw - 2023-07-24T17:28:04Z - 2052-5.5.1.7991 - 1DC93F630FB80A5D3272BE6472F2ECEB_43 - + xmlns:wpsCustomData="http://www.wps.cn/officeDocument/2013/wpsCustomData"> diff --git a/pmapi/src/main/resources/template/专家费.ftl b/pmapi/src/main/resources/template/meeting/专家费.ftl similarity index 96% rename from pmapi/src/main/resources/template/专家费.ftl rename to pmapi/src/main/resources/template/meeting/专家费.ftl index 8d1786b..f156c2f 100644 --- a/pmapi/src/main/resources/template/专家费.ftl +++ b/pmapi/src/main/resources/template/meeting/专家费.ftl @@ -7,20 +7,7 @@ xmlns:wx="http://schemas.microsoft.com/office/word/2003/auxHint" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" w:macrosPresent="no" w:embeddedObjPresent="no" w:ocxPresent="no" xml:space="preserve" - xmlns:wpsCustomData="http://www.wps.cn/officeDocument/2013/wpsCustomData"> - Data - 潦草迷茫 - 2023-07-21T08:03:00Z - 2023-07-24T19:10:05Z - 14400 - 14 - - - wqlLaW5nc29mdCBQREYgdG8gV1BTIDkw - 2023-07-24T17:28:04Z - 2052-5.5.1.7991 - 29D84B9F4F9152F50D5CBE647D58FE28_43 - + xmlns:wpsCustomData="http://www.wps.cn/officeDocument/2013/wpsCustomData"> diff --git a/pmapi/src/main/resources/template/meeting/劳务费发放.ftl b/pmapi/src/main/resources/template/meeting/劳务费发放.ftl new file mode 100644 index 0000000..a02e8e5 --- /dev/null +++ b/pmapi/src/main/resources/template/meeting/劳务费发放.ftl @@ -0,0 +1,2657 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 劳务费发放审批单 + + + + + + + + + + + + + + + + + + + + + + 制表单位(盖章): + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 劳务活动项目 + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${projectName} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 活动时间 + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${meetingTime} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 劳务费类别 + + + + + + + + + + + + + + + + + + + + + + + + + + + + □讲课费□稿费□考务(监考费) + + + + + + + + + + + + + + + + + + □评审费□其他项目 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 发放标准 + + + + + + + + + + + + + + + + + + + + + + + + + + + + 500元/人 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 有关情况说明 + + + + + + + + + + + + + + + + + + + + + + + + + + + + 通过市信息化专家库系统抽取 + + + + + + + + + ${expertCount} + + + + + + + + + 名专家。 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 发放清单 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 姓名 + + + + + + + + + + + + + + + + + + + + + + + + + + + 工作单位 + + + + + + + + + + + + + + + + + + + + + + + + + + + 职务(职称) + + + + + + + + + + + + + + + + + + + + + + + + + + + 标准 + + + + + + + + + + + + + + + + + + + + + + + + + + + + 发放金额 + + + + + + + + + + + + + + + + + + + + (元) + + + + + + + + + + + + + + + + + + + + + + + + + + + 签字 + + + + + <#list experts as expert> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ${expert.name} + + + + + + + + + + + + + + + + + + + + + + + + + + + ${expert.company} + + + + + + + + + + + + + + + + + + + + + + + + + + + ${(expert.job)!} + + + + + + + + + + + + + + + + + + + + + + + + + + + ${meetingUsageTime} + + + + + + + + + + + + + + + + + + + + + + + + + + + 500 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 发放单位审批意见 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 业务部门意见 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 分管领导意见 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 单位负责人 + + + + + + + + + + + + + + + + + + + + (财务审批人)意见 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 经办人意见 + + + + + + + + + + + + + + + + + + + + + + + + + + + 部门负责人意见 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (签字) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + (签字): + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 分管领导(签字): + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 负责人(财务审批人) + + + + + + + + + + + + + + + + + + + + (签字): + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pmapi/src/main/resources/template/劳务费发放.ftl b/pmapi/src/main/resources/template/劳务费发放.ftl deleted file mode 100644 index af6bcc0..0000000 --- a/pmapi/src/main/resources/template/劳务费发放.ftl +++ /dev/null @@ -1,885 +0,0 @@ - - -pdfbuilderKingsoft-PDF潦草迷茫2023-07-25T01:28:00Z2023-07-24T20:57:44Z864014 - wqlLaW5nc29mdCBQREYgdG8gV1BTIDg1 - 2023-07-24T17:28:23Z - 64be4428423552001fc57fc5 - 2052-5.5.1.7991 - FAEC9044C61332E24875BE64CD024754_43 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 劳务费发放审批单 - - - - 制表单位(盖章): - - - - - - - - - - - - - - - - - - - - - - - - - - 劳务活动项目 - - - - - - ${projectName} - - - - - - - - - - - 活动时间 - - - - - - ${meetingTime} - - - - - - - - - - - 劳务费类别 - - - - - - □讲课费□稿费□考务(监考费) - - - - □评审费□其他项目 - - - - - - - - - - - 发放标准 - - - - - - 500元/人 - - - - - - - - - - - 有关情况说明 - - - - - - 通过市信息化专家库系统抽取 - - ${expertCount} - - 名专家。 - - - - - - - - - - - 发放清单 - - - - - - - - - - - 姓名 - - - - - - 工作单位 - - - - - - 职务(职称) - - - - - - 标准 - - - - - - 发放金额 - - - - - (元) - - - - - - 签字 - <#list experts as expert> - - - - - - - - - - - ${expert.name} - - - - - - ${expert.company} - - - - - - ${(expert.job)!} - - - - - - ${meetingUsageTime} - - - - - - 500 - - - - - - - - - - - - - - - - 发放单位审批意见 - - - - - - - - - - - 业务部门意见 - - - - - - - - 分管领导意见 - - - - - - 单位负责人 - - - - - (财务审批人)意见 - - - - - - - - - - - 经办人意见 - - - - - - 部门负责人意见 - - - - - - - - - - - - - - - - - - - - - - - (签字) - - - - - - - - - - - - - - - - - - - - - - - - - - - (签字): - - - - - - - - - - - - - - - - - - - - - - - - - - - 分管领导(签字): - - - - - - - - - - - - - - - - - - - - - - - - - 负责人(财务审批人) - - - - - (签字): - - - - - - - - - - - - - - - \ No newline at end of file