修改拆分条款导入验证
This commit is contained in:
+40
-18
@@ -2263,10 +2263,14 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
}
|
||||
SplitTableInfo splitTableInfo = new SplitTableInfo();
|
||||
splitTableInfo.setTableName(sheet.getSheetName());
|
||||
String tableHtml = POIReadExcelToHtml.readExcelToHtml(workbook,i,false);
|
||||
tableHtml = tableHtml.replaceAll("\'","\"");
|
||||
tableHtml = tableHtml.replaceAll("style","border=\"1\" style");// 解决导入的表格没线
|
||||
splitTableInfo.setTableHtml(tableHtml);
|
||||
try {
|
||||
String tableHtml = POIReadExcelToHtml.readExcelToHtml(workbook,i,false);
|
||||
tableHtml = tableHtml.replaceAll("\'","\"");
|
||||
tableHtml = tableHtml.replaceAll("style","border=\"1\" style");// 解决导入的表格没线
|
||||
splitTableInfo.setTableHtml(tableHtml);
|
||||
}catch (Exception e){
|
||||
throw new JeroBootException(sheet.getSheetName() + "页签数据异常");
|
||||
}
|
||||
getSheetTableList.add(splitTableInfo);
|
||||
}
|
||||
int i = 0 ;
|
||||
@@ -3203,25 +3207,43 @@ public class FileSplitItemsEOServiceImpl extends ServiceImpl<FileSplitItemsEOMap
|
||||
|
||||
String[] treePathList = value.split(",");
|
||||
for (String treePath : treePathList) {
|
||||
List<SysDictItem> sysDictItemList = getLevelPath(sysDictItemLists);
|
||||
List<SysDictItem> path =
|
||||
sysDictItemList.stream().filter(o -> treePath.equals(o.getLevelPath()))
|
||||
sysDictItemLists.stream().filter(o -> treePath.equals(o.getItemText()))
|
||||
.collect(Collectors.toList());
|
||||
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;";
|
||||
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;";
|
||||
}
|
||||
continue;
|
||||
}
|
||||
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;";
|
||||
}
|
||||
continue;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
valueList.add(path.get(0).getItemValue());
|
||||
}else{
|
||||
}else {
|
||||
List<SysDictItem> sysDictItemList = getLevelPath(sysDictItemLists);
|
||||
List<SysDictItem> pathOther =
|
||||
sysDictItemLists.stream().filter(o -> treePath.equals(o.getItemText()))
|
||||
sysDictItemList.stream().filter(o -> treePath.equals(o.getLevelPath()))
|
||||
.collect(Collectors.toList());
|
||||
if(!pathOther.isEmpty()){
|
||||
if (path.size() > 1) {
|
||||
|
||||
Reference in New Issue
Block a user