New file |
| | |
| | | package com.zy.asrs.common.domain.enums; |
| | | |
| | | public enum OrderSettleType { |
| | | |
| | | INIT(0, "初始化"), |
| | | PENDING(1, "待处理"), |
| | | WORKING(2, "作业中"), |
| | | CANCEL(3, "已取消"), |
| | | COMPLETE(4, "已完成"), |
| | | PREPARE_CANCEL(5, "准备取消"), |
| | | REPORT_COMPLETE(6, "上报完成") |
| | | ; |
| | | |
| | | private Integer id; |
| | | private String desc; |
| | | |
| | | OrderSettleType(Integer id, String desc) { |
| | | this.id = id; |
| | | this.desc = desc; |
| | | } |
| | | |
| | | public static OrderSettleType get(Integer id) { |
| | | if (null == id) { |
| | | return null; |
| | | } |
| | | for (OrderSettleType type : OrderSettleType.values()) { |
| | | if (type.id.equals(id)) { |
| | | return type; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | public static OrderSettleType get(OrderSettleType type) { |
| | | if (null == type) { |
| | | return null; |
| | | } |
| | | for (OrderSettleType type1 : OrderSettleType.values()) { |
| | | if (type1 == type) { |
| | | return type1; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | } |