package com.changhong.epc.form.execute; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.Objects; import com.alibaba.fastjson.annotation.JSONField; import com.changhong.autoform.entity.ProcessBudget; import com.changhong.epc.bean.form.CpnVal; import com.changhong.epc.bean.form.FormType; import com.iemsoft.framework.cloud.core.tools.JSONTool; import lombok.Data; import lombok.EqualsAndHashCode; @Data @EqualsAndHashCode public class BudgetRecord implements Serializable{ /** * */ private static final long serialVersionUID = 1L; public static class BudgetMoney{ public String alias; public Double money; public Double oldMoney; } private FormType type; /** * 报销金额 预算余额 */ private BudgetMoney money = new BudgetMoney(); private BudgetMoney sumMoney = new BudgetMoney(); @JSONField(serialize=false) private Map value; private ProcessBudget atProcessBudget; @JSONField(serialize=false) private ProcessBudget processBudget; private CpnVal cpnVal; private List citeAlias; //private BudgetRecord budgetRecord; @JSONField(serialize=false) public void setProcessBudget(String json){ processBudget = new ProcessBudget(); citeAlias = new ArrayList<>(); Map map = JSONTool.toObj(json, Map.class); List alias = (List) ((Map) map.get("huixianObj")).get("chooseData"); alias.forEach(s->citeAlias.add(Objects.toString(s))); Map formID = (Map) map.get("formID"); processBudget.setFormId(formID.get("formID")); processBudget.setTenantID(formID.get("tenantID")); } }