|
|
@ -98,22 +98,32 @@ public class TableDataFollowingPasteUtils { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// 对TableData做clone处理
|
|
|
|
return dealWithTableDataMap(tempMap); |
|
|
|
tempMap = dealWithTableData4Clone(tempMap); |
|
|
|
|
|
|
|
// 处理存储过程名称问题
|
|
|
|
|
|
|
|
return dealWithStoreProcedure(tempMap); |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
FineLoggerFactory.getLogger().error("transfer widget tabledata failed", e); |
|
|
|
FineLoggerFactory.getLogger().error("transfer widget tabledata failed", e); |
|
|
|
} |
|
|
|
} |
|
|
|
return new HashMap<>(); |
|
|
|
return new HashMap<>(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 处理结果集 |
|
|
|
|
|
|
|
* @param tableDataMap |
|
|
|
|
|
|
|
* @return |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
private static Map<String, TableData> dealWithTableDataMap(Map<String, TableData> tableDataMap) { |
|
|
|
|
|
|
|
// 处理存储过程名称问题,名称问题需要优先处理,否则就找不到匹配的TableData了
|
|
|
|
|
|
|
|
tableDataMap = dealWithStoreProcedure(tableDataMap); |
|
|
|
|
|
|
|
// 对TableData做clone处理
|
|
|
|
|
|
|
|
tableDataMap = dealWithTableData4Clone(tableDataMap); |
|
|
|
|
|
|
|
return tableDataMap; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 处理结果集,将结果集中的存储过程子表替换为原本的存储过程,否则跟随粘贴过去的存储过程名称有问题 |
|
|
|
* 处理结果集,将结果集中的存储过程子表替换为原本的存储过程,否则跟随粘贴过去的存储过程名称有问题 |
|
|
|
* |
|
|
|
* |
|
|
|
* @param tableDataMap |
|
|
|
* @param tableDataMap |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
public static Map<String, TableData> dealWithStoreProcedure(Map<String, TableData> tableDataMap) { |
|
|
|
private static Map<String, TableData> dealWithStoreProcedure(Map<String, TableData> tableDataMap) { |
|
|
|
Map<String, TableData> resultMap = new HashMap<>(); |
|
|
|
Map<String, TableData> resultMap = new HashMap<>(); |
|
|
|
if (tableDataMap == null) { |
|
|
|
if (tableDataMap == null) { |
|
|
|
return resultMap; |
|
|
|
return resultMap; |
|
|
@ -153,7 +163,7 @@ public class TableDataFollowingPasteUtils { |
|
|
|
for (Map.Entry<String, TableDataWrapper> dataWrapperEntry : dataWrapperMap.entrySet()) { |
|
|
|
for (Map.Entry<String, TableDataWrapper> dataWrapperEntry : dataWrapperMap.entrySet()) { |
|
|
|
String tdName = dataWrapperEntry.getKey(); |
|
|
|
String tdName = dataWrapperEntry.getKey(); |
|
|
|
TableData td = dataWrapperEntry.getValue().getTableData(); |
|
|
|
TableData td = dataWrapperEntry.getValue().getTableData(); |
|
|
|
if (ComparatorUtils.equals(td, tableData)) { |
|
|
|
if (td.equals(tableData)) { |
|
|
|
return tdName; |
|
|
|
return tdName; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -182,10 +192,7 @@ public class TableDataFollowingPasteUtils { |
|
|
|
collectTableDataInChartCollection(templateTableData, tempMap, widget); |
|
|
|
collectTableDataInChartCollection(templateTableData, tempMap, widget); |
|
|
|
collectTableDataInElementCaseEditor(templateTableData, tempMap, widget); |
|
|
|
collectTableDataInElementCaseEditor(templateTableData, tempMap, widget); |
|
|
|
} |
|
|
|
} |
|
|
|
// 对TableData做clone处理
|
|
|
|
return dealWithTableDataMap(tempMap); |
|
|
|
tempMap = dealWithTableData4Clone(tempMap); |
|
|
|
|
|
|
|
// 处理存储过程名称问题
|
|
|
|
|
|
|
|
return dealWithStoreProcedure(tempMap); |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
FineLoggerFactory.getLogger().error("transfer widget tabledata failed", e); |
|
|
|
FineLoggerFactory.getLogger().error("transfer widget tabledata failed", e); |
|
|
|
} |
|
|
|
} |
|
|
|