package cn.hnthyy.thmz.enums;

import java.util.Arrays;
import java.util.List;

/**
 *  支付状态:1 预交 2 直退 3 结算补交 4 结算退款
 */
public enum ZyDepositFileStatusEnum {
    UNKNOWN ("-1","未知事物"),
    PREPAY("1","预交"),
    STRAIGHT_BACK("2","直退"),
    RESUBMISSIONS("3","结算补交"),
    CLEARING_REFUND("4","结算退款");

    public String code;
    public String name;

    ZyDepositFileStatusEnum(String code, String name){
        this.code=code;
        this.name=name;
    }

    /**
     * 根据编码查询对应的类型
     * @param code
     * @return
     */
    public static ZyDepositFileStatusEnum geteZyDepositFileStatusByCode(String code){
        List<ZyDepositFileStatusEnum> classCodeEnums= Arrays.asList(values());
        for (ZyDepositFileStatusEnum classCode:classCodeEnums){
            if(classCode.code.equals(code)){
                return classCode;
            }
        }
        return UNKNOWN;
    }
}
