From ca78226faa90b4676760b6fa4a190ed9ed7ebb43 Mon Sep 17 00:00:00 2001 From: liyawei Date: Mon, 15 Aug 2022 14:47:44 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E8=AE=A4=E8=AF=81-=E4=B8=8A=E6=8A=A5?= =?UTF-8?q?=E5=BA=93-=E6=9F=A5=E7=9C=8B-=E8=87=AA=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E5=AF=BC=E5=87=BA-bug57881-=E8=A7=A3=E5=86=B3sheetName?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/jero/modules/project/util/ExcelUtil.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/util/ExcelUtil.java b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/util/ExcelUtil.java index efca534c0..2d95445af 100644 --- a/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/util/ExcelUtil.java +++ b/jero-boot/jero-boot-modules/src/main/java/com/jero/modules/project/util/ExcelUtil.java @@ -5,6 +5,7 @@ import cn.hutool.core.util.ObjectUtil; import lombok.extern.slf4j.Slf4j; import org.apache.commons.io.FileUtils; import org.apache.commons.io.IOUtils; +import org.apache.commons.lang.StringUtils; import org.apache.poi.ss.usermodel.Row; import org.apache.poi.ss.usermodel.Sheet; import org.apache.poi.ss.usermodel.Workbook; @@ -120,7 +121,8 @@ public class ExcelUtil { int partNameNum = 0; for (int i = 0; i < workbook.getNumberOfSheets(); i++) {//获取每个Sheet表 sheet = workbook.getSheetAt(i); - WorksheetPart worksheetPart = (WorksheetPart) pkg.getParts().get(new PartName("/xl/worksheets/" + sheet.getSheetName().toLowerCase() + ".xml")); + String sheetName = "sheet" + (i+1); // xml下的表格名称 不是sheet页签名称 + WorksheetPart worksheetPart = (WorksheetPart) pkg.getParts().get(new PartName("/xl/worksheets/" + sheetName + ".xml")); partNameNum++; //获得数据的总行数 @@ -153,7 +155,7 @@ public class ExcelUtil { String key = (String) imgMap.get("key"); String text = (String) imgMap.get("text"); byte[] bytes = (byte[]) imgMap.get("bytes"); - if (("${" + key + "}").equals(cellValue)) { + if (StringUtils.isNotEmpty(cellValue) && cellValue.contains("${" + key + "}")) { // 根据图片大小调整行高 ByteArrayInputStream in = new ByteArrayInputStream(bytes); @@ -165,7 +167,7 @@ public class ExcelUtil { } // 插入图片到表格 - putImagePOI(worksheetPart, pkg, cell, bytes, sheet.getSheetName().toLowerCase(), String.valueOf(partNameNum)); + putImagePOI(worksheetPart, pkg, cell, bytes, sheetName, String.valueOf(partNameNum)); } } j++; // 单元格非空才++ From 4462182c801d5c047c81b633963cdfd20e0a0bc4 Mon Sep 17 00:00:00 2001 From: zhn <947514737@qq.com> Date: Mon, 15 Aug 2022 15:22:02 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=B3=95=E8=A7=84=E6=9C=88=E6=8A=A5?= =?UTF-8?q?=E7=BC=96=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/LawsMonthlyReportWriteEOServiceImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) 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 3236082de..ff53dad1a 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 @@ -140,6 +140,9 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl newOpinionTemplateEOList = lawsMonthlyReportWriteEO.getNewOpinionTemplateEOList(); + for (NewOpinionTemplateEO newOpinionTemplateEO : newOpinionTemplateEOList) { + newOpinionTemplateEO.setLawsMonthlyReportWriteId(lawsMonthlyReportWriteEO.getId()); + } iNewOpinionTemplateEOService.saveBatch(newOpinionTemplateEOList); }else if (ContentTemplateEnum.NEW_RELEASE_STANDARD_MANIFEST_TEMPLATE.getValue().equals(lawsMonthlyReportWriteEO.getContentTemplate())){ @@ -150,6 +153,9 @@ public class LawsMonthlyReportWriteEOServiceImpl extends ServiceImpl newStandardTemplateEOList = lawsMonthlyReportWriteEO.getNewStandardTemplateEOList(); + for (NewStandardTemplateEO newStandardTemplateEO : newStandardTemplateEOList) { + newStandardTemplateEO.setLawsMonthlyReportWriteId(lawsMonthlyReportWriteEO.getId()); + } iNewStandardTemplateEOService.saveBatch(newStandardTemplateEOList); } From 7b9bde82b2e4529c9b4e244913ce6f57c18b1b75 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Mon, 15 Aug 2022 15:32:42 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A6=85=E9=81=93?= =?UTF-8?q?=E5=B7=B2=E7=9F=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../regulationReport/components/RegulationMonthlyFill.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jero-web/src/views/businessSupport/regulationReport/components/RegulationMonthlyFill.vue b/jero-web/src/views/businessSupport/regulationReport/components/RegulationMonthlyFill.vue index 07f45bb72..16c344de0 100644 --- a/jero-web/src/views/businessSupport/regulationReport/components/RegulationMonthlyFill.vue +++ b/jero-web/src/views/businessSupport/regulationReport/components/RegulationMonthlyFill.vue @@ -131,7 +131,7 @@ align: 'center', width: 170, ellipsis: true, - dataIndex: 'lawsContact' + dataIndex: 'lawsContactName' }, { title: this.$t('completedBy'),