fix(条款导入): 增加名称clauseImport校验
This commit is contained in:
+3
-3
@@ -1840,13 +1840,13 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
// 校验名称
|
||||
File file1 = excelfilelist.get(0);
|
||||
String name = file1.getName().substring(0, file1.getName().lastIndexOf("."));
|
||||
if(!"条款导入模板".equals(name)){
|
||||
if(!"条款导入模板".equals(name) || !"clauseImport".equals(name)){
|
||||
//删除原上传文件
|
||||
FileUnZip.deleteDir(saveDirectory);
|
||||
if(MessageUtils.getLanguage().getValue().equals(LanguageEnum.CN.getValue())){
|
||||
resultMsg = "excel名称不正确,应为:条款导入模板";
|
||||
resultMsg = "excel名称不正确,应为:条款导入模板 或 clauseImport";
|
||||
}else{
|
||||
resultMsg = "excel name is incorrect, should be: 条款导入模板";
|
||||
resultMsg = "excel name is incorrect, should be: 条款导入模板 or clauseImport";
|
||||
}
|
||||
return Result.error(1, resultMsg);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user