修改导入条款涉及系统/部件与专业领域验证
This commit is contained in:
+53
-22
@@ -3196,33 +3196,69 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
if (firstDict.isPresent()){
|
if (firstDict.isPresent()){
|
||||||
List<SysDictItem> sysDictItemLists = sysDictItemService.list(new LambdaQueryWrapper<SysDictItem>()
|
List<SysDictItem> sysDictItemLists = sysDictItemService.list(new LambdaQueryWrapper<SysDictItem>()
|
||||||
.eq(SysDictItem::getDictId, firstDict.get().getId()));
|
.eq(SysDictItem::getDictId, firstDict.get().getId()));
|
||||||
List<SysDictItem> sysDictItemList = getLevelPath(sysDictItemLists);
|
|
||||||
String[] treePathList = value.split(",");
|
String[] treePathList = value.split(",");
|
||||||
for (String treePath : treePathList) {
|
for (String treePath : treePathList) {
|
||||||
List<SysDictItem> path =
|
List<SysDictItem> path =
|
||||||
sysDictItemList.stream().filter(o -> treePath.equals(o.getLevelPath()))
|
sysDictItemLists.stream().filter(o -> treePath.equals(o.getItemText()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
if (!path.isEmpty()){
|
if (!path.isEmpty()){
|
||||||
if (path.size() > 1) {
|
// 如果有多个,按照全路径去匹配一遍
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
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())) {
|
if(MessageUtils.getLanguage().getValue().equals(LanguageEnum.CN.getValue())) {
|
||||||
errorMsg += fieldName + "中" + treePath + "存在多个;";
|
errorMsg += fieldName + "中" + treePath + "不存在;";
|
||||||
countError++;
|
countError++;
|
||||||
valueList = Collections.emptyList();
|
valueList = Collections.emptyList();
|
||||||
} else {
|
} else {
|
||||||
errorMsg += fieldName + " " + treePath + "Exist in multiple;";
|
errorMsg += fieldName + " " + treePath + "Not exist;";
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
valueList.add(path.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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -3231,15 +3267,10 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
|||||||
|
|
||||||
// 特殊字段
|
// 特殊字段
|
||||||
if (StringUtils.isNotBlank(value) && SPECIAL_FIELD.contains(dbfieldName)){
|
if (StringUtils.isNotBlank(value) && SPECIAL_FIELD.contains(dbfieldName)){
|
||||||
if (partNameList.isEmpty()){
|
|
||||||
List<PartName> partNames = IPartNameService.list(new LambdaQueryWrapper<PartName>().ne(PartName::getCode, "Part"));
|
|
||||||
partNameList = partNameGetLevelPath(partNames);
|
|
||||||
}
|
|
||||||
String[] treePathList = value.split(",");
|
String[] treePathList = value.split(",");
|
||||||
for (String treePath : treePathList) {
|
for (String treePath : treePathList) {
|
||||||
List<PartName> path =
|
List<PartName> path = IPartNameService.list(new LambdaQueryWrapper<PartName>()
|
||||||
partNameList.stream().filter(o -> treePath.equals(o.getLevelPath()))
|
.eq(PartName::getName, treePath));
|
||||||
.collect(Collectors.toList());
|
|
||||||
if (!path.isEmpty()){
|
if (!path.isEmpty()){
|
||||||
if (path.size() > 1) {
|
if (path.size() > 1) {
|
||||||
if(MessageUtils.getLanguage().getValue().equals(LanguageEnum.CN.getValue())) {
|
if(MessageUtils.getLanguage().getValue().equals(LanguageEnum.CN.getValue())) {
|
||||||
|
|||||||
Reference in New Issue
Block a user