package com.bcxin.ins.third.build.yangguang.yggc;


import com.alibaba.fastjson.JSON;
import com.bcxin.ins.vo.OrderFormVo;
import com.bcxin.ins.vo.SpecialBidVo;
import com.google.common.collect.Lists;

import java.util.List;

/**
 * 保单信息
 * Created by Apple on 2017/7/19.
 */
public class Policy {
    private List<PolicyRisk> tbRiskList; // 保障责任信息
    private PolicyInsuranceSchema tbInsuranceSchema; // 被保险人信息
    private PolicyMainLiab tbMainLiab; //工程信息
//    private List<PolicyCust>  tbCustList; //客户信息
    private List<PolicyEngage>  tbEngageList; //险种信息

    public static void main(String[] args) {
        System.out.println(JSON.toJSONString(Policy.getDemo()));
    }

    public static List<Policy> getDemo(){
        List<Policy> l = Lists.newArrayList();
        l.add(new Policy("demo"));
        return l;
    }
    public static List<Policy> getDemo1(OrderFormVo dto, SpecialBidVo vo){
        List<Policy> l = Lists.newArrayList();
        l.add(new Policy(dto,vo));
        return l;
    }
    public Policy (){ }

    private Policy (OrderFormVo dto, SpecialBidVo vo){
        this.tbRiskList = PolicyRisk.getDemo(dto,vo);
        this.tbInsuranceSchema = PolicyInsuranceSchema.getDemo(dto,vo);
        this.tbMainLiab = PolicyMainLiab.getDemo(vo);
//        this.tbCustList = PolicyCust.getDemo();
        this.tbEngageList = PolicyEngage.getDemo();
    }
    private Policy (String demo){
        this.tbRiskList = PolicyRisk.getDemo();
        this.tbInsuranceSchema = PolicyInsuranceSchema.getDemo();
        this.tbMainLiab = PolicyMainLiab.getDemo();
//        this.tbCustList = PolicyCust.getDemo();
        this.tbEngageList = PolicyEngage.getDemo();
    }

    public List<PolicyRisk> getTbRiskList() {
        return tbRiskList;
    }

    public void setTbRiskList(List<PolicyRisk> tbRiskList) {
        this.tbRiskList = tbRiskList;
    }

    public PolicyInsuranceSchema getTbInsuranceSchema() {
        return tbInsuranceSchema;
    }

    public void setTbInsuranceSchema(PolicyInsuranceSchema tbInsuranceSchema) {
        this.tbInsuranceSchema = tbInsuranceSchema;
    }

    public PolicyMainLiab getTbMainLiab() {
        return tbMainLiab;
    }

    public void setTbMainLiab(PolicyMainLiab tbMainLiab) {
        this.tbMainLiab = tbMainLiab;
    }

    /*public List<PolicyCust> getTbCustList() {
        return tbCustList;
    }

    public void setTbCustList(List<PolicyCust> tbCustList) {
        this.tbCustList = tbCustList;
    }
*/
    public List<PolicyEngage> getTbEngageList() {
        return tbEngageList;
    }

    public void setTbEngageList(List<PolicyEngage> tbEngageList) {
        this.tbEngageList = tbEngageList;
    }
}
