Compare commits

...

2 Commits

Author SHA1 Message Date
wangliwen 64b44da859 导入表头升序处理 2022-06-16 15:53:19 +08:00
wangliwen e034129167 ... 2022-06-16 15:47:28 +08:00
2 changed files with 3 additions and 3 deletions

View File

@ -214,7 +214,7 @@ public class ResourceController {
logger.info("上传文件:" + uploadFile.getOriginalFilename()); logger.info("上传文件:" + uploadFile.getOriginalFilename());
String format = sdf.format(new Date()); String format = sdf.format(new Date());
File folder = new File(uploadPath + "upload" + File.separator + format); File folder = new File(uploadPath + "upload" + File.separator + format);
logger.info(uploadPath + format); logger.info(folder.getPath());
if (!folder.isDirectory()) { if (!folder.isDirectory()) {
folder.mkdirs(); folder.mkdirs();
} }

View File

@ -320,7 +320,7 @@ public class ResourceExcelImportListener extends AnalysisEventListener<Map<Integ
infoList.add(attrEntity); infoList.add(attrEntity);
this.headMap.keySet().stream().skip(6).forEach(key -> { // 表头后6个 this.headMap.keySet().stream().sorted().skip(6).forEach(key -> { // 表头后6个
AttrEntity attrEntity_ = new AttrEntity(); AttrEntity attrEntity_ = new AttrEntity();
attrEntity_.setAttrType(this.headMap.get(key)); attrEntity_.setAttrType(this.headMap.get(key));
attrEntity_.setAttrValue(date.get(key)); attrEntity_.setAttrValue(date.get(key));
@ -332,7 +332,7 @@ public class ResourceExcelImportListener extends AnalysisEventListener<Map<Integ
resourceDTO.setType("基础设施"); resourceDTO.setType("基础设施");
resourceDTO.setName(date.get(0)); resourceDTO.setName(date.get(0));
this.headMap.keySet().stream().skip(1).forEach(key -> { // 表头后1个 this.headMap.keySet().stream().sorted().skip(1).forEach(key -> { // 表头后1个
AttrEntity attrEntity_ = new AttrEntity(); AttrEntity attrEntity_ = new AttrEntity();
attrEntity_.setAttrType(this.headMap.get(key)); attrEntity_.setAttrType(this.headMap.get(key));
attrEntity_.setAttrValue(date.get(key)); attrEntity_.setAttrValue(date.get(key));