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
55
56
57
58
59
60
61
62
63
| package com.zy.common.model.enums;
|
| import java.util.ArrayList;
| import java.util.List;
|
| public enum NavigationMapType {
|
| NONE(-1, "无过滤"),
| DFX(1, "地图携带库位状态DFX"),
| NORMAL(2, "地图携带库位状态X"),
| SHUTTLE(3, "地图携带小车"),
| LIFT(4, "地图携带提升机"),
| ;
|
| public Integer id;
| public String desc;
|
| NavigationMapType(Integer id, String desc) {
| this.id = id;
| this.desc = desc;
| }
|
| public static NavigationMapType get(Short id) {
| if (null == id) {
| return null;
| }
| for (NavigationMapType type : NavigationMapType.values()) {
| if (type.id.equals(id.intValue())) {
| return type;
| }
| }
| return null;
| }
|
| public static NavigationMapType get(NavigationMapType type) {
| if (null == type) {
| return null;
| }
| for (NavigationMapType type1 : NavigationMapType.values()) {
| if (type1 == type) {
| return type1;
| }
| }
| return null;
| }
|
| public static List<NavigationMapType> getDfxWithDevice() {
| return getMapTypes(DFX, SHUTTLE, LIFT);
| }
|
| public static List<NavigationMapType> getNormalWithDevice() {
| return getMapTypes(NORMAL, SHUTTLE, LIFT);
| }
|
| public static List<NavigationMapType> getMapTypes(NavigationMapType... types) {
| List<NavigationMapType> mapTypes = new ArrayList<>();
| for (NavigationMapType type : types) {
| mapTypes.add(type);
| }
| return mapTypes;
| }
|
| }
|
|