1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
| package com.zy.core.enums;
|
| import com.core.common.Cools;
|
| public enum ShuttleChargeType {
|
| CHARGE_1(1, "1402001"),
| CHARGE_2(2, "1402002"),
| CHARGE_3(3, "1402003"),
| CHARGE_4(4, "1402004"),
| CHARGE_5(5, "1402005"),
| CHARGE_6(6, "1402006"),
| CHARGE_7(7, "1402007"),
| CHARGE_8(8, "1302008"),
| CHARGE_9(9, "1302009"),
| CHARGE_10(10, "1302010")
| ;
|
| ShuttleChargeType(int id, String locNo) {
| this.id = id;
| this.locNo = locNo;
| }
|
| public int id;
|
| public String locNo;
|
| public static ShuttleChargeType get(String locNo) {
| if (Cools.isEmpty(locNo)) {
| return null;
| }
| ShuttleChargeType[] values = ShuttleChargeType.values();
| for (ShuttleChargeType value : values) {
| if (value.locNo.equals(locNo)) {
| return value;
| }
| }
| return null;
| }
|
| public static ShuttleChargeType get(int id) {
| if (Cools.isEmpty(id)) {
| return null;
| }
| ShuttleChargeType[] values = ShuttleChargeType.values();
| for (ShuttleChargeType value : values) {
| if (value.id == id) {
| return value;
| }
| }
| return null;
| }
|
| }
|
|