提交 | 用户 | 时间
|
cf757d
|
1 |
package com.iailab.module.data.common.enums; |
潘 |
2 |
|
|
3 |
import lombok.AllArgsConstructor; |
|
4 |
import lombok.Getter; |
|
5 |
|
|
6 |
@Getter |
|
7 |
@AllArgsConstructor |
|
8 |
public enum IndStatFuncEnum { |
|
9 |
|
|
10 |
SUM("SUM", "求和"), |
|
11 |
COUNT("COUNT", "计数"), |
|
12 |
AVG("AVG", "平均值"), |
|
13 |
MAX("MAX", "最大值"), |
|
14 |
MIN("MIN", "最小值"); |
|
15 |
|
|
16 |
private String code; |
|
17 |
private String desc; |
|
18 |
|
|
19 |
public static IndStatFuncEnum getEumByCode(String code) { |
|
20 |
if (code == null) { |
|
21 |
return null; |
|
22 |
} |
|
23 |
|
|
24 |
for (IndStatFuncEnum statusEnum : IndStatFuncEnum.values()) { |
|
25 |
if (statusEnum.getCode().equals(code)) { |
|
26 |
return statusEnum; |
|
27 |
} |
|
28 |
} |
|
29 |
return null; |
|
30 |
} |
|
31 |
} |