fix(条款导入): 增加名称clauseImport校验

This commit is contained in:
yjz
2024-08-19 09:26:01 +08:00
parent bd8f7438c0
commit 41eca60c5e
@@ -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);
}