| | |
| | | public enum CrnStatusType { |
| | | |
| | | // 入库 |
| | | PUT("入库"), |
| | | MACHINE_PAKIN("入库"), |
| | | // 出库 |
| | | TAKE("出库"), |
| | | MACHINE_PAKOUT("出库"), |
| | | // 库到库 |
| | | STOCK_MOVE("库到库"), |
| | | MACHINE_STOCK_MOVE("库到库"), |
| | | // 站到站 |
| | | SITE_MOVE("站到站"), |
| | | MACHINE_SITE_MOVE("站到站"), |
| | | // p to p |
| | | P_MOVE("PToP"), |
| | | MACHINE_P_MOVE("PToP"), |
| | | // 异常 |
| | | ERROR("异常"), |
| | | MACHINE_ERROR("异常"), |
| | | // 自动 |
| | | AUTO("自动"), |
| | | MACHINE_AUTO("自动"), |
| | | // 非自动/手动 |
| | | UN_AUTO("非自动"), |
| | | MACHINE_UN_AUTO("非自动"), |
| | | ; |
| | | |
| | | private String desc; |
| | |
| | | |
| | | public void setDesc(String desc) { |
| | | this.desc = desc; |
| | | }} |
| | | } |
| | | |
| | | public static CrnStatusType process(Integer ioType){ |
| | | if (ioType>100) { |
| | | return MACHINE_PAKOUT; |
| | | } else if (ioType < 100 && ioType!=3 && ioType!=6 && ioType!=11) { |
| | | return MACHINE_PAKIN; |
| | | } else if (ioType == 3) { |
| | | return MACHINE_SITE_MOVE; |
| | | } else if (ioType == 11) { |
| | | return MACHINE_STOCK_MOVE; |
| | | } else { |
| | | return MACHINE_ERROR; |
| | | } |
| | | } |
| | | |
| | | } |