package chaoran.business;

/*
 **********************************************
 *      DATE           PERSON       REASON
 *    2021-02-01          FXY        Created
 **********************************************
 */


public enum BrandEnum {
    //枚举名即为valueOf()
    AIFUU("AIFUU", "AIFUU"),
    HORIEMTECH("群创科技", "Horiemtech"),
    QUALCOMM("qualcomm", "qualcomm"),
    IOT_DEVICE("新大陆", "iot_device"),
    NEW_LAND("新大陆", "newland"),
    HISENSE("海信", "hisense"),
    UROVO("DT50 Lite", "urovo"),
    LACHESIS("联新", "lachesis"),
    UROBO("优博讯", "urobo"),
    ROCKCHIP("瑞芯微电子", "rockchip"),
    TEST("测试设备", "test"),
    IDATA("匿名设备", "idata"),
    HONEY_WELL_EDA50P("霍尼维尔EDA50P", "mobiwire"),
    HONEY_WELL_EDA51("霍尼维尔EDA51", "honeywell"),
    ZEBRA_TECHNOLOGIES("斑马TP26CK", "zebra technologies"),
    SEUIC("东集", "seuic"),
    ALPS("阿尔卑斯", "alps"),
    HKWS("海康威视", "mv-idp5102"),
    HKWS2("海康威视", "droi"); // mv-idp5204 宿州市立医院

    private String name;
    private String code;

    BrandEnum(String name, String code) {
        this.name = name;
        this.code = code;
    }

    /**
     * 通过设备型号代码获取设备信息
     *
     * @param code
     * @return
     */
    public static BrandEnum code(String code) {
        if (null == code) {
            code = new String();
        }
        for (BrandEnum brandEnum : values()) {
            if (brandEnum.code.equalsIgnoreCase(code)) {
                return brandEnum;
            }
        }
        return TEST;
    }


}
