|
|
|
@ -234,10 +234,10 @@ public class ProjectValueUtil<T> {
|
|
|
|
|
* @param is 输入流
|
|
|
|
|
* @return 转换后集合
|
|
|
|
|
*/
|
|
|
|
|
public List<T> importExcel(InputStream is,String projectClassify,String projectYear) {
|
|
|
|
|
public List<T> importExcel(InputStream is,String projectClassify) {
|
|
|
|
|
List<T> list = null;
|
|
|
|
|
try {
|
|
|
|
|
list = importExcel(is, 0,projectClassify,projectYear);
|
|
|
|
|
list = importExcel(is, 0,projectClassify);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
log.error("导入Excel异常{}", e.getMessage());
|
|
|
|
|
throw new UtilException(e.getMessage());
|
|
|
|
@ -254,8 +254,8 @@ public class ProjectValueUtil<T> {
|
|
|
|
|
* @param titleNum 标题占用行数
|
|
|
|
|
* @return 转换后集合
|
|
|
|
|
*/
|
|
|
|
|
public List<T> importExcel(InputStream is, int titleNum,String projectClassify,String projectYear) throws Exception {
|
|
|
|
|
return importExcel(StringUtils.EMPTY, is, titleNum,projectClassify,projectYear);
|
|
|
|
|
public List<T> importExcel(InputStream is, int titleNum,String projectClassify) throws Exception {
|
|
|
|
|
return importExcel(StringUtils.EMPTY, is, titleNum,projectClassify);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
@ -266,7 +266,7 @@ public class ProjectValueUtil<T> {
|
|
|
|
|
* @param is 输入流
|
|
|
|
|
* @return 转换后集合
|
|
|
|
|
*/
|
|
|
|
|
public List<T> importExcel(String sheetName, InputStream is, int titleNum,String projectClassify,String projectYear) throws Exception {
|
|
|
|
|
public List<T> importExcel(String sheetName, InputStream is, int titleNum,String projectClassify) throws Exception {
|
|
|
|
|
this.type = Type.IMPORT;
|
|
|
|
|
this.wb = WorkbookFactory.create(is);
|
|
|
|
|
List<T> list = new ArrayList<T>();
|
|
|
|
@ -383,7 +383,6 @@ public class ProjectValueUtil<T> {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
ReflectUtils.invokeSetter(entity, "projectClassify", projectClassify);
|
|
|
|
|
ReflectUtils.invokeSetter(entity, "projectYear", projectYear);
|
|
|
|
|
ReflectUtils.invokeSetter(entity, "status", 5);
|
|
|
|
|
cellMap.entrySet().removeIf(entry -> hasStr.contains(entry.getKey()));
|
|
|
|
|
StringBuilder str = new StringBuilder();
|
|
|
|
|