From 0dea88f5a0e09ea5e86659aa44c3704b268deef4 Mon Sep 17 00:00:00 2001 From: Hoky <303455184@qq.com> Date: Thu, 24 Feb 2022 10:33:00 +0800 Subject: [PATCH] =?UTF-8?q?KERNEL-10259=20=E6=8A=A5=E8=A1=A8=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E9=80=BB=E8=BE=91=E9=87=8D=E6=9E=84=201.=E5=8F=82?= =?UTF-8?q?=E6=95=B0=E6=9D=A5=E6=BA=90=E6=94=B6=E9=9B=86=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/fr/design/DesignModelAdapter.java | 13 +++++++------ .../com/fr/design/mainframe/FormModelAdapter.java | 7 ++++--- .../fr/design/mainframe/WorkBookModelAdapter.java | 5 +++-- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/designer-base/src/main/java/com/fr/design/DesignModelAdapter.java b/designer-base/src/main/java/com/fr/design/DesignModelAdapter.java index 3eb3b78579..013c703fb2 100644 --- a/designer-base/src/main/java/com/fr/design/DesignModelAdapter.java +++ b/designer-base/src/main/java/com/fr/design/DesignModelAdapter.java @@ -4,6 +4,7 @@ import com.fr.base.Parameter; import com.fr.base.ParameterConfig; import com.fr.base.TableData; import com.fr.base.io.BaseBook; +import com.fr.base.param.ParameterSource; import com.fr.data.TableDataSource; import com.fr.data.operator.DataOperator; import com.fr.design.file.HistoryTemplateListCache; @@ -19,8 +20,8 @@ import com.fr.stable.Filter; import com.fr.stable.ParameterProvider; import com.fr.stable.StringUtils; import com.fr.stable.js.WidgetName; - import com.fr.util.ParameterApplyHelper; + import java.util.ArrayList; import java.util.Arrays; import java.util.HashMap; @@ -283,9 +284,9 @@ public abstract class DesignModelAdapter map, ParameterProvider[] parameterProviders, Filter filter) { if (filter != null) { - ParameterApplyHelper.addPara2Map(map, parameterProviders, filter); + ParameterApplyHelper.addPara2Map(map, parameterProviders, filter, null, ParameterSource.DEFAULT_SOURCE); } else { - ParameterApplyHelper.addPara2Map(map, parameterProviders); + ParameterApplyHelper.addPara2Map(map, parameterProviders, null, ParameterSource.DEFAULT_SOURCE); } } @@ -378,7 +379,7 @@ public abstract class DesignModelAdapter map) { // 添加全局参数 Parameter[] glbParas = ParameterConfig.getInstance().getGlobalParameters(); - ParameterApplyHelper.addPara2Map(map, glbParas); + ParameterApplyHelper.addPara2Map(map, glbParas, null, ParameterSource.GLOBAL_SOURCE); } diff --git a/designer-form/src/main/java/com/fr/design/mainframe/FormModelAdapter.java b/designer-form/src/main/java/com/fr/design/mainframe/FormModelAdapter.java index bf047a3bee..1230e0fae3 100644 --- a/designer-form/src/main/java/com/fr/design/mainframe/FormModelAdapter.java +++ b/designer-form/src/main/java/com/fr/design/mainframe/FormModelAdapter.java @@ -2,6 +2,7 @@ package com.fr.design.mainframe; import com.fr.base.Parameter; import com.fr.base.TableData; +import com.fr.base.param.ParameterSource; import com.fr.data.TableDataSource; import com.fr.design.DesignModelAdapter; import com.fr.design.file.HistoryTemplateListPane; @@ -14,8 +15,8 @@ import com.fr.script.Calculator; import com.fr.stable.EmbParaFilter; import com.fr.stable.ParameterProvider; import com.fr.stable.js.WidgetName; - import com.fr.util.ParameterApplyHelper; + import java.util.ArrayList; import java.util.HashMap; import java.util.List; @@ -55,7 +56,7 @@ public class FormModelAdapter extends DesignModelAdapter> Map map = new HashMap<>(); addGlobalParameters(map); updateTableDataParameters(oldName, tdName, tableData, map, parameterProvider -> !EmbParaFilter.isFRLayerTypePara(parameterProvider)); - ParameterApplyHelper.addPara2Map(map, this.getBook().getTemplateParameters()); + ParameterApplyHelper.addPara2Map(map, this.getBook().getTemplateParameters(), null, ParameterSource.DEFAULT_SOURCE); parameters = map.values().toArray(new Parameter[0]); jTemplate.populateParameter(); } @@ -158,7 +159,7 @@ public class FormModelAdapter extends DesignModelAdapter> addTableDataParameters(map, parameterProvider -> !EmbParaFilter.isFRLayerTypePara(parameterProvider)); - ParameterApplyHelper.addPara2Map(map, this.getBook().getTemplateParameters()); + ParameterApplyHelper.addPara2Map(map, this.getBook().getTemplateParameters(), null, ParameterSource.DEFAULT_SOURCE); return map.values().toArray(new Parameter[0]); } diff --git a/designer-realize/src/main/java/com/fr/design/mainframe/WorkBookModelAdapter.java b/designer-realize/src/main/java/com/fr/design/mainframe/WorkBookModelAdapter.java index 53f193be74..6cbc0142ed 100644 --- a/designer-realize/src/main/java/com/fr/design/mainframe/WorkBookModelAdapter.java +++ b/designer-realize/src/main/java/com/fr/design/mainframe/WorkBookModelAdapter.java @@ -2,6 +2,7 @@ package com.fr.design.mainframe; import com.fr.base.Parameter; import com.fr.base.TableData; +import com.fr.base.param.ParameterSource; import com.fr.data.TableDataSource; import com.fr.design.DesignModelAdapter; import com.fr.design.bridge.DesignToolbarProvider; @@ -17,8 +18,8 @@ import com.fr.stable.ParameterProvider; import com.fr.stable.StringUtils; import com.fr.stable.bridge.StableFactory; import com.fr.stable.js.WidgetName; - import com.fr.util.ParameterApplyHelper; + import java.util.ArrayList; import java.util.HashMap; import java.util.Iterator; @@ -139,7 +140,7 @@ public class WorkBookModelAdapter extends DesignModelAdapter