package com.yd.csf.service.enums;

/**
 * 来佣比对状态枚举
 */
public enum CommissionStatusEnum {

    //来佣比对状态枚举
    WAIT("未比对","0"),
    COMPARE_SUCCESS("比对成功","1"),
    COMPARE_FAIL("比对失败","2"),
    MATCH_FAILED("未查询到预计来佣记录","3");

    ;
    //字典项标签（名称）
    private String itemLabel;
    //字典项值
    private String itemValue;

    //构造函数
    CommissionStatusEnum(String itemLabel, String itemValue) {
        this.itemLabel = itemLabel;
        this.itemValue = itemValue;
    }

    public String getItemLabel() {
        return itemLabel;
    }

    public String getItemValue() {
        return itemValue;
    }

    public static String toLabel(String itemValue) {
        for (CommissionStatusEnum anEnum : CommissionStatusEnum.values()) {
            if (anEnum.itemValue.equals(itemValue)) {
                return anEnum.getItemLabel();
            }
        }
        return "";
    }
}
