提交 | 用户 | 时间
|
7e21bc
|
1 |
package com.iailab.module.pms.coalquality.common.enums; |
J |
2 |
|
|
3 |
import lombok.AllArgsConstructor; |
|
4 |
import lombok.Getter; |
|
5 |
|
|
6 |
/** |
|
7 |
* @author PanZhibao |
|
8 |
* @Description |
|
9 |
* @createTime 2023年09月15日 13:44:00 |
|
10 |
*/ |
|
11 |
@Getter |
|
12 |
@AllArgsConstructor |
|
13 |
public enum FcfaType { |
|
14 |
FULL("full", "全级"), |
|
15 |
THREE("three", "三级"); |
|
16 |
private String code; |
|
17 |
private String desc; |
|
18 |
|
|
19 |
public static FcfaType getEumByCode(String code) { |
|
20 |
if (code == null) { |
|
21 |
return null; |
|
22 |
} |
|
23 |
|
|
24 |
for (FcfaType statusEnum : FcfaType.values()) { |
|
25 |
if (statusEnum.getCode().equals(code)) { |
|
26 |
return statusEnum; |
|
27 |
} |
|
28 |
} |
|
29 |
return null; |
|
30 |
} |
|
31 |
} |