Browse Source

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

new-design
Sky.Luo 2 years ago
parent
commit
83fce755ea
  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())); parameter.setValue(parameterMap.get(parameter.getName()));
} }
} }
parameterMap.put(SqlNoteConstants.SQL_NOTE_TEMPLATE, HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().getEditingFILE().getPath()); addTemplateInfo(parameterMap);
return DataOperator.getInstance().previewTableData(TableDataSourceTailor.extractTableData(tableDataSource), tabledata, parameterMap, rowCount); return DataOperator.getInstance().previewTableData(TableDataSourceTailor.extractTableData(tableDataSource), tabledata, parameterMap, rowCount);
} catch (Exception e) { } catch (Exception e) {
throw new TableDataException(e.getMessage(), e); throw new TableDataException(e.getMessage(), e);
@ -592,6 +592,12 @@ public abstract class DesignTableDataManager {
} }
} }
private static void addTemplateInfo(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) { private static boolean needInputParams(boolean mustInputParameters, ParameterProvider[] parameters) {
if (mustInputParameters && ArrayUtils.isNotEmpty(parameters)) { if (mustInputParameters && ArrayUtils.isNotEmpty(parameters)) {
return true; return true;
@ -669,7 +675,7 @@ public abstract class DesignTableDataManager {
if (needLoadingBar) { if (needLoadingBar) {
MultiResultTableDataWrapper.loadingBar.start(); MultiResultTableDataWrapper.loadingBar.start();
} }
parameterMap.put(SqlNoteConstants.SQL_NOTE_TEMPLATE, HistoryTemplateListCache.getInstance().getCurrentEditingTemplate().getEditingFILE().getPath()); addTemplateInfo(parameterMap);
return DataOperator.getInstance().previewMultiResultTableData(tableData, parameterMap, 0); return DataOperator.getInstance().previewMultiResultTableData(tableData, parameterMap, 0);
} }

Loading…
Cancel
Save