Browse Source

REPORT-33518 【10.0.7冒烟】从大数据量表取数建立数据集,预览不正常

feature/big-screen
Henry.Wang 4 years ago
parent
commit
a1db831093
  1. 18
      designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java
  2. 2
      designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java

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

@ -439,9 +439,14 @@ public abstract class DesignTableDataManager {
* @throws Exception 异常 * @throws Exception 异常
*/ */
public static EmbeddedTableData previewTableDataNeedInputParameters(TableDataSource tableDataSource, TableData tabledata, int rowCount, boolean needLoadingBar) throws Exception { public static EmbeddedTableData previewTableDataNeedInputParameters(TableDataSource tableDataSource, TableData tabledata, int rowCount, boolean needLoadingBar) throws Exception {
return previewTableData(tableDataSource, tabledata, rowCount, true, needLoadingBar); return previewTableDataNeedInputParameters(tableDataSource, tabledata, rowCount, needLoadingBar, null);
} }
public static EmbeddedTableData previewTableDataNeedInputParameters(TableDataSource tableDataSource, TableData tabledata, int rowCount, boolean needLoadingBar, AutoProgressBar progressBar) throws Exception {
return previewTableData(tableDataSource, tabledata, rowCount, true, needLoadingBar, progressBar);
}
/** /**
* 预览不需要参数的数据集 * 预览不需要参数的数据集
* *
@ -478,7 +483,16 @@ public abstract class DesignTableDataManager {
* @return * @return
*/ */
private static EmbeddedTableData previewTableData(TableDataSource tableDataSource, TableData tabledata, int rowCount, boolean isMustInputParameters, boolean needLoadingBar) throws Exception { private static EmbeddedTableData previewTableData(TableDataSource tableDataSource, TableData tabledata, int rowCount, boolean isMustInputParameters, boolean needLoadingBar) throws Exception {
final AutoProgressBar loadingBar = PreviewTablePane.getInstance().getProgressBar(); return previewTableData(tableDataSource, tabledata, rowCount, isMustInputParameters, needLoadingBar, null);
}
private static EmbeddedTableData previewTableData(TableDataSource tableDataSource, TableData tabledata, int rowCount, boolean isMustInputParameters, boolean needLoadingBar, AutoProgressBar progressBar) throws Exception {
final AutoProgressBar loadingBar;
if (progressBar == null) {
loadingBar = PreviewTablePane.getInstance().getProgressBar();
} else {
loadingBar = progressBar;
}
ParameterProvider[] parameters = DataOperator.getInstance().getTableDataParameters(tabledata); ParameterProvider[] parameters = DataOperator.getInstance().getTableDataParameters(tabledata);
if (ArrayUtils.isEmpty(parameters)) { if (ArrayUtils.isEmpty(parameters)) {
parameters = tabledata.getParameters(Calculator.createCalculator()); parameters = tabledata.getParameters(Calculator.createCalculator());

2
designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTablePane.java

@ -372,7 +372,7 @@ public class PreviewTablePane extends BasicPane {
connectionBar.close(); connectionBar.close();
} }
TableDataSource dataSource = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getTarget(); TableDataSource dataSource = HistoryTemplateListPane.getInstance().getCurrentEditingTemplate().getTarget();
previewTableData = DesignTableDataManager.previewTableDataNeedInputParameters(dataSource, tableData, (int) maxPreviewNumberField.getValue(), true); previewTableData = DesignTableDataManager.previewTableDataNeedInputParameters(dataSource, tableData, (int) maxPreviewNumberField.getValue(), true, progressBar);
// parameterInputDialog // parameterInputDialog
// update之后的parameters,转成一个parameterMap,用于预览TableData // update之后的parameters,转成一个parameterMap,用于预览TableData
PreviewTableModel previewModel = new PreviewTableModel(previewTableData.createDataModel(null), (int) maxPreviewNumberField.getValue()); PreviewTableModel previewModel = new PreviewTableModel(previewTableData.createDataModel(null), (int) maxPreviewNumberField.getValue());

Loading…
Cancel
Save