| | |
| | | |
| | | IDLE(0, "空闲"), |
| | | MOVING(1, "开门"), |
| | | SOS(2, "硫化中"), |
| | | SOS(2, "关门"), |
| | | WAITING1(3, "开门"), |
| | | WAITING2(4, "硫化完成"), |
| | | WAITING3(5, "门打开中"), |
| | | WAITING4(6, "门打开中"), |
| | | WAITING5(7, "门关闭中"), |
| | | OFF_LINE(8, "门关闭中"), |
| | | SOS2(9, "保温中"), |
| | | OTHER(100, "其它"), |
| | | ; |
| | | |
| | |
| | | |
| | | public static JarStatusType get(Short id) { |
| | | if (null == id) { |
| | | return null; |
| | | return OTHER; |
| | | } |
| | | for (JarStatusType type : JarStatusType.values()) { |
| | | if (type.id.equals(id.intValue())) { |
| | | return type; |
| | | } |
| | | } |
| | | return OFF_LINE; |
| | | return OTHER; |
| | | } |
| | | |
| | | public static JarStatusType get(JarStatusType type) { |
| | | if (null == type) { |
| | | return null; |
| | | return OTHER; |
| | | } |
| | | for (JarStatusType jarStatusType : JarStatusType.values()) { |
| | | if (jarStatusType == type) { |
| | | return jarStatusType; |
| | | } |
| | | } |
| | | return null; |
| | | return OTHER; |
| | | } |
| | | } |