From d078e947dddc70ecd43f1dabb7aeb6ba973ac82d Mon Sep 17 00:00:00 2001 From: "Destiny.Lin" Date: Sun, 21 Jul 2024 17:26:26 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-114391=20=E3=80=90=E5=BE=AE=E6=9C=8D?= =?UTF-8?q?=E5=8A=A1=E9=80=82=E9=85=8D=E3=80=91=E8=BF=9C=E7=A8=8B&?= =?UTF-8?q?=E6=9C=AC=E5=9C=B0=E8=AE=BE=E8=AE=A1=E5=99=A8=E8=83=BD=E5=A4=9F?= =?UTF-8?q?=E6=AD=A3=E5=B8=B8=E5=90=AF=E5=8A=A8=20=E5=AE=8C=E5=96=84?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E9=9B=86=E4=B8=8E=E6=95=B0=E6=8D=AE=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/actions/server/GlobalTableDataAction.java | 8 +++++++- .../data/tabledata/tabledatapane/DBTableDataPane.java | 4 ++-- .../main/java/com/fr/design/gui/ilist/TableViewList.java | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/actions/server/GlobalTableDataAction.java b/designer-base/src/main/java/com/fr/design/actions/server/GlobalTableDataAction.java index 11d30f6dba..82a1fdd252 100644 --- a/designer-base/src/main/java/com/fr/design/actions/server/GlobalTableDataAction.java +++ b/designer-base/src/main/java/com/fr/design/actions/server/GlobalTableDataAction.java @@ -22,6 +22,8 @@ import com.fr.esd.event.DsNameTarget; import com.fr.esd.event.StrategyEventsNotifier; import com.fr.report.LockItem; +import com.fr.workspace.server.entity.tabledata.TableDataBean; +import com.fr.workspace.server.repository.tabledata.TableDataRepository; import javax.swing.KeyStroke; import java.awt.Dimension; @@ -75,7 +77,11 @@ public class GlobalTableDataAction extends UpdateAction implements ResponseDataS } // 锁定成功,执行后续操作 final DesignerFrame designerFrame = DesignerContext.getDesignerFrame(); - final Map tableDataMap = TableDataConfigProviderFactory.getInstance().getTableDatas(); + final TableDataBean[] beans = TableDataRepository.getInstance().getAllTableData(); + final Map tableDataMap = new HashMap<>(); + for (TableDataBean bean : beans) { + tableDataMap.put(bean.getTableData().getName() , bean.getTableData()); + } final TableDataManagerPane globalTableDataPane = new TableDataManagerPane() { public void complete() { populate(tableDataMap); diff --git a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java index d0ffd7f22c..37d0532a6c 100644 --- a/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java +++ b/designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java @@ -295,8 +295,8 @@ public class DBTableDataPane extends AbstractTableDataPane implemen private void refreshParameters() { String[] paramTexts = new String[2]; - paramTexts[0] = SqlUtils.tryPureSqlText(this.sqlTextPane.getText()); - paramTexts[1] = SqlUtils.tryPureSqlText(this.pageQuery); + paramTexts[0] = SqlUtils.clearSqlComments(this.sqlTextPane.getText()); + paramTexts[1] = SqlUtils.clearSqlComments(this.pageQuery); List existParameterList = this.editorPane.update(); Parameter[] ps = (existParameterList == null) ? new Parameter[0] : existParameterList.toArray(new Parameter[0]); diff --git a/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java b/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java index 83b7008a7e..b87af71fab 100644 --- a/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java +++ b/designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java @@ -161,7 +161,7 @@ public class TableViewList extends UIList { */ private DefaultListModel processDataInAnotherThread(String databaseName, String searchFilter, String... typesFilter) throws Exception { DefaultListModel defaultListModel = new DefaultListModel(); - Connection datasource = ConnectionConfigProviderFactory.getConfigProvider().getConnection(databaseName); + Connection datasource = ConnectionRepository.getInstance().getByName(databaseName).getConnection(); if (datasource == null) { return defaultListModel; }