package com.qunzhixinxi.hnqz.admin.enums;

import lombok.Getter;

/**
 * 结算状态
 *
 * @author lixuesong
 * @date 2021年07月12日 16:59
 */
@Getter
public enum SettleStatusEnum {

	// 结算状态
	SETTLE_STATUS_NOTSETTLE("0", "", "未结算"),
	SETTLE_STATUS_SUCCESS("1", "结算成功", "结算成功"),
	SETTLE_STATUS_FAIL("2", "结算失败", "结算失败"),
	SETTLE_STATUS_SUBMIT("3", "已提交", "已提交结算"),
	SETTLE_STATUS_NO("4", "未结算", ""),
	SETTLE_STATUS_PART("5", "部分成功", ""),
	SETTLE_STATUS_WAIT("9", "待结算", "申请结算"),
	SETTLE_STATUS_NULL("", "", "");

	private String val;

	private String name;

	private String name2;

	SettleStatusEnum(String val, String name, String name2) {
		this.val = val;
		this.name = name;
		this.name2 = name2;
	}

	public static SettleStatusEnum resolve(String val){
		for (SettleStatusEnum settleStatusEnum: SettleStatusEnum.values()){
			if (settleStatusEnum.val.equals(val)){
				return settleStatusEnum;
			}
		}
		return SETTLE_STATUS_NULL;
	}
}
