修改拆分条款导入验证
This commit is contained in:
+19
-37
@@ -3177,7 +3177,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
}
|
||||
countError++;
|
||||
valueList = Collections.emptyList();
|
||||
break;
|
||||
continue;
|
||||
}else {
|
||||
valueList.add(first.get().getId());
|
||||
}
|
||||
@@ -3203,43 +3203,25 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
|
||||
String[] treePathList = value.split(",");
|
||||
for (String treePath : treePathList) {
|
||||
List<SysDictItem> sysDictItemList = getLevelPath(sysDictItemLists);
|
||||
List<SysDictItem> path =
|
||||
sysDictItemLists.stream().filter(o -> treePath.equals(o.getItemText()))
|
||||
sysDictItemList.stream().filter(o -> treePath.equals(o.getLevelPath()))
|
||||
.collect(Collectors.toList());
|
||||
if (!path.isEmpty()){
|
||||
// 如果有多个,按照全路径去匹配一遍
|
||||
if(path.size() > 1){
|
||||
List<SysDictItem> sysDictItemList = getLevelPath(sysDictItemLists);
|
||||
List<SysDictItem> pathOther =
|
||||
sysDictItemList.stream().filter(o -> treePath.equals(o.getLevelPath()))
|
||||
.collect(Collectors.toList());
|
||||
if(!pathOther.isEmpty()){
|
||||
if (path.size() > 1) {
|
||||
if(MessageUtils.getLanguage().getValue().equals(LanguageEnum.CN.getValue())) {
|
||||
errorMsg += fieldName + "中" + treePath + "存在多个;";
|
||||
countError++;
|
||||
valueList = Collections.emptyList();
|
||||
} else {
|
||||
errorMsg += fieldName + " " + treePath + "Exist in multiple;";
|
||||
}
|
||||
break;
|
||||
}
|
||||
valueList.add(pathOther.get(0).getItemValue());
|
||||
}else{
|
||||
if(MessageUtils.getLanguage().getValue().equals(LanguageEnum.CN.getValue())) {
|
||||
errorMsg += fieldName + "中" + treePath + "存在多个;";
|
||||
countError++;
|
||||
valueList = Collections.emptyList();
|
||||
} else {
|
||||
errorMsg += fieldName + " " + treePath + "Not exist;";
|
||||
}
|
||||
break;
|
||||
if(!path.isEmpty()){
|
||||
if (path.size() > 1) {
|
||||
if(MessageUtils.getLanguage().getValue().equals(LanguageEnum.CN.getValue())) {
|
||||
errorMsg += fieldName + "中" + treePath + "存在多个;";
|
||||
countError++;
|
||||
valueList = Collections.emptyList();
|
||||
} else {
|
||||
errorMsg += fieldName + " " + treePath + "Exist in multiple;";
|
||||
}
|
||||
continue;
|
||||
}
|
||||
}else {
|
||||
List<SysDictItem> sysDictItemList = getLevelPath(sysDictItemLists);
|
||||
valueList.add(path.get(0).getItemValue());
|
||||
}else{
|
||||
List<SysDictItem> pathOther =
|
||||
sysDictItemList.stream().filter(o -> treePath.equals(o.getLevelPath()))
|
||||
sysDictItemLists.stream().filter(o -> treePath.equals(o.getItemText()))
|
||||
.collect(Collectors.toList());
|
||||
if(!pathOther.isEmpty()){
|
||||
if (path.size() > 1) {
|
||||
@@ -3250,7 +3232,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
} else {
|
||||
errorMsg += fieldName + " " + treePath + "Exist in multiple;";
|
||||
}
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
valueList.add(pathOther.get(0).getItemValue());
|
||||
}else{
|
||||
@@ -3261,7 +3243,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
} else {
|
||||
errorMsg += fieldName + " " + treePath + "Not exist;";
|
||||
}
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3284,7 +3266,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
} else {
|
||||
errorMsg += fieldName + " " + treePath + "Exist in multiple;";
|
||||
}
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
valueList.add(path.get(0).getCode());
|
||||
}else {
|
||||
@@ -3295,7 +3277,7 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
} else {
|
||||
errorMsg += fieldName + " " + treePath + "Not exist;";
|
||||
}
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user