| | |
| | | |
| | | TYPE_1(1, "1型"), |
| | | TYPE_2(2, "2型"), |
| | | SCRAP(3, "废品"); |
| | | SCRAP(3, "废品"), |
| | | TYPE_3(4, "3型"), |
| | | EXCELLENT(5, "优等品"), |
| | | QUALIFIED(6, "合格品"), |
| | | UNQUALIFIED(7, "不合格品"); |
| | | |
| | | public static final Integer[] ARRAYS = Arrays.stream(values()).map(MesQcOqcCheckResultEnum::getType).toArray(Integer[]::new); |
| | | |
| | |
| | | /** |
| | | * 判断是否可以放行发货 |
| | | * |
| | | * <p>1 型、2 型均为可发货等级,仅废品不放行</p> |
| | | * <p>废品、不合格品不放行,其余等级(1 型、2 型、3 型、优等品、合格品)均可发货</p> |
| | | * |
| | | * @param type 检测结果 |
| | | * @return true 可以放行 |
| | | */ |
| | | public static boolean canShip(Integer type) { |
| | | return type != null && !SCRAP.getType().equals(type); |
| | | return type != null |
| | | && !SCRAP.getType().equals(type) |
| | | && !UNQUALIFIED.getType().equals(type); |
| | | } |
| | | |
| | | } |