@@ -1 +1 @@ | |||||
cmd /k mvn clean deploy -D skipTest | |||||
cmd /k mvn clean deploy -Dmaven.test.skip=true -Dgpg.passphrase=jeecg123456 |
@@ -4,7 +4,7 @@ | |||||
<parent> | <parent> | ||||
<groupId>org.jeecg</groupId> | <groupId>org.jeecg</groupId> | ||||
<artifactId>easypoi</artifactId> | <artifactId>easypoi</artifactId> | ||||
<version>2.1.2</version> | |||||
<version>2.1.3-SNAPSHOT</version> | |||||
</parent> | </parent> | ||||
<artifactId>easypoi-annotation</artifactId> | <artifactId>easypoi-annotation</artifactId> | ||||
<description>基础注解类,解耦合</description> | <description>基础注解类,解耦合</description> |
@@ -107,7 +107,7 @@ public @interface Excel { | |||||
public String savePath() default "upload"; | public String savePath() default "upload"; | ||||
/** | /** | ||||
* 导出类型 1 是文本 2 是图片,3是函数 默认是文本 ,4 String-Long型 | |||||
* 导出类型 1 是文本 2 是图片,3是函数 默认是文本 | |||||
*/ | */ | ||||
public int type() default 1; | public int type() default 1; | ||||
@@ -4,7 +4,7 @@ | |||||
<parent> | <parent> | ||||
<groupId>org.jeecg</groupId> | <groupId>org.jeecg</groupId> | ||||
<artifactId>easypoi</artifactId> | <artifactId>easypoi</artifactId> | ||||
<version>2.1.2</version> | |||||
<version>2.1.3-SNAPSHOT</version> | |||||
</parent> | </parent> | ||||
<artifactId>easypoi-base</artifactId> | <artifactId>easypoi-base</artifactId> | ||||
<dependencies> | <dependencies> | ||||
@@ -31,7 +31,7 @@ public class ExcelToHtmlServer { | |||||
private int firstColumn; | private int firstColumn; | ||||
private int endColumn; | private int endColumn; | ||||
private static final String COL_HEAD_CLASS = "colHeader"; | private static final String COL_HEAD_CLASS = "colHeader"; | ||||
private static final String ROW_HEAD_CLASS = "rowHeader"; | |||||
//private static final String ROW_HEAD_CLASS = "rowHeader"; | |||||
private static final String DEFAULTS_CLASS = "excelDefaults"; | private static final String DEFAULTS_CLASS = "excelDefaults"; | ||||
@@ -33,6 +33,7 @@ import org.jeecgframework.poi.excel.entity.sax.SaxReadCellEntity; | |||||
import org.jeecgframework.poi.exception.excel.ExcelImportException; | import org.jeecgframework.poi.exception.excel.ExcelImportException; | ||||
import org.jeecgframework.poi.exception.excel.enums.ExcelImportEnum; | import org.jeecgframework.poi.exception.excel.enums.ExcelImportEnum; | ||||
import org.jeecgframework.poi.handler.inter.IExcelDataHandler; | import org.jeecgframework.poi.handler.inter.IExcelDataHandler; | ||||
import org.jeecgframework.poi.util.PoiPublicUtil; | |||||
import org.slf4j.Logger; | import org.slf4j.Logger; | ||||
import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||
@@ -208,9 +209,9 @@ public class CellValueServer { | |||||
if (result instanceof String) { | if (result instanceof String) { | ||||
return result; | return result; | ||||
} | } | ||||
// 想要的结果是long | |||||
if (entity.getType() == 4 && result instanceof Double) { | |||||
result = String.valueOf(((Double) result).longValue()); | |||||
// double类型防止科学计数法 | |||||
if (result instanceof Double) { | |||||
return PoiPublicUtil.doubleToString((Double) result); | |||||
} | } | ||||
return String.valueOf(result); | return String.valueOf(result); | ||||
} | } | ||||
@@ -20,6 +20,7 @@ import java.io.ByteArrayOutputStream; | |||||
import java.io.File; | import java.io.File; | ||||
import java.lang.reflect.Field; | import java.lang.reflect.Field; | ||||
import java.lang.reflect.Method; | import java.lang.reflect.Method; | ||||
import java.math.BigDecimal; | |||||
import java.net.URISyntaxException; | import java.net.URISyntaxException; | ||||
import java.util.ArrayList; | import java.util.ArrayList; | ||||
import java.util.Collection; | import java.util.Collection; | ||||
@@ -460,4 +461,18 @@ public final class PoiPublicUtil { | |||||
object, paramsArr, ++index); | object, paramsArr, ++index); | ||||
} | } | ||||
/** | |||||
* double to String 防止科学计数法 | |||||
* @param value | |||||
* @return | |||||
*/ | |||||
public static String doubleToString(Double value) { | |||||
String temp = value.toString(); | |||||
if (temp.contains("E")) { | |||||
BigDecimal bigDecimal = new BigDecimal(temp); | |||||
temp = bigDecimal.toPlainString(); | |||||
} | |||||
return temp; | |||||
} | |||||
} | } |
@@ -4,7 +4,7 @@ | |||||
<parent> | <parent> | ||||
<groupId>org.jeecg</groupId> | <groupId>org.jeecg</groupId> | ||||
<artifactId>easypoi</artifactId> | <artifactId>easypoi</artifactId> | ||||
<version>2.1.2</version> | |||||
<version>2.1.3-SNAPSHOT</version> | |||||
</parent> | </parent> | ||||
<artifactId>easypoi-web</artifactId> | <artifactId>easypoi-web</artifactId> | ||||
<dependencies> | <dependencies> | ||||
@@ -3,7 +3,7 @@ | |||||
<modelVersion>4.0.0</modelVersion> | <modelVersion>4.0.0</modelVersion> | ||||
<groupId>org.jeecg</groupId> | <groupId>org.jeecg</groupId> | ||||
<artifactId>easypoi</artifactId> | <artifactId>easypoi</artifactId> | ||||
<version>2.1.2</version> | |||||
<version>2.1.3-SNAPSHOT</version> | |||||
<packaging>pom</packaging> | <packaging>pom</packaging> | ||||
<name>easypoi</name> | <name>easypoi</name> | ||||
<modules> | <modules> | ||||
@@ -38,7 +38,7 @@ | |||||
</developers> | </developers> | ||||
<properties> | <properties> | ||||
<sub.version>2.1.2</sub.version> | |||||
<sub.version>2.1.3-SNAPSHOT</sub.version> | |||||
<poi.version>3.9</poi.version> | <poi.version>3.9</poi.version> | ||||
<xerces.version>2.9.1</xerces.version> | <xerces.version>2.9.1</xerces.version> | ||||
<guava.version>16.0.1</guava.version> | <guava.version>16.0.1</guava.version> | ||||