Browse Source

CORE-116 fr_username->fine_username等对应的修改,KMS上补充文档,老的保持兼容

master
richie 7 years ago
parent
commit
305b3960f4
  1. 18
      designer-base/src/main/java/com/fr/design/formula/VariableResolverAdapter.java

18
designer-base/src/main/java/com/fr/design/formula/VariableResolverAdapter.java

@ -3,10 +3,10 @@ package com.fr.design.formula;
import com.fr.base.Parameter; import com.fr.base.Parameter;
import com.fr.base.ParameterConfig; import com.fr.base.ParameterConfig;
import com.fr.design.DesignModelAdapter; import com.fr.design.DesignModelAdapter;
import com.fr.general.web.ParameterConstants;
import com.fr.plugin.ExtraClassManager; import com.fr.plugin.ExtraClassManager;
import com.fr.script.ScriptConstants; import com.fr.script.ScriptConstants;
import com.fr.stable.ArrayUtils; import com.fr.stable.ArrayUtils;
import com.fr.stable.Constants;
import com.fr.stable.fun.BuiltInParametersProvider; import com.fr.stable.fun.BuiltInParametersProvider;
import com.fr.stable.script.CalculatorProvider; import com.fr.stable.script.CalculatorProvider;
@ -24,11 +24,13 @@ public abstract class VariableResolverAdapter implements VariableResolver {
* @return 内置参数 * @return 内置参数
*/ */
public String[] resolveCurReportVariables() { public String[] resolveCurReportVariables() {
String [] variables = new String[] { ScriptConstants.SUMMARY_TAG + "page_number", String[] variables = new String[]{
ScriptConstants.SUMMARY_TAG + "page_number",
ScriptConstants.SUMMARY_TAG + "totalPage_number", ScriptConstants.SUMMARY_TAG + "totalPage_number",
// 下面是权限相关的参数 // 下面是权限相关的参数
ScriptConstants.DETAIL_TAG + Constants.P.PRIVILEGE_USERNAME, ScriptConstants.DETAIL_TAG + Constants.P.PRIVILEGE_AUTHORITY, ScriptConstants.DETAIL_TAG + ParameterConstants.FINE_USERNAME,
ScriptConstants.DETAIL_TAG + Constants.P.PRIVILEGE_DEPARTMETN_AND_POST, ScriptConstants.DETAIL_TAG + ParameterConstants.FINE_ROLE,
ScriptConstants.DETAIL_TAG + ParameterConstants.FINE_POSITION,
// 空值参数 // 空值参数
"NULL", "NOFILTER", "NULL", "NOFILTER",
// request变量 // request变量
@ -37,7 +39,7 @@ public abstract class VariableResolverAdapter implements VariableResolver {
}; };
Set<BuiltInParametersProvider> set = ExtraClassManager.getInstance().getArray(BuiltInParametersProvider.XML_TAG); Set<BuiltInParametersProvider> set = ExtraClassManager.getInstance().getArray(BuiltInParametersProvider.XML_TAG);
for (BuiltInParametersProvider provider : set) { for (BuiltInParametersProvider provider : set) {
return (String[]) ArrayUtils.addAll(variables, new String []{ return (String[]) ArrayUtils.addAll(variables, new String[]{
ScriptConstants.DETAIL_TAG + provider.getParametersName() ScriptConstants.DETAIL_TAG + provider.getParametersName()
}); });
} }
@ -46,12 +48,12 @@ public abstract class VariableResolverAdapter implements VariableResolver {
private Parameter[] getCurrentModeParameters(int type) { private Parameter[] getCurrentModeParameters(int type) {
Parameter[] parameters = null; Parameter[] parameters = null;
if(DesignModelAdapter.getCurrentModelAdapter() == null) { if (DesignModelAdapter.getCurrentModelAdapter() == null) {
parameters = new Parameter[0]; parameters = new Parameter[0];
} else { } else {
if(type == TABLE_DATA_PARA) { if (type == TABLE_DATA_PARA) {
parameters = DesignModelAdapter.getCurrentModelAdapter().getTableDataParameters(); parameters = DesignModelAdapter.getCurrentModelAdapter().getTableDataParameters();
} else if(type == REPORT_DATA_PARA){ } else if (type == REPORT_DATA_PARA) {
parameters = DesignModelAdapter.getCurrentModelAdapter().getReportParameters(); parameters = DesignModelAdapter.getCurrentModelAdapter().getReportParameters();
} }
} }

Loading…
Cancel
Save