提交 | 用户 | 时间
|
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", "最大值"), |
441d30
|
14 |
MIN("MIN", "最小值"), |
J |
15 |
DEFAULT("DEFAULT", "默认值"); |
cf757d
|
16 |
|
潘 |
17 |
private String code; |
|
18 |
private String desc; |
|
19 |
|
|
20 |
public static IndStatFuncEnum getEumByCode(String code) { |
|
21 |
if (code == null) { |
|
22 |
return null; |
|
23 |
} |
|
24 |
|
|
25 |
for (IndStatFuncEnum statusEnum : IndStatFuncEnum.values()) { |
|
26 |
if (statusEnum.getCode().equals(code)) { |
|
27 |
return statusEnum; |
|
28 |
} |
|
29 |
} |
|
30 |
return null; |
|
31 |
} |
|
32 |
} |