package com.iailab.module.data.enums; import lombok.AllArgsConstructor; import lombok.Getter; /** * 测点频率类型 */ @Getter @AllArgsConstructor public enum DataPointFreqEnum { NET_10S("10s", 10), NET_30S("30s", 30), NET_1MIN("1min",60); private String code; private Integer value; public static DataPointFreqEnum getEumByCode(String code) { if (code == null) { return null; } for (DataPointFreqEnum statusEnum : DataPointFreqEnum.values()) { if (statusEnum.getCode().equals(code)) { return statusEnum; } } return null; } }