package com.sundot.airport.common.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * 质控分析报告比较枚举
 **/
@Getter
@AllArgsConstructor
public enum CompareResultTypeEnum {
    RISE("RISE", "上升"),
    DECLINE("DECLINE", "下降"),
    FLAT("FLAT", "持平");

    private final String code;
    private final String desc;

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

}
