From 6be2c07ba35ce0ef35c82f0c66803ee1ecede53e Mon Sep 17 00:00:00 2001 From: jueyue Date: Fri, 15 Sep 2017 09:10:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Ddouble=20=E7=BB=99=E4=BA=86?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E5=80=BC=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../easypoi/excel/annotation/ExcelEntity.java | 12 ++++++++++++ .../easypoi/excel/export/base/ExcelExportBase.java | 2 -- .../easypoi/handler/inter/IExcelExportServer.java | 7 ++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/easypoi-annotation/src/main/java/cn/afterturn/easypoi/excel/annotation/ExcelEntity.java b/easypoi-annotation/src/main/java/cn/afterturn/easypoi/excel/annotation/ExcelEntity.java index d28d5fa..03dddfa 100644 --- a/easypoi-annotation/src/main/java/cn/afterturn/easypoi/excel/annotation/ExcelEntity.java +++ b/easypoi-annotation/src/main/java/cn/afterturn/easypoi/excel/annotation/ExcelEntity.java @@ -40,4 +40,16 @@ public @interface ExcelEntity { */ public String name() default ""; + /** + * 如果现实则这个Excel的表头会变成两行,同时改Excel内部数据不参与总排序,排序用下面这个来代替,内部再排序 + * @return + */ + public boolean show() default false; + + /** + * 展示到第几个同样可以使用a_id,b_id + * + */ + public String orderNum() default "0"; + } diff --git a/easypoi-base/src/main/java/cn/afterturn/easypoi/excel/export/base/ExcelExportBase.java b/easypoi-base/src/main/java/cn/afterturn/easypoi/excel/export/base/ExcelExportBase.java index eccb19a..4a2e300 100644 --- a/easypoi-base/src/main/java/cn/afterturn/easypoi/excel/export/base/ExcelExportBase.java +++ b/easypoi-base/src/main/java/cn/afterturn/easypoi/excel/export/base/ExcelExportBase.java @@ -298,8 +298,6 @@ public abstract class ExcelExportBase extends ExportBase { Cell cell = row.createCell(index); if (text != null && text.length() > 0) { cell.setCellValue(Double.parseDouble(text)); - } else { - cell.setCellValue(-1); } cell.setCellType(Cell.CELL_TYPE_NUMERIC); if (style != null) { diff --git a/easypoi-base/src/main/java/cn/afterturn/easypoi/handler/inter/IExcelExportServer.java b/easypoi-base/src/main/java/cn/afterturn/easypoi/handler/inter/IExcelExportServer.java index 4d72b49..acfd5b4 100644 --- a/easypoi-base/src/main/java/cn/afterturn/easypoi/handler/inter/IExcelExportServer.java +++ b/easypoi-base/src/main/java/cn/afterturn/easypoi/handler/inter/IExcelExportServer.java @@ -8,7 +8,12 @@ import java.util.List; * 2016年9月8日 */ public interface IExcelExportServer { - + /** + * 查询数据接口 + * @param obj 查询条件 + * @param page 当前页数 + * @return + */ public List selectListForExcelExport(Object obj, int page); }