| | |
| | | |
| | | /** |
| | | * MES 检测结果枚举 |
| | | * |
| | | * @author 芋道源码 |
| | | */ |
| | | @Getter |
| | | @AllArgsConstructor |
| | | public enum MesQcCheckResultEnum implements ArrayValuable<Integer> { |
| | | |
| | | PASS(1, "检验通过"), |
| | | FAIL(2, "检验不通过"); |
| | | QUALIFIED(1, "合格"), |
| | | SPECIAL_APPROVAL(2, "特采"), |
| | | RETURN(3, "不合格退货"), |
| | | SCRAP(4, "不合格报废"); |
| | | |
| | | public static final Integer[] ARRAYS = Arrays.stream(values()).map(MesQcCheckResultEnum::getType).toArray(Integer[]::new); |
| | | |
| | |
| | | return ARRAYS; |
| | | } |
| | | |
| | | /** |
| | | * 判断是否可以入库 |
| | | * |
| | | * @param type 检测结果 |
| | | * @return true 可以入库 |
| | | */ |
| | | public static boolean canInbound(Integer type) { |
| | | return QUALIFIED.getType().equals(type) || SPECIAL_APPROVAL.getType().equals(type); |
| | | } |
| | | |
| | | } |