package com.casic.missiles.enums.business;

/**
 * @Description: 检测/校准参数代码枚举类 用于生成证书报告前缀
 * 无线电
 * 光学
 * 时间频率
 * 电磁学
 * 几何量
 * 热学
 * 力学
 * 环境试验
 * 电磁兼容
 * 医疗器械
 * 理化分析
 * 电力系统
 * @Author: zt
 * @Date: 2023/2/18 14:40
 */
public enum MonitorCodeEnum {
    WIRELESS("1", "RIM"),
    OPTICS("2", "TOE"),
    TIME_FREQUENCY("3", "TTF"),
    EMC("4", "DMS"),
    GEOMETRY("5", "JHL"),
    HEAT("6", "RXZ"),
    DYNAMICS("7", "LXZ"),
    ENVIRONMENT_TEST("8", "TET"),
    DCJR("9", "EMC"),
    YLQX("10", "DCJ"),
    LHFX("11", "LHF"),
    DLXT("12", "DLX");

    private String code;
    private String value;

    MonitorCodeEnum(String code, String value) {
        this.code = code;
        this.value = value;
    }


    public static MonitorCodeEnum getByCode(String code) {
        try {
            for (MonitorCodeEnum temp : values()) {
                if (temp.code.equals(code)) {
                    return temp;
                }
            }
        } catch (Exception e) {
        }
        return null;
    }

    public String getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }
}
