| | |
| | | HALF_AUTO(2, "半自动"), |
| | | HAND(1, "手动"), |
| | | STOP(4, "维修"), |
| | | OTHER(100, "其他"), |
| | | ; |
| | | |
| | | public Integer id; |
| | |
| | | |
| | | public static CrnModeType get(Short id) { |
| | | if (null == id) { |
| | | return null; |
| | | return OTHER; |
| | | } |
| | | for (CrnModeType type : CrnModeType.values()) { |
| | | if (type.id.equals(id.intValue())) { |
| | | return type; |
| | | } |
| | | } |
| | | return null; |
| | | return OTHER; |
| | | } |
| | | |
| | | public static CrnModeType get(CrnModeType type) { |
| | | if (null == type) { |
| | | return null; |
| | | return OTHER; |
| | | } |
| | | for (CrnModeType crnModeType : CrnModeType.values()) { |
| | | if (crnModeType == type) { |
| | | return crnModeType; |
| | | } |
| | | } |
| | | return null; |
| | | return OTHER; |
| | | } |
| | | } |