Browse Source

Merge pull request #3913 in DESIGN/design from release/10.0 to feature/10.0

* commit '61bd80c8b011adbe568772fb7e05417a582cb70a':
  REPORT-50788 【10.0.15】参数面板不会自动生成第二个数据集设置的参数
  CHART-18772  frm下初始化需要选中gisButton
  REPORT-50096 fix 预防npe
  REPORT-50096 FR远程BI,未改动配置,确认保存后配置发生变化
feature/10.0
superman 4 years ago
parent
commit
49a1db9a79
  1. 23
      designer-base/src/main/java/com/fr/design/DesignModelAdapter.java
  2. 8
      designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java
  3. 1
      designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java

23
designer-base/src/main/java/com/fr/design/DesignModelAdapter.java

@ -309,13 +309,13 @@ public abstract class DesignModelAdapter<T extends BaseBook, S extends JTemplate
} else {
parameterProviders = entry.getValue();
}
updateParaMap(map, parameterProviders, filter);
}
if (filter != null) {
ParameterApplyHelper.addPara2Map(map, parameterProviders, filter);
} else {
ParameterApplyHelper.addPara2Map(map, parameterProviders);
}
// 处理非初始化(已存在数据集参数)时 添加逻辑
if (!tableDataParametersMap.containsKey(tdName)) {
providers = DataOperator.getInstance().getTableDataParameters(tableData);
updateParaMap(map, providers, filter);
}
} catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), e);
@ -327,6 +327,17 @@ public abstract class DesignModelAdapter<T extends BaseBook, S extends JTemplate
}
}
/**
* 更新全部参数中的数据集参数
*/
private void updateParaMap(Map<String, ParameterProvider> map, ParameterProvider[] parameterProviders, Filter<ParameterProvider> filter) {
if (filter != null) {
ParameterApplyHelper.addPara2Map(map, parameterProviders, filter);
} else {
ParameterApplyHelper.addPara2Map(map, parameterProviders);
}
}
protected void addGlobalParameters(Map<String, ParameterProvider> map) {
// 添加全局参数
Parameter[] glbParas = ParameterConfig.getInstance().getGlobalParameters();

8
designer-base/src/main/java/com/fr/design/data/datapane/connect/JDBCDefPane.java

@ -99,6 +99,8 @@ public class JDBCDefPane extends JPanel {
private IntegerEditor DBCP_NUMTESTSPEREVICTIONRUN = new IntegerEditor();
private IntegerEditor DBCP_MINEVICTABLEIDLETIMEMILLIS = new IntegerEditor();
private JDBCDatabaseConnection jdbcDatabase;
public JDBCDefPane() {
this.setBorder(UITitledBorder.createBorderWithTitle("JDBC" + ":"));
this.setLayout(FRGUIPaneFactory.createLabelFlowLayout());
@ -202,6 +204,7 @@ public class JDBCDefPane extends JPanel {
if (jdbcDatabase == null) {
jdbcDatabase = new JDBCDatabaseConnection();
}
this.jdbcDatabase = jdbcDatabase;
if (ComparatorUtils.equals(jdbcDatabase.getDriver(), "sun.jdbc.odbc.JdbcOdbcDriver")
&& jdbcDatabase.getURL().startsWith("jdbc:odbc:Driver={Microsoft")) {
this.dbtypeComboBox.setSelectedItem("Access");
@ -235,6 +238,7 @@ public class JDBCDefPane extends JPanel {
if (dbcpAttr == null) {
dbcpAttr = new DBCPConnectionPoolAttr();
jdbcDatabase.setDbcpAttr(dbcpAttr);
this.jdbcDatabase.setDbcpAttr(dbcpAttr);
}
this.DBCP_INITIAL_SIZE.setValue(dbcpAttr.getInitialSize());
this.DBCP_MAX_ACTIVE.setValue(dbcpAttr.getMaxActive());
@ -251,7 +255,9 @@ public class JDBCDefPane extends JPanel {
}
public JDBCDatabaseConnection update() {
JDBCDatabaseConnection jdbcDatabase = new JDBCDatabaseConnection();
if (jdbcDatabase == null) {
jdbcDatabase = new JDBCDatabaseConnection();
}
Object driveItem = this.driverComboBox.getSelectedItem();
jdbcDatabase.setDriver(driveItem == null ? null : driveItem.toString());
jdbcDatabase.setURL(this.urlTextField.getText().trim());

1
designer-chart/src/main/java/com/fr/van/chart/map/designer/type/GisLayerPane.java

@ -79,6 +79,7 @@ public class GisLayerPane extends JPanel implements UIObserver {
private JPanel createGISLayerPane() {
gisButton = new UIButtonGroup(new String[]{Toolkit.i18nText("Fine-Design_Form_Widget_Style_Standard"), Toolkit.i18nText("Fine-Design_Chart_Custom")});
gisButton.setSelectedIndex(0);
gisGaoDeLayer = new UIComboBox(MapLayerConfigManager.getGaoDeLayerItems());
gisButton.addActionListener(event -> {
refreshZoomLevel();

Loading…
Cancel
Save