fix: 87510 企业标准-导入-压缩包内多个Excel,提示信息需修改
This commit is contained in:
+2
-2
@@ -1656,13 +1656,13 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.IMPORT_TEMPLATE_ERROR));
|
||||
} else if (fileList.size() > 1) {
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.IMPORT_TEMPLATE_ERROR));
|
||||
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.ZIP_ROOT_ONE_EXCEL));
|
||||
}
|
||||
List<File> excelfilelist = FileUnZip.readImpExcelFile(saveDirectory.getPath());
|
||||
System.gc();
|
||||
if (excelfilelist.size() != 1) {
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.IMPORT_TEMPLATE_ERROR));
|
||||
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.ZIP_ROOT_ONE_EXCEL));
|
||||
}
|
||||
String excelName = excelfilelist.get(0).getName();
|
||||
String moduleCode = "";
|
||||
|
||||
@@ -291,8 +291,8 @@ public class FileUnZip {
|
||||
for (File fi : files) {
|
||||
// 对文件进行过滤,只读取Excel文件
|
||||
String name = fi.getName();
|
||||
// "导入模板".equals(fi.getName()) || "导入模板.xlsx".equals(fi.getName())
|
||||
if (name != null &&( fi.getName().contains(".xls") || fi.getName().contains(".xlsx") )){
|
||||
if (fi.getName().contains(".xls") || fi.getName().contains(".xlsx")
|
||||
|| fi.getName().contains(".xlsm")){
|
||||
resultlist.add(fi);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user