package com.yeejoin.amos.boot.module.jxiop.api.Enum;


import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum AlarmDesc {
    ZXYGZ("运行","正常运行"),
    FXYGZ("停机","正常停机"),
    ZXWGZ("限额运行","限功率"),
    FXWGZ("降额运行","限电停机"),
    ZGXWG("告警运行","告警运行"),
    ZZXYG("故障停机","故障停机"),
    ZRXWG("待机","待机状态"),
    ZFXYG("通讯故障","通讯中断");



    private String name;
    private String code;

    public static String getCode(String name) {

        for (AlarmDesc electricQuantity : AlarmDesc.values())
        {
            if (electricQuantity.getName().equals(name))
            {
                return electricQuantity.getCode();
            }
        }
        return null;
    }

}
