From c70f183041908b6b02af504bb1dc96d8d6c00f16 Mon Sep 17 00:00:00 2001 From: zhn <947514737@qq.com> Date: Fri, 26 Aug 2022 18:03:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9C=88=E6=8A=A5=E6=95=B4=E5=90=88=E5=AF=BC?= =?UTF-8?q?=E5=87=BA--word=E4=B8=AD=E5=AF=BC=E5=87=BA=E8=A1=A8=E6=A0=BC?= =?UTF-8?q?=E9=94=99=E4=B9=B1=E9=97=AE=E9=A2=98(=E6=B3=95=E8=A7=84?= =?UTF-8?q?=E8=81=94=E7=B3=BB=E4=BA=BA=E5=9B=9B=E4=B8=AA=E6=8D=A2=E8=A1=8C?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LawsMonthlyReportWriteEOServiceImpl.java | 33 ++++++++++++------- .../jero/modules/report/util/WordUtil.java | 29 +++++++++++++--- jero-boot/pom.xml | 10 ++++++ 3 files changed, 57 insertions(+), 15 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/LawsMonthlyReportWriteEOServiceImpl.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/LawsMonthlyReportWriteEOServiceImpl.java index 64d918af5..39efd8f13 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/LawsMonthlyReportWriteEOServiceImpl.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/report/service/impl/LawsMonthlyReportWriteEOServiceImpl.java @@ -647,8 +647,10 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl新征求意见清单模板, 新发布标准清单模板 @@ -766,12 +774,14 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl issueList = lawsMonthlyReportWriteEOList.stream().filter(e -> ContentTemplateEnum.NEW_RELEASE_STANDARD_MANIFEST_TEMPLATE.getValue().equals(e.getContentTemplate())).collect(Collectors.toList()); for (LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO : askList) { WordUtil.exportWordExcelAsk(document,lawsMonthlyReportWriteEO,cut); - WordUtil.exportWord(document, null, null, null, 0, 0, false, true, null); + WordUtil.exportWord(document, null, null, null, + 0, 0, false, true, null,null); } for (LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO : issueList) { WordUtil.exportWordExcelIssue(document,lawsMonthlyReportWriteEO,cut); - WordUtil.exportWord(document, null, null, null, 0, 0, false, true, null); + WordUtil.exportWord(document, null, null, null, 0, 0, + false, true, null,null); } for (LawsMonthlyReportWriteEO lawsMonthlyReportWriteEO : lawsMonthlyReportWriteEOList) { @@ -783,7 +793,8 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl lawsContactList = Arrays.asList(lawsContact.split(",")); + if (lawsContactList.size() > 4) { + StringBuilder str = new StringBuilder(); + int count = 0; + for (String s : lawsContactList) { + str.append(s + ","); + count++; + if (count % 4 == 0) { + str.append("\n"); + } + } + if(str.toString().endsWith("\n")){ + lawsContact = str.substring(0,str.length()-2); + }else{ + lawsContact = str.substring(0,str.length()-1); + } + } + String link = lawsMonthlyReportWriteEO.getLink();//链接 String technologyTerritoryName = ""; if(org.apache.commons.lang3.StringUtils.isNotBlank(technologyTerritory)){ diff --git a/jero-boot/pom.xml b/jero-boot/pom.xml index 6bee178cc..4b22d505b 100644 --- a/jero-boot/pom.xml +++ b/jero-boot/pom.xml @@ -91,6 +91,11 @@ true + + com.e-iceblue + e-iceblue + https://repo.e-iceblue.cn/repository/maven-public/ + @@ -110,6 +115,11 @@ fastjson ${fastjson.version} + + e-iceblue + spire.office.free + 5.3.1 +