|
|
@ -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()); |
|
|
|
addTemplateInfoIfNeed(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 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) { |
|
|
|
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()); |
|
|
|
addTemplateInfoIfNeed(parameterMap); |
|
|
|
return DataOperator.getInstance().previewMultiResultTableData(tableData, parameterMap, 0); |
|
|
|
return DataOperator.getInstance().previewMultiResultTableData(tableData, parameterMap, 0); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|