package thyyxxk.webserver.entity.medicine;

public enum InvChgType {

    SP_RK("108", "商品采购入库"),
    SP_CK("109", "商品退货出库"),
    ZY_RK("110", "赠药入库"),
    ZY_CK("111", "赠药退回出库"),
    TB_RK("101", "调拨入库"),
    TB_CK("102", "调拨出库"),

    PY("103", "盘盈"),
    PS("104", "盘损"),

    XH("105", "销毁"),
    QT_RK("106", "其他入库"),
    QT_CK("107", "其他出库");

    public final String code;
    public final String name;
    InvChgType(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public static InvChgType getYpTypeNumberByCode(String code){
        InvChgType[] InvChgTypeList = values();
        for (InvChgType ynvChgType : InvChgTypeList){
            if(ynvChgType.code.equals(code)){
                return ynvChgType;
            }
        }
        return null;
    }

}
