|
@@ -261,6 +261,14 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
|
if(addConceptInfoVO.getLineNum()!=null){
|
|
|
lineNumStr = "第"+addConceptInfoVO.getLineNum()+"行";
|
|
|
}
|
|
|
+
|
|
|
+ String regEx="[0-9]+|[`~·!@#$%^&*()+=|{}':;',\\[\\].<>/?~!@#¥%……&*()——+|{}【】‘;:”“’。,、?]+";
|
|
|
+ for(AddConceptInfoDetailVO i : addConceptInfoVO.getDetailList()){
|
|
|
+ if(i.getName().matches(regEx)){
|
|
|
+ throw new CommonException(CommonErrorCode.RPC_ERROR,lineNumStr+"无法输入纯数字或者纯字符,请输入正确数据!");
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if(addConceptInfoVO.getDetailList().stream().distinct().count()!=addConceptInfoVO.getDetailList().size()){
|
|
|
throw new CommonException(CommonErrorCode.RPC_ERROR,lineNumStr+"存在重复数据!");
|
|
|
}
|
|
@@ -455,7 +463,7 @@ public class ConceptFacade extends ConceptServiceImpl {
|
|
|
addConceptInfoVO.setName(libName);
|
|
|
addConceptInfoVO.setType(libType);
|
|
|
List<AddConceptInfoDetailVO> detailList = new ArrayList<>();
|
|
|
- for(String nm:otherNames.split(",")){
|
|
|
+ for(String nm:otherNames.split(",")){
|
|
|
if(StringUtil.isBlank(nm)){
|
|
|
continue;
|
|
|
}
|