package com.changhong.epc.form.service.budget.department.impl; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; import com.changhong.autoform.entity.ProcessBudget; import com.changhong.epc.bean.form.budget.BudgetUserDefined; import com.changhong.epc.bean.form.budget.BudgetUserDefined.Dimension; import com.changhong.epc.bean.form.budget.filtrate.BudgetclassifyKey; import com.changhong.epc.bean.form.budget.filtrate.BudgetclassifyValue; import com.changhong.epc.form.service.budget.department.SuperBudgt; /** * 归口部门 * @author wangZX * */ public class ElevantDepartments extends SuperBudgt{ @Override public List> getUsableBudgetList() { List> datas = new ArrayList<>(); Collection values = data.values(); values.forEach(o->datas.addAll(o.dispose())); return datas; } @Override public boolean executeWriteBack(Map fromInfo, ProcessBudget processBudget,String formID) { // System.out.println("ElevantDepartments.executeWriteBack()"); return false; } @Override public void setDataSource(BudgetUserDefined budgetUserDefined, Map data) { this.budgetUserDefined = budgetUserDefined; this.data = data; } @Override public boolean isMereg() { return false; } @Override public boolean isFilter(Map data) { return true; } @Override public BudgetUserDefined getBudgetUserDefined() { BudgetUserDefined budgetUserDefined = new BudgetUserDefined(); budgetUserDefined.setFilterSubForm(true); budgetUserDefined.setMergeSubForm(true); budgetUserDefined.setKey("ElevantDepartments"); budgetUserDefined.setVal("归口部门"); List mainDimension = new ArrayList<>(); List subDimension = new ArrayList<>(); mainDimension.add(new Dimension(BUDGET_START_DATE)); mainDimension.add(new Dimension(BUDGET_END_DATE)); mainDimension.add(new Dimension(CURRENCY)); subDimension.add(new Dimension(BUDGET_ITEM_COST_TYPE)); subDimension.add(new Dimension(BUDGET_ITEM_DEPARTMENT)); budgetUserDefined.setMainDimension(mainDimension); budgetUserDefined.setSubDimension(subDimension); return budgetUserDefined; } @Override public Boolean excuteRefunds(Map formInfo) { // TODO Auto-generated method stub return null; } public BudgetUserDefined getBudgetUserDefined(String fun) { BudgetUserDefined budgetUserDefined = new BudgetUserDefined(); budgetUserDefined.setFilterSubForm(true); budgetUserDefined.setMergeSubForm(true); budgetUserDefined.setKey("ElevantDepartments"); budgetUserDefined.setVal("归口部门"); List mainDimension = new ArrayList<>(); List subDimension = new ArrayList<>(); mainDimension.add(new Dimension(BUDGET_START_DATE)); mainDimension.add(new Dimension(BUDGET_END_DATE)); mainDimension.add(new Dimension(CURRENCY)); subDimension.add(new Dimension(BUDGET_ITEM_COST_TYPE)); subDimension.add(new Dimension(BUDGET_ITEM_DEPARTMENT)); budgetUserDefined.setMainDimension(mainDimension); budgetUserDefined.setSubDimension(subDimension); return budgetUserDefined; } }