Browse Source

Pull request #3909: REPORT-50788 【10.0.15】参数面板不会自动生成第二个数据集设置的参数

Merge in DESIGN/design from ~HADES/design:final/10.0 to final/10.0

* commit 'e2cc87e26d6daf38ca5d2d29a04e9809e6e848c7':
  REPORT-50788 【10.0.15】参数面板不会自动生成第二个数据集设置的参数
final/10.0
Kara 4 years ago
parent
commit
f23a823916
  1. 21
      designer-base/src/main/java/com/fr/design/DesignModelAdapter.java

21
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 { } else {
parameterProviders = entry.getValue(); 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) { } catch (Exception e) {
FineLoggerFactory.getLogger().error(e.getMessage(), 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) { protected void addGlobalParameters(Map<String, ParameterProvider> map) {
// 添加全局参数 // 添加全局参数
Parameter[] glbParas = ParameterConfig.getInstance().getGlobalParameters(); Parameter[] glbParas = ParameterConfig.getInstance().getGlobalParameters();

Loading…
Cancel
Save