| | |
| | | /** |
| | | * MES 销售出库单行 Service 实现类 |
| | | * |
| | | * @author 芋道源码 |
| | | * @author 超级管理员 |
| | | */ |
| | | @Service |
| | | @Validated |
| | |
| | | } |
| | | MesWmSalesNoticeLineDO noticeLine = salesNoticeLineService.validateSalesNoticeLineExists( |
| | | noticeLineId, sales.getNoticeId()); |
| | | // 校验关键字段一致性:物料、数量、批次号、OQC 检验标识 |
| | | // 校验关键字段一致性:物料、数量、批次号 |
| | | // 注:OQC 检验标识允许在出库时独立设置,不强制与通知单一致 |
| | | if (ObjUtil.notEqual(reqVO.getItemId(), noticeLine.getItemId())) { |
| | | throw exception(WM_PRODUCT_SALES_LINE_NOTICE_LINE_ITEM_MISMATCH); |
| | | } |
| | |
| | | if (StrUtil.isNotBlank(noticeLine.getBatchCode()) |
| | | && ObjUtil.notEqual(reqVO.getBatchCode(), noticeLine.getBatchCode())) { |
| | | throw exception(WM_PRODUCT_SALES_LINE_NOTICE_LINE_BATCH_MISMATCH); |
| | | } |
| | | if (noticeLine.getOqcCheckFlag() != null |
| | | && ObjUtil.notEqual(reqVO.getOqcCheckFlag(), noticeLine.getOqcCheckFlag())) { |
| | | throw exception(WM_PRODUCT_SALES_LINE_NOTICE_LINE_OQC_MISMATCH); |
| | | } |
| | | return; |
| | | } |