Browse Source

REPORT-114391 【微服务适配】远程&本地设计器能够正常启动 完善数据集与数据连接

mss/2.0
Destiny.Lin 4 months ago
parent
commit
d078e947dd
  1. 8
      designer-base/src/main/java/com/fr/design/actions/server/GlobalTableDataAction.java
  2. 4
      designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java
  3. 2
      designer-base/src/main/java/com/fr/design/gui/ilist/TableViewList.java

8
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<String, TableData> tableDataMap = TableDataConfigProviderFactory.getInstance().getTableDatas();
final TableDataBean[] beans = TableDataRepository.getInstance().getAllTableData();
final Map<String, TableData> tableDataMap = new HashMap<>();
for (TableDataBean bean : beans) {
tableDataMap.put(bean.getTableData().getName() , bean.getTableData());
}
final TableDataManagerPane globalTableDataPane = new TableDataManagerPane() {
public void complete() {
populate(tableDataMap);

4
designer-base/src/main/java/com/fr/design/data/tabledata/tabledatapane/DBTableDataPane.java

@ -295,8 +295,8 @@ public class DBTableDataPane extends AbstractTableDataPane<DBTableData> 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<ParameterProvider> existParameterList = this.editorPane.update();
Parameter[] ps = (existParameterList == null) ? new Parameter[0] : existParameterList.toArray(new Parameter[0]);

2
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;
}

Loading…
Cancel
Save