package com.bcxin.ins.third.tyx.changan.ca_enum;

/**
 * <b> 工种类别	 </b>
 *
 * @author ZXF
 * @create 2021/03/03 0003 15:42
 * @version
 * @注意事项 </b>
 */
public enum CraftType {

    G_1 ("0001001", "内勤人员", "1"),
    G_2 ("1800010", "保安人员", "4"),
    G_3 ("1603010", "警卫人员", "4"),
    G_4 ("1107004", "一般清洁工", "2");


    private final String code;
    private final String name;
    private final String level;

    CraftType(final String code
            , final String name
            , final String level){
        this.code = code;
        this.name = name;
        this.level = level;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public String getLevel() {
        return level;
    }

    public static CraftType getByCareer(String career){
        if("1".equals(career)){
            return CraftType.G_1;
        }else if("2".equals(career)){
            return CraftType.G_2;
        }else if("3".equals(career)){
            return CraftType.G_3;
        }else if("4".equals(career)){
            return CraftType.G_4;
        }
        return null;
    }
}
