package com.engine.salary.enums.salaryarchive;

import java.util.Arrays;


public enum IndividualTaxWithholdingAgentStatusEnum {

    UN_VALIDATE(0, "未校验", 85255),
    VALIDATE_SUCCESS(1, "校验成功", 85256),
    VALIDATE_FAIL(2, "校验失败", 85257);

    private int value;

    private String defaultLabel;

    private int labelId;

    IndividualTaxWithholdingAgentStatusEnum(int value, String defaultLabel, int labelId) {
        this.value = value;
        this.defaultLabel = defaultLabel;
        this.labelId = labelId;
    }

    public int getValue() {
        return value;
    }

    public String getDefaultLabel() {
        return defaultLabel;
    }

    public int getLabelId() {
        return labelId;
    }

    public static String getDefaultLabelByValue(Integer value) {
        if (value == null) {
            return "";
        }
        IndividualTaxWithholdingAgentStatusEnum[] enumAry = IndividualTaxWithholdingAgentStatusEnum.values();
        for(int i = 0; i < Arrays.asList(enumAry).size(); i++){
            if (Integer.valueOf(enumAry[i].getValue()).equals(value)) {
                return enumAry[i].getDefaultLabel();
            }
        }
        return "";
    }
}
