package com.njcn.gather.device.pojo.enums;

import lombok.Getter;

/**
 * @author caozehui
 * @data 2024-12-12
 */
@Getter
public enum CheckStateEnum {
    UNCHECKED("未检", 0),
    CHECKING("检测中", 1),
    CHECKED("检测完成", 2),
    /**
     * 检测计划没有归档状态，只有未检、检测中、检测完成三种状态。被检设备有归档状态
     */
    DOCUMENTED("归档", 3);

    private final Integer value;
    private final String msg;

    CheckStateEnum(String msg, Integer value) {
        this.msg = msg;
        this.value = value;
    }

    public static String getMsgByValue(Integer value) {
        for (CheckStateEnum state : CheckStateEnum.values()) {
            if (state.getValue().equals(value)) {
                return state.getMsg();
            }
        }
        return null;
    }
}
