package com.hz.pm.api.performance.enumration;

import java.util.Objects;

import org.apache.commons.lang3.StringUtils;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * RectifyStatusEnum
 * @return
 * @author CMM
 * @since 2023/07/26 16:44
 */
@Getter
@AllArgsConstructor
@NoArgsConstructor
public enum RectifyStatusEnum {
    /**
     * 整改状态
     */
    TO_BE_SUBMITTED(1, "整改情况待提交"),
    NOT_APPROVED(2, "整改核查不通过"),
    TO_BE_REVIEWED(3, "整改待审核"),
    APPROVED(4,"整改审核通过");


    private Integer code;
    private String desc;

    public static String getDesc(Integer code) {
        if (Objects.isNull(code)) {
            return StringUtils.EMPTY;
        }
        for (RectifyStatusEnum t : RectifyStatusEnum.values()) {
            if (code.equals(t.getCode())) {
                return t.desc;
            }
        }
        return StringUtils.EMPTY;
    }
}
