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
| package com.zy.core.enums.DevpType;
|
| public enum DevpLocType {
|
| NONE(0,"离线"),
| LOW(1,"低库位"),
| MIDDLE(2,"中库位"),
| HIGH(3,"高库位");
|
| public Integer id;
| public String desc;
| DevpLocType(Integer id, String desc) {
| this.id = id;
| this.desc = desc;
| }
|
| public static DevpLocType get(Short id) {
| if (null == id) {
| return null;
| }
| for (DevpLocType type : DevpLocType.values()) {
| if (type.id.equals(id.intValue())) {
| return type;
| }
| }
| return NONE;
| }
|
| public static DevpLocType get(DevpLocType type) {
| if (null == type) {
| return null;
| }
| for (DevpLocType devpLocType : DevpLocType.values()) {
| if (devpLocType == type) {
| return devpLocType;
| }
| }
| return null;
| }
| }
|
|