houzhongjian
2024-11-07 a874b928e16320839315b9abcdf2cece1229a424
提交 | 用户 | 时间
dc2e04 1 package com.iailab.module.data.enums;
2
3 import lombok.AllArgsConstructor;
4 import lombok.Getter;
5
6 /**
9695d7 7  * 测点频率类型
dc2e04 8  */
9 @Getter
10 @AllArgsConstructor
9695d7 11 public enum DataPointFreq {
dc2e04 12     NET10("NET10", 10),
13     NET30("NET30", 30),
14     NET60("NET60",60);
15
16     private String code;
17
18     private Integer value;
19
9695d7 20     public static DataPointFreq getEumByCode(String code) {
dc2e04 21         if (code == null) {
22             return null;
23         }
24
9695d7 25         for (DataPointFreq statusEnum : DataPointFreq.values()) {
dc2e04 26             if (statusEnum.getCode().equals(code)) {
27                 return statusEnum;
28             }
29         }
30         return null;
31     }
32 }