package com.hxhq.business.enums.template;

/**
 * 产物：1：试剂；3：给药制剂；5：麻精药；7：无
 * @author tanfei
 */
public enum ProductEnum {

    /**
     * 试剂
     */
    Sj(1, "试剂"),

    /**
     * 给药制剂
     */
    Gyzj(3, "给药制剂"),

    /**
     * 麻精药
     */
    Mjy(5, "麻精药"),

    /**
     * 无
     */
    none(7, "无");

    private int value;
    private String text;

    ProductEnum(int value, String text) {
        this.value = value;
        this.text = text;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public static ProductEnum getEnumByValue(int type) {
        for (ProductEnum bt : values()) {
            if (bt.value == type) {
                return bt;
            }
        }
        return null;
    }
}
