|
|
@ -4,6 +4,7 @@ import com.fr.base.Parameter; |
|
|
|
import com.fr.base.ParameterConfig; |
|
|
|
import com.fr.base.ParameterConfig; |
|
|
|
import com.fr.base.TableData; |
|
|
|
import com.fr.base.TableData; |
|
|
|
import com.fr.base.io.BaseBook; |
|
|
|
import com.fr.base.io.BaseBook; |
|
|
|
|
|
|
|
import com.fr.base.param.ParameterSource; |
|
|
|
import com.fr.data.TableDataSource; |
|
|
|
import com.fr.data.TableDataSource; |
|
|
|
import com.fr.data.operator.DataOperator; |
|
|
|
import com.fr.data.operator.DataOperator; |
|
|
|
import com.fr.design.file.HistoryTemplateListCache; |
|
|
|
import com.fr.design.file.HistoryTemplateListCache; |
|
|
@ -19,8 +20,8 @@ import com.fr.stable.Filter; |
|
|
|
import com.fr.stable.ParameterProvider; |
|
|
|
import com.fr.stable.ParameterProvider; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
import com.fr.stable.js.WidgetName; |
|
|
|
import com.fr.stable.js.WidgetName; |
|
|
|
|
|
|
|
|
|
|
|
import com.fr.util.ParameterApplyHelper; |
|
|
|
import com.fr.util.ParameterApplyHelper; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.ArrayList; |
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.HashMap; |
|
|
@ -283,9 +284,9 @@ public abstract class DesignModelAdapter<T extends BaseBook, S extends JTemplate |
|
|
|
TableData tableData = this.getBook().getTableData(name); |
|
|
|
TableData tableData = this.getBook().getTableData(name); |
|
|
|
ParameterProvider[] parameterProviders = DataOperator.getInstance().getTableDataParameters(tableData); |
|
|
|
ParameterProvider[] parameterProviders = DataOperator.getInstance().getTableDataParameters(tableData); |
|
|
|
if (filter != null) { |
|
|
|
if (filter != null) { |
|
|
|
ParameterApplyHelper.addPara2Map(map, parameterProviders, filter); |
|
|
|
ParameterApplyHelper.addPara2Map(map, parameterProviders, filter, null, ParameterSource.DEFAULT_SOURCE); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
ParameterApplyHelper.addPara2Map(map, parameterProviders); |
|
|
|
ParameterApplyHelper.addPara2Map(map, parameterProviders, null, ParameterSource.TEMPLATE_SOURCE); |
|
|
|
} |
|
|
|
} |
|
|
|
tableDataParametersMap.put(name, parameterProviders); |
|
|
|
tableDataParametersMap.put(name, parameterProviders); |
|
|
|
} |
|
|
|
} |
|
|
@ -353,9 +354,9 @@ public abstract class DesignModelAdapter<T extends BaseBook, S extends JTemplate |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
private void updateParaMap(Map<String, ParameterProvider> map, ParameterProvider[] parameterProviders, Filter<ParameterProvider> filter) { |
|
|
|
private void updateParaMap(Map<String, ParameterProvider> map, ParameterProvider[] parameterProviders, Filter<ParameterProvider> filter) { |
|
|
|
if (filter != null) { |
|
|
|
if (filter != null) { |
|
|
|
ParameterApplyHelper.addPara2Map(map, parameterProviders, filter); |
|
|
|
ParameterApplyHelper.addPara2Map(map, parameterProviders, filter, null, ParameterSource.DEFAULT_SOURCE); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
ParameterApplyHelper.addPara2Map(map, parameterProviders); |
|
|
|
ParameterApplyHelper.addPara2Map(map, parameterProviders, null, ParameterSource.DEFAULT_SOURCE); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -378,7 +379,7 @@ public abstract class DesignModelAdapter<T extends BaseBook, S extends JTemplate |
|
|
|
protected void addGlobalParameters(Map<String, ParameterProvider> map) { |
|
|
|
protected void addGlobalParameters(Map<String, ParameterProvider> map) { |
|
|
|
// 添加全局参数
|
|
|
|
// 添加全局参数
|
|
|
|
Parameter[] glbParas = ParameterConfig.getInstance().getGlobalParameters(); |
|
|
|
Parameter[] glbParas = ParameterConfig.getInstance().getGlobalParameters(); |
|
|
|
ParameterApplyHelper.addPara2Map(map, glbParas); |
|
|
|
ParameterApplyHelper.addPara2Map(map, glbParas, null, ParameterSource.GLOBAL_SOURCE); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|