update 升级autopoi版本到1.4.7
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
<repository>
|
||||
<id>aliyun</id>
|
||||
<name>aliyun Repository</name>
|
||||
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
|
||||
<url>https://maven.aliyun.com/repository/public</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
@@ -22,7 +22,7 @@
|
||||
<repository>
|
||||
<id>jeecg</id>
|
||||
<name>jeecg Repository</name>
|
||||
<url>http://maven.jeecg.org/nexus/content/repositories/jeecg</url>
|
||||
<url>https://maven.jeecg.org/nexus/content/repositories/jeecg</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
|
||||
+32
-33
@@ -2,7 +2,6 @@ package com.jero.contract.service.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
@@ -40,7 +39,6 @@ import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.poi.ss.usermodel.*;
|
||||
import org.apache.poi.xssf.usermodel.XSSFCell;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@@ -1007,37 +1005,38 @@ public class PaySpendingContractServiceImpl extends ServiceImpl<PaySpendingContr
|
||||
DateFormat fmt = new SimpleDateFormat("yyyy-MM-dd");
|
||||
DecimalFormat df = new DecimalFormat("0.0000");
|
||||
String val = "";
|
||||
switch (cell.getCellType()) {
|
||||
case XSSFCell.CELL_TYPE_NUMERIC:
|
||||
if (DateUtil.isCellDateFormatted(cell)) {
|
||||
val = fmt.format(cell.getDateCellValue()); //日期型
|
||||
} else {
|
||||
val = df.format(cell.getNumericCellValue()); //数字型
|
||||
// 去掉多余的0,如最后一位是.则去掉
|
||||
val = val.replaceAll("0+?$", "").replaceAll("[.]$","");
|
||||
}
|
||||
break;
|
||||
case XSSFCell.CELL_TYPE_STRING: //文本类型
|
||||
val = cell.getStringCellValue();
|
||||
break;
|
||||
case XSSFCell.CELL_TYPE_BOOLEAN: //布尔型
|
||||
val = String.valueOf(cell.getBooleanCellValue());
|
||||
break;
|
||||
case XSSFCell.CELL_TYPE_BLANK: //空白
|
||||
val = cell.getStringCellValue();
|
||||
break;
|
||||
case XSSFCell.CELL_TYPE_ERROR: //错误
|
||||
val = "";
|
||||
break;
|
||||
case XSSFCell.CELL_TYPE_FORMULA: //公式
|
||||
try {
|
||||
val = String.valueOf(cell.getStringCellValue());
|
||||
} catch (IllegalStateException e) {
|
||||
val = String.valueOf(cell.getNumericCellValue());
|
||||
}
|
||||
break;
|
||||
default:
|
||||
val = cell.getRichStringCellValue() == null ? null : cell.getRichStringCellValue().toString();
|
||||
CellType cellType = cell.getCellType();
|
||||
if (cellType.equals(CellType.NUMERIC)) {
|
||||
if (DateUtil.isCellDateFormatted(cell)) {
|
||||
val = fmt.format(cell.getDateCellValue()); //日期型
|
||||
} else {
|
||||
val = df.format(cell.getNumericCellValue()); //数字型
|
||||
// 去掉多余的0,如最后一位是.则去掉
|
||||
val = val.replaceAll("0+?$", "").replaceAll("[.]$", "");
|
||||
}
|
||||
} else if (cellType.equals(CellType.STRING)) {
|
||||
//文本类型
|
||||
val = cell.getStringCellValue();
|
||||
|
||||
} else if (cellType.equals(CellType.BOOLEAN)) {
|
||||
//布尔型
|
||||
val = String.valueOf(cell.getBooleanCellValue());
|
||||
|
||||
} else if (cellType.equals(CellType.BLANK)) {
|
||||
//空白
|
||||
val = cell.getStringCellValue();
|
||||
} else if (cellType.equals(CellType.ERROR)) {
|
||||
//错误
|
||||
val = "";
|
||||
} else if (cellType.equals(CellType.FORMULA)) {
|
||||
//公式
|
||||
try {
|
||||
val = String.valueOf(cell.getStringCellValue());
|
||||
} catch (IllegalStateException e) {
|
||||
val = String.valueOf(cell.getNumericCellValue());
|
||||
}
|
||||
} else {
|
||||
val = cell.getRichStringCellValue() == null ? null : cell.getRichStringCellValue().toString();
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
+5
@@ -23,4 +23,9 @@ public class ImportFileServiceImpl implements ImportFileServiceI {
|
||||
public String doUpload(byte[] data) {
|
||||
return CommonUtils.uploadOnlineImage(data, upLoadPath, "import", uploadType);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String doUpload(byte[] data, String s) {
|
||||
return CommonUtils.uploadOnlineImage(data, upLoadPath, s, uploadType);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<shiro.version>1.7.1</shiro.version>
|
||||
<java-jwt.version>3.11.0</java-jwt.version>
|
||||
<shiro-redis.version>3.1.0</shiro-redis.version>
|
||||
<autopoi-web.version>1.2.5</autopoi-web.version>
|
||||
<autopoi-web.version>1.4.7</autopoi-web.version>
|
||||
<minio.version>8.0.3</minio.version>
|
||||
<justauth-spring-boot-starter.version>1.3.4</justauth-spring-boot-starter.version>
|
||||
<dom4j.version>1.6.1</dom4j.version>
|
||||
@@ -72,16 +72,16 @@
|
||||
<url>http://maven.hzwlsoft.com:4000/repository/maven-snapshots/</url>
|
||||
</snapshotRepository>
|
||||
</distributionManagement>
|
||||
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>aliyun</id>
|
||||
<name>aliyun Repository</name>
|
||||
<url>http://maven.aliyun.com/nexus/content/groups/public</url>
|
||||
<snapshots>
|
||||
<id>aliyun</id>
|
||||
<name>aliyun Repository</name>
|
||||
<url>https://maven.aliyun.com/repository/public</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>hzwl-maven</id>
|
||||
<name>hzwl-maven</name>
|
||||
@@ -93,6 +93,15 @@
|
||||
<enabled>true</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
|
||||
<repository>
|
||||
<id>jeecg</id>
|
||||
<name>jeecg Repository</name>
|
||||
<url>https://maven.jeecg.org/nexus/content/repositories/jeecg</url>
|
||||
<snapshots>
|
||||
<enabled>false</enabled>
|
||||
</snapshots>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
|
||||
Reference in New Issue
Block a user