From c6fea25528632d0322545322e93397272a9a2f3d Mon Sep 17 00:00:00 2001 From: rinoux Date: Mon, 15 Aug 2022 09:22:15 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-75140=20=E6=8A=BD=E8=B1=A1=E5=87=BA?= =?UTF-8?q?=E4=B8=80=E4=B8=AA=E5=A4=9A=E7=BB=93=E6=9E=9C=E6=95=B0=E6=8D=AE?= =?UTF-8?q?=E9=9B=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/design/data/DesignTableDataManager.java | 2 +- .../design/data/datapane/preview/PreviewTableModel.java | 9 +++++---- .../wrapper/MultiResultTableDataNameWrapper.java | 2 +- .../tabledata/wrapper/MultiResultTableDataWrapper.java | 2 +- .../tabledata/wrapper/StoreProcedureDataWrapper.java | 1 + .../tabledata/wrapper/StoreProcedureNameWrapper.java | 1 + 6 files changed, 10 insertions(+), 7 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java b/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java index 917f429247..bc18dd8a32 100644 --- a/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java +++ b/designer-base/src/main/java/com/fr/design/data/DesignTableDataManager.java @@ -638,7 +638,7 @@ public abstract class DesignTableDataManager { if (needLoadingBar) { MultiResultTableDataWrapper.loadingBar.start(); } - return DataOperator.getInstance().previewRichTableData(tableData, parameterMap, 0); + return DataOperator.getInstance().previewMultiResultTableData(tableData, parameterMap, 0); } private static void showParaWindow(final Map parameterMap, ParameterProvider[] inParameters) { diff --git a/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTableModel.java b/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTableModel.java index 46706cf591..abbe3a7e08 100644 --- a/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTableModel.java +++ b/designer-base/src/main/java/com/fr/design/data/datapane/preview/PreviewTableModel.java @@ -3,7 +3,7 @@ package com.fr.design.data.datapane.preview; import com.fr.cache.list.IntList; import com.fr.data.AbstractDataModel; import com.fr.data.impl.EmbeddedTableData.EmbeddedTDDataModel; -import com.fr.data.impl.storeproc.ProcedureDataModel; +import com.fr.data.impl.NameDataModel; import com.fr.design.utils.DesignUtils; import com.fr.general.data.DataModel; import com.fr.general.data.TableDataException; @@ -32,8 +32,9 @@ public class PreviewTableModel extends AbstractTableModel { } public PreviewTableModel(DataModel sourceResultSet, int maxRowCount) { - if (sourceResultSet instanceof ProcedureDataModel) { - ProcedureDataModel rs = (ProcedureDataModel) sourceResultSet; + // 如果是这种NameDataModel,根据maxRowCount截断一下 + if (sourceResultSet instanceof NameDataModel) { + NameDataModel rs = (NameDataModel) sourceResultSet; try { this.dataModel = createRowDataModel(rs, maxRowCount); } catch (TableDataException e) { @@ -45,7 +46,7 @@ public class PreviewTableModel extends AbstractTableModel { } } - public static DataModel createRowDataModel(final ProcedureDataModel rs, int maxRowCount) throws TableDataException { + public static DataModel createRowDataModel(final NameDataModel rs, int maxRowCount) throws TableDataException { int rowCount = rs.getRowCount(); if (maxRowCount == 0) { maxRowCount = rowCount; diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/MultiResultTableDataNameWrapper.java b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/MultiResultTableDataNameWrapper.java index 681281b6a4..05c302e97b 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/MultiResultTableDataNameWrapper.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/MultiResultTableDataNameWrapper.java @@ -73,7 +73,7 @@ public final class MultiResultTableDataNameWrapper implements TableDataWrapper { return BaseUtils.readIcon(creator.getIconPath()); } } - return BaseUtils.readIcon("/com/fr/design/images/data/store_procedure.png"); + return BaseUtils.readIcon("/com/fr/design/images/data/multi.png"); } private void createResult(boolean needLoadingBar) { diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/MultiResultTableDataWrapper.java b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/MultiResultTableDataWrapper.java index a7b6a67e57..2e351cf3c2 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/MultiResultTableDataWrapper.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/MultiResultTableDataWrapper.java @@ -151,7 +151,7 @@ public final class MultiResultTableDataWrapper implements TableDataWrapper { return BaseUtils.readIcon(creator.getIconPath()); } } - return BaseUtils.readIcon("/com/fr/design/images/data/store_procedure.png"); + return BaseUtils.readIcon("/com/fr/design/images/data/multi.png"); } /** diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java index 15ea0973e2..1960fed7c8 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureDataWrapper.java @@ -36,6 +36,7 @@ import java.util.concurrent.CancellationException; * * @author zhou * @since 2012-4-12上午10:29:15 + * @deprecated 请勿使用,见{@link MultiResultTableDataWrapper} */ @Deprecated public final class StoreProcedureDataWrapper implements TableDataWrapper { diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureNameWrapper.java b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureNameWrapper.java index 4fb456b643..11aeedbaba 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureNameWrapper.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/wrapper/StoreProcedureNameWrapper.java @@ -27,6 +27,7 @@ import java.util.List; * * @author zhou * @since 2012-4-12上午10:29:15 + * @deprecated 请勿使用,见{@link MultiResultTableDataNameWrapper} */ @Deprecated public final class StoreProcedureNameWrapper implements TableDataWrapper {