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