package com.dxhy.domestic.constants;

import lombok.AllArgsConstructor;

/**
 * @author dxhy
 */
@AllArgsConstructor
public enum InvoiceStatusEnum {
    // 发票状态0-正常 1-失控 2-作废 3-红冲 4-异常

    A("0", "正常"), B("1", "失控"), C("2", "作废"), D("3", "红冲"), E("4", "异常");

    private final String key;
    private final String value;

    public static String getVal(String key) {
        for (InvoiceStatusEnum materialEnum : InvoiceStatusEnum.values()) {
            if (materialEnum.key.equals(key)) {
                return materialEnum.value;
            }
        }
        return null;
    }
}
