fix: 标准带文件导入文件名校验错误
This commit is contained in:
+3
-3
@@ -1624,21 +1624,21 @@ public class LawsCommonServiceImpl implements ILawsCommonService {
|
||||
String excelName = excelfilelist.get(0).getName();
|
||||
if (tableName.equals(TableNameEnum.ENTERPRISE_STANDARDS.getTableName())) {
|
||||
// 检查Excel的文件名
|
||||
if (!excelName.equals("企业标准导入模板.xlsx")) {
|
||||
if (!excelName.equals("企业标准导入模板.xls")) {
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.IMPORT_TEMPLATE_ERROR));
|
||||
}
|
||||
}
|
||||
if (tableName.equals(TableNameEnum.DOMESTIC_REGULATIONS.getTableName())) {
|
||||
// 检查Excel的文件名
|
||||
if (!excelName.equals("国内标准导入模板.xlsx")) {
|
||||
if (!excelName.equals("国内标准导入模板.xls")) {
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.IMPORT_TEMPLATE_ERROR));
|
||||
}
|
||||
}
|
||||
if (tableName.equals(TableNameEnum.FOREIGN_REGULATIONS.getTableName())) {
|
||||
// 检查Excel的文件名
|
||||
if (!excelName.equals("海外标准导入模板.xlsx")) {
|
||||
if (!excelName.equals("海外标准导入模板.xls")) {
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
throw new JeroBootException(MessageUtils.getMessage(ResultCommon.IMPORT_TEMPLATE_ERROR));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user