Browse Source

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

Merge in DESIGN/design from ~HENRY.WANG/design:release/10.0 to release/10.0

* commit 'a1db831093e3dfcf7a57ffdcfd4c0261ceaba9d2':
  REPORT-33518 【10.0.7冒烟】从大数据量表取数建立数据集,预览不正常
feature/big-screen
Henry.Wang 4 years ago
parent
commit
4baf86758c
  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 异常
*/
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
*/
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);
if (ArrayUtils.isEmpty(parameters)) {
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();
}
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
// update之后的parameters,转成一个parameterMap,用于预览TableData
PreviewTableModel previewModel = new PreviewTableModel(previewTableData.createDataModel(null), (int) maxPreviewNumberField.getValue());

Loading…
Cancel
Save