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
  | package com.zy.core.enums; 
 |    
 |  /** 
 |   * 四向穿梭车内部状态枚举 
 |   */ 
 |  public enum ShuttleProtocolStatusType { 
 |    
 |      IDLE(1, "空闲"), 
 |      WORKING(2, "作业中"), 
 |      WAITING(3, "等待确认"), 
 |      CHARGING(4, "充电中"), 
 |      CHARGING_WAITING(5, "充电任务等待确认"), 
 |      FIXING(6, "故障修复中"), 
 |      OFFLINE(7, "离线"), 
 |      ; 
 |    
 |      public Integer id; 
 |      public String desc; 
 |    
 |      ShuttleProtocolStatusType(Integer id, String desc) { 
 |          this.id = id; 
 |          this.desc = desc; 
 |      } 
 |    
 |      public static ShuttleProtocolStatusType get(Integer id) { 
 |          if (null == id) { 
 |              return null; 
 |          } 
 |          for (ShuttleProtocolStatusType type : ShuttleProtocolStatusType.values()) { 
 |              if (type.id.equals(id.intValue())) { 
 |                  return type; 
 |              } 
 |          } 
 |          return null; 
 |      } 
 |    
 |      public static ShuttleProtocolStatusType get(ShuttleProtocolStatusType type) { 
 |          if (null == type) { 
 |              return null; 
 |          } 
 |          for (ShuttleProtocolStatusType type2 : ShuttleProtocolStatusType.values()) { 
 |              if (type2 == type) { 
 |                  return type2; 
 |              } 
 |          } 
 |          return null; 
 |      } 
 |    
 |  } 
 |  
  |