|
@@ -232,7 +232,15 @@ public class ExcelUtil {
|
|
|
ArchiveInputStream ais = new ArchiveStreamFactory().createArchiveInputStream(fis);
|
|
|
ArchiveEntry entry;
|
|
|
while ((entry = ais.getNextEntry()) != null) {
|
|
|
- File entryFile = new File(destFilePath, entry.getName());
|
|
|
+ String uuid = UUID.randomUUID().toString().replaceAll("-","");
|
|
|
+ String entryName = entry.getName();
|
|
|
+ String fileName = null;
|
|
|
+ if(entryName.contains(".")){
|
|
|
+ fileName = uuid + entryName.substring(entryName.lastIndexOf("."),entryName.length());
|
|
|
+ }else{
|
|
|
+ fileName = uuid;
|
|
|
+ }
|
|
|
+ File entryFile = new File(destFilePath, fileName);
|
|
|
if (entry.isDirectory()) {
|
|
|
entryFile.mkdirs();
|
|
|
logger.info("解压子文件:{}",entryFile.getName());
|
|
@@ -243,14 +251,14 @@ public class ExcelUtil {
|
|
|
filePathList.add(entryFile.getPath());
|
|
|
logger.info("解压子文件:{}",entryFile.getPath());
|
|
|
}catch (Exception e){
|
|
|
- logger.error(e.getMessage());
|
|
|
+ logger.error(e.getMessage(),e);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}catch (Exception e) {
|
|
|
logger.error(zipFilePath+"======="+e.getMessage(),e);
|
|
|
}
|
|
|
- logger.info("开始结束================");
|
|
|
+ logger.info("解压结束================");
|
|
|
return filePathList;
|
|
|
}
|
|
|
|