From be48bf4b295d2cda530003874b5b0edde571074b Mon Sep 17 00:00:00 2001 From: kerry Date: Thu, 13 Apr 2017 16:08:15 +0800 Subject: [PATCH] =?UTF-8?q?REPORT-2220=20=E6=95=B0=E6=8D=AE=E8=BF=9E?= =?UTF-8?q?=E6=8E=A5=E7=94=A8=E6=88=B7=E5=90=8D=E5=92=8C=E5=AF=86=E7=A0=81?= =?UTF-8?q?=E5=8F=AF=E4=BB=A5=E4=BC=A0=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fr/design/formula/VariableResolverAdapter.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/designer_base/src/com/fr/design/formula/VariableResolverAdapter.java b/designer_base/src/com/fr/design/formula/VariableResolverAdapter.java index eb80600acc..623b1cbf4f 100644 --- a/designer_base/src/com/fr/design/formula/VariableResolverAdapter.java +++ b/designer_base/src/com/fr/design/formula/VariableResolverAdapter.java @@ -4,12 +4,16 @@ import com.fr.base.ConfigManager; import com.fr.base.Parameter; import com.fr.design.DesignModelAdapter; import com.fr.base.ConfigManagerProvider; +import com.fr.plugin.ExtraClassManager; import com.fr.script.ScriptConstants; +import com.fr.stable.ArrayUtils; import com.fr.stable.Constants; +import com.fr.stable.fun.BuiltInParametersProvider; import com.fr.stable.script.CalculatorProvider; import java.util.ArrayList; import java.util.List; +import java.util.Set; public abstract class VariableResolverAdapter implements VariableResolver { private static final int TABLE_DATA_PARA = 0; @@ -21,7 +25,7 @@ public abstract class VariableResolverAdapter implements VariableResolver { * @return 内置参数 */ public String[] resolveCurReportVariables() { - return new String[] { ScriptConstants.SUMMARY_TAG + "page_number", + String [] variables = new String[] { ScriptConstants.SUMMARY_TAG + "page_number", ScriptConstants.SUMMARY_TAG + "totalPage_number", // 下面是权限相关的参数 ScriptConstants.DETAIL_TAG + Constants.P.PRIVILEGE_USERNAME, ScriptConstants.DETAIL_TAG + Constants.P.PRIVILEGE_AUTHORITY, @@ -32,6 +36,13 @@ public abstract class VariableResolverAdapter implements VariableResolver { CalculatorProvider.REPORT_NAME, CalculatorProvider.FORMLET_NAME, CalculatorProvider.SERVLET_URL, CalculatorProvider.SERVER_SCHEMA, CalculatorProvider.SERVER_NAME, CalculatorProvider.SERVER_PORT, CalculatorProvider.SERVER_URL, CalculatorProvider.CONTEXT_PATH, CalculatorProvider.SESSION_ID }; + Set set = ExtraClassManager.getInstance().getArray(BuiltInParametersProvider.XML_TAG); + for (BuiltInParametersProvider provider : set) { + return (String[]) ArrayUtils.addAll(variables, new String []{ + ScriptConstants.DETAIL_TAG + provider.getParametersName() + }); + } + return variables; } private Parameter[] getCurrentModeParameters(int type) {