From c96ec033f7731b2548d727fe916f173762ef3b7c Mon Sep 17 00:00:00 2001 From: jueyue Date: Fri, 1 Jun 2018 14:52:03 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=88=B03.2.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 6 ++--- easypoi-annotation/pom.xml | 2 +- easypoi-base/pom.xml | 2 +- .../template/ExcelExportOfTemplateUtil.java | 26 +++++++++---------- easypoi-web/pom.xml | 2 +- history.md | 5 ++++ pom.xml | 4 +-- 7 files changed, 26 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index c355090..53bcbe3 100644 --- a/README.md +++ b/README.md @@ -85,17 +85,17 @@ https://oss.sonatype.org/content/groups/public/ cn.afterturn easypoi-base - 3.1.0 + 3.2.0 cn.afterturn easypoi-web - 3.1.0 + 3.2.0 cn.afterturn easypoi-annotation - 3.1.0 + 3.2.0 ``` diff --git a/easypoi-annotation/pom.xml b/easypoi-annotation/pom.xml index 8ed33fe..8952e04 100644 --- a/easypoi-annotation/pom.xml +++ b/easypoi-annotation/pom.xml @@ -4,7 +4,7 @@ cn.afterturn easypoi - 3.1.1-SNAPSHOT + 3.2.0 easypoi-annotation 基础注解类,解耦合 diff --git a/easypoi-base/pom.xml b/easypoi-base/pom.xml index c468ce1..a5f9718 100644 --- a/easypoi-base/pom.xml +++ b/easypoi-base/pom.xml @@ -4,7 +4,7 @@ cn.afterturn easypoi - 3.1.1-SNAPSHOT + 3.2.0 easypoi-base diff --git a/easypoi-base/src/main/java/cn/afterturn/easypoi/excel/export/template/ExcelExportOfTemplateUtil.java b/easypoi-base/src/main/java/cn/afterturn/easypoi/excel/export/template/ExcelExportOfTemplateUtil.java index 17168bf..15c0a87 100644 --- a/easypoi-base/src/main/java/cn/afterturn/easypoi/excel/export/template/ExcelExportOfTemplateUtil.java +++ b/easypoi-base/src/main/java/cn/afterturn/easypoi/excel/export/template/ExcelExportOfTemplateUtil.java @@ -589,7 +589,7 @@ public final class ExcelExportOfTemplateUtil extends BaseExportService { templateSumHandler.addValueOfKey(params.getName(), val); } //如果合并单元格,就把这个单元格的样式和之前的保持一致 - setMergedRegionStyle(row, ci, columns.get(i)); + setMergedRegionStyle(row, ci, params); //合并对应单元格 if ((params.getRowspan() != 1 || params.getColspan() != 1) && !mergedRegionHelper.isMergedRegion(row.getRowNum() + 1, ci)) { @@ -663,19 +663,19 @@ public final class ExcelExportOfTemplateUtil extends BaseExportService { } String cellStringString; try {//不允许为空 便利单元格必须有结尾和值 - cellStringString = cell.getStringCellValue(); - if (StringUtils.isBlank(cellStringString) && colspan + startIndex <= index) { - throw new ExcelExportException("for each 当中存在空字符串,请检查模板"); - } else if (StringUtils.isBlank(cellStringString) - && colspan + startIndex > index) { - //读取是判断,跳过,数据为空,但是不是第一次读这一列,所以可以跳过 - columns.add(new ExcelForEachParams(null, cell.getCellStyle(), (short) 0)); - continue; - } - } catch (Exception e) { - throw new ExcelExportException(ExcelExportEnum.TEMPLATE_ERROR, e); + cellStringString = cell.getStringCellValue(); + if (StringUtils.isBlank(cellStringString) && colspan + startIndex <= index) { + throw new ExcelExportException("for each 当中存在空字符串,请检查模板"); + } else if (StringUtils.isBlank(cellStringString) + && colspan + startIndex > index) { + //读取是判断,跳过,数据为空,但是不是第一次读这一列,所以可以跳过 + columns.add(new ExcelForEachParams(null, cell.getCellStyle(), (short) 0)); + continue; } - //把读取过的cell 置为空 + } catch (Exception e) { + throw new ExcelExportException(ExcelExportEnum.TEMPLATE_ERROR, e); + } + //把读取过的cell 置为空 cell.setCellValue(""); if (cellStringString.contains(END_STR)) { columns.add(getExcelTemplateParams(cellStringString.replace(END_STR, EMPTY), diff --git a/easypoi-web/pom.xml b/easypoi-web/pom.xml index 2d3f0be..c2f96a0 100644 --- a/easypoi-web/pom.xml +++ b/easypoi-web/pom.xml @@ -4,7 +4,7 @@ cn.afterturn easypoi - 3.1.1-SNAPSHOT + 3.2.0 easypoi-web diff --git a/history.md b/history.md index 5252c6a..210535f 100644 --- a/history.md +++ b/history.md @@ -2,6 +2,11 @@ -------------------------- 版本修改 -------------------------- + - 3.2.0 速度升级吧,上个版本这么坑 + - 修复坑爹bug + - 自定义枚举支持 + - 获取rownum + - 其他小问题 - 3.1.0 handler改名字非兼容!!!谨慎 - 修改Server改为service - 修改hanlder改为handler diff --git a/pom.xml b/pom.xml index a274ac7..f81599b 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 cn.afterturn easypoi - 3.1.1-SNAPSHOT + 3.2.0 pom easypoi @@ -45,7 +45,7 @@ - 3.1.1-SNAPSHOT + 3.2.0 3.15 2.9.1 16.0.1