package com.sundot.airport.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 巡检大屏:问题整改单状态枚举
 */
@Getter
@AllArgsConstructor
public enum CheckLargeScreenCorrectionTypeEnum {

    ON_TIME_COMPLETED("ON_TIME_COMPLETED", "按期已完成"),
    OVER_TIME_COMPLETED("OVER_TIME_COMPLETED", "超期已完成"),
    ON_TIME_UNFINISHED("ON_TIME_UNFINISHED", "按期整改中"),
    OVER_TIME_UNFINISHED("OVER_TIME_UNFINISHED", "超期整改中"),
    OTHER("OTHER", "其他");

    private final String code;
    private final String desc;

    public static CheckLargeScreenCorrectionTypeEnum getByCode(String code) {
        for (CheckLargeScreenCorrectionTypeEnum itemEnum : values()) {
            if (itemEnum.getCode().equals(code)) {
                return itemEnum;
            }
        }
        return null;
    }

}
