Browse Source

Pull request #12108: REPORT-95337 & REPORT-95265 fix: 设计器预览数据集的模板信息携带修改 & sql注释先单独处理一下sqlserver的存储过程

Merge in DESIGN/design from ~SKY.LUO/design:final/11.0 to final/11.0

* commit '28b4d2a774b0fa916f0b5878536da6e06b46df40':
  REPORT-95337 & REPORT-95265 fix: 设计器预览数据集的模板信息携带修改 & sql注释先单独处理一下sqlserver的存储过程
  REPORT-95337 & REPORT-95265 fix: 设计器预览数据集的模板信息携带修改 & sql注释先单独处理一下sqlserver的存储过程
new-design
Sky.Luo-罗鹏乾 2 years ago
parent
commit
925e9978e3
  1. 10
      designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java

10
designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java

@ -572,7 +572,7 @@ public abstract class DesignTableDataManager {
parameter.setValue(parameterMap.get(parameter.getName()));
}
}
parameterMap.put(SqlNoteConstants.SQL_NOTE_TEMPLATE, HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().getEditingFILE().getPath());
addTemplateInfoIfNeed(parameterMap);
return DataOperator.getInstance().previewTableData(TableDataSourceTailor.extractTableData(tableDataSource), tabledata, parameterMap, rowCount);
} catch (Exception e) {
throw new TableDataException(e.getMessage(), e);
@ -592,6 +592,12 @@ public abstract class DesignTableDataManager {
}
}
private static void addTemplateInfoIfNeed(Map<String, Object> parameterMap) {
if (JTemplate.isValid(HistoryTemplateListCache.getInstance().getCurrentEditingTemplate())) {
parameterMap.put(SqlNoteConstants.SQL_NOTE_TEMPLATE, HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().getEditingFILE().getPath());
}
}
private static boolean needInputParams(boolean mustInputParameters, ParameterProvider[] parameters) {
if (mustInputParameters && ArrayUtils.isNotEmpty(parameters)) {
return true;
@ -669,7 +675,7 @@ public abstract class DesignTableDataManager {
if (needLoadingBar) {
MultiResultTableDataWrapper.loadingBar.start();
}
parameterMap.put(SqlNoteConstants.SQL_NOTE_TEMPLATE, HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().getEditingFILE().getPath());
addTemplateInfoIfNeed(parameterMap);
return DataOperator.getInstance().previewMultiResultTableData(tableData, parameterMap, 0);
}

Loading…
Cancel
Save