PlanEnum.java 2.65 KB
Newer Older
翁国栋 committed
1 2
package cn.timer.api.controller.insure.enums;

3
import cn.timer.api.utils.ExcelUtils;
翁国栋 committed
4 5 6 7 8 9

/**
 * @Description TODO
 * @Author wgd
 * @Date 2022/3/24 17:20
 */
10
public enum PlanEnum {
翁国栋 committed
11 12 13 14 15 16 17 18 19 20 21 22
    A_30(12,"30万意外/3万医疗/扩展24小时(A类)","A类","36968","63119"),
    A_50(15,"50万意外/5万医疗/扩展24小时(A类)","A类","36969","63119"),
    A_80(18,"80万意外/10万医疗/扩展24小时(A类)","A类","36970","63119"),
    A_80_20(25,"80万意外/20万医疗/扩展24小时(A类)","A类","36971","63119"),
    A_100(28,"100万意外/10万医疗/扩展24小时(A类)","A类","36972","63119"),
    B_30(18,"30万意外/3万医疗/扩展24小时(B类)","B类","36968","63120"),
    B_50(20,"50万意外/5万医疗/扩展24小时(B类)","B类","36969","63120"),
    B_80(35,"80万意外/10万医疗/扩展24小时(B类)","B类","36970","63120"),
    B_80_20(38,"80万意外/20万医疗/扩展24小时(B类)","B类","36971","63120"),
    B_100(40,"100万意外/10万医疗/扩展24小时(B类)","B类","36972","63120"),
    C_50(60,"50万意外/5万医疗/扩展24小时(C类)","C类","36969","63121"),
    C_80(75,"80万意外/10万医疗/扩展24小时(C类)","C类","36970","63121");
翁国栋 committed
23 24 25
    private Integer price;
    private String name;
    private String type;
翁国栋 committed
26 27
    private String plan;
    private String category;
翁国栋 committed
28

29
    PlanEnum(Integer price, String name, String type, String plan, String category) {
翁国栋 committed
30 31 32
        this.price = price;
        this.name = name;
        this.type=type;
翁国栋 committed
33 34
        this.plan=plan;
        this.category=category;
翁国栋 committed
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
    }

    public Integer getPrice() {
        return price;
    }

    public void setPrice(Integer price) {
        this.price = price;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

翁国栋 committed
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
    public String getPlan() {
        return plan;
    }

    public void setPlan(String plan) {
        this.plan = plan;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

77 78
    public static PlanEnum getEnum(String plan, String category) {
        for(PlanEnum v : values())
翁国栋 committed
79
            if(v.getPlan().equals(plan)&&v.getCategory().equals(category)) return v;
翁国栋 committed
80 81
        throw new IllegalArgumentException();
    }
82 83 84 85 86
    public static  PlanEnum getEnumOfName(String name){
        for(PlanEnum v : values())
            if(v.getName().equals(name)) return v;
        throw new IllegalArgumentException();
    }
翁国栋 committed
87
}