Browse Source

Pull request #8880: REPORT-70857 数据集复制后独立

Merge in DESIGN/design from ~YVAN/design:final/11.0 to final/11.0

* commit 'e4249c6256994f1397c05fd1adbfff6d3012a9a4':
  REPORT-70857 数据集复制后独立 删去多余import
  REPORT-70857 数据集复制后独立 【问题原因】跟随复制的时候需要处理存储过程名称问题,其中有匹配TableData的操作,而复制本身还需要处理TableData的clone,如果先clone,再去匹配TableData,对象就不相等了 【改动思路】将匹配TableData的操作放在clone处理之前 【review建议】无
final/11.0
Yvan 2 years ago
parent
commit
939c8e4f59
  1. 13
      designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java

13
designer-base/src/main/java/com/fr/design/data/tabledata/paste/TableDataFollowingPasteUtils.java

@ -98,10 +98,11 @@ public class TableDataFollowingPasteUtils {
}
}
}
// 处理存储过程名称问题,名称问题需要优先处理,否则就找不到匹配的TableData了
tempMap = dealWithStoreProcedure(tempMap);
// 对TableData做clone处理
tempMap = dealWithTableData4Clone(tempMap);
// 处理存储过程名称问题
return dealWithStoreProcedure(tempMap);
return tempMap;
} catch (Exception e) {
FineLoggerFactory.getLogger().error("transfer widget tabledata failed", e);
}
@ -153,7 +154,8 @@ public class TableDataFollowingPasteUtils {
for (Map.Entry<String, TableDataWrapper> dataWrapperEntry : dataWrapperMap.entrySet()) {
String tdName = dataWrapperEntry.getKey();
TableData td = dataWrapperEntry.getValue().getTableData();
if (ComparatorUtils.equals(td, tableData)) {
// 用TableData自己重写的equals方法来比较,实际上直接用"="号也行
if (tableData.equals(td)) {
return tdName;
}
}
@ -182,10 +184,11 @@ public class TableDataFollowingPasteUtils {
collectTableDataInChartCollection(templateTableData, tempMap, widget);
collectTableDataInElementCaseEditor(templateTableData, tempMap, widget);
}
// 处理存储过程名称问题,名称问题需要优先处理,否则就找不到匹配的TableData了
tempMap = dealWithStoreProcedure(tempMap);
// 对TableData做clone处理
tempMap = dealWithTableData4Clone(tempMap);
// 处理存储过程名称问题
return dealWithStoreProcedure(tempMap);
return tempMap;
} catch (Exception e) {
FineLoggerFactory.getLogger().error("transfer widget tabledata failed", e);
}

Loading…
Cancel
Save