Browse Source

修复double 给了默认值的问题

4.1.3.A
jueyue 7 years ago
parent
commit
6be2c07ba3
3 changed files with 18 additions and 3 deletions
  1. +12
    -0
      easypoi-annotation/src/main/java/cn/afterturn/easypoi/excel/annotation/ExcelEntity.java
  2. +0
    -2
      easypoi-base/src/main/java/cn/afterturn/easypoi/excel/export/base/ExcelExportBase.java
  3. +6
    -1
      easypoi-base/src/main/java/cn/afterturn/easypoi/handler/inter/IExcelExportServer.java

+ 12
- 0
easypoi-annotation/src/main/java/cn/afterturn/easypoi/excel/annotation/ExcelEntity.java View File

@@ -40,4 +40,16 @@ public @interface ExcelEntity {
*/ */
public String name() default ""; public String name() default "";
/**
* 如果现实则这个Excel的表头会变成两行,同时改Excel内部数据不参与总排序,排序用下面这个来代替,内部再排序
* @return
*/
public boolean show() default false;
/**
* 展示到第几个同样可以使用a_id,b_id
*
*/
public String orderNum() default "0";
} }

+ 0
- 2
easypoi-base/src/main/java/cn/afterturn/easypoi/excel/export/base/ExcelExportBase.java View File

@@ -298,8 +298,6 @@ public abstract class ExcelExportBase extends ExportBase {
Cell cell = row.createCell(index); Cell cell = row.createCell(index);
if (text != null && text.length() > 0) { if (text != null && text.length() > 0) {
cell.setCellValue(Double.parseDouble(text)); cell.setCellValue(Double.parseDouble(text));
} else {
cell.setCellValue(-1);
} }
cell.setCellType(Cell.CELL_TYPE_NUMERIC); cell.setCellType(Cell.CELL_TYPE_NUMERIC);
if (style != null) { if (style != null) {


+ 6
- 1
easypoi-base/src/main/java/cn/afterturn/easypoi/handler/inter/IExcelExportServer.java View File

@@ -8,7 +8,12 @@ import java.util.List;
* 2016年9月8日 * 2016年9月8日
*/ */
public interface IExcelExportServer { public interface IExcelExportServer {
/**
* 查询数据接口
* @param obj 查询条件
* @param page 当前页数
* @return
*/
public List<Object> selectListForExcelExport(Object obj, int page); public List<Object> selectListForExcelExport(Object obj, int page);
} }

Loading…
Cancel
Save