package com.hzya.frame.cbs8.util;

/**
 * @Author:hecan
 * @Description:支付类型(支付状态)
 * @params:
 * @return:
 * @Date: 2023/3/14 15:05
 */
public enum PayState {
    a("a","待提交直联"),
    b("b","已提交直联"),
    c("c","银行已受理"),
    d("d","银行未受理"),
    e("e","可疑"),
    f("f","待人工确认"),
    g("g","支付成功"),
    h("h","支付失败"),
    i("i","部分成功"),
    j("j","退票"),
    k("k","取消支付"),
    n("n","其他"),
    p("p","支付中"),
    q("q","待支付"),
    one("1","待处理"),
    two("2","审批中"),
    three("3","处理失败"),
    four("4","审批完成"),
    five("5","审批撤销"),
    six("6","审批拒绝"),
    seven("7","待发送审批"),
    eight("8","集中受理中"),
    nine("9","审批退回"),
    ten("10","预处理中"),
    eleven("11","预处理拒绝"),
    twelve("12","资金监控审批中");


    //类型
    private String type;
    //值
    private String value;

    PayState(String type, String value){
        this.type=type;
        this.value=value;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getValue() {
        return value;
    }

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

    public static String payStateGetValue(String type){
        for (PayState payState : PayState.values()){
            if(payState.getType()==type||payState.getType().equals(type)){
                return payState.getValue().toString();
            }
        }
        return null;
    }
}
