package com.hfkj.sysenum.gas;

import lombok.Getter;

import java.util.Objects;

/**
 * 加油站价格任务
 * @author hurui
 */
@Getter
public enum GasOrderReceiptStatusEnum {
    /**
     * 未开票
     */
    status0(0 , "未开票", ""),
    /**
     * 待处理
     */
    status1(1 , "处理中", "待处理"),
    /**
     * 开票成功
     */
    status2(2 , "开票成功", "开票成功"),
    /**
     * 开票失败
     */
    status3(3 , "开票失败", "开票失败"),
    /**
     * 删除
     */
    status99(99 , "删除", "删除"),
    ;

    private Integer status;
    private String userName;
    private String manageName;

    GasOrderReceiptStatusEnum(int status, String userName, String manageName) {
        this.status = status;
        this.userName = userName;
        this.manageName = manageName;
    }

    public static GasOrderReceiptStatusEnum getNameByType(Integer type) {
        for (GasOrderReceiptStatusEnum ele : values()) {
            if (Objects.equals(type,ele.getStatus())) {
                return ele;
            }
        }
        return null;
    }

}
