| | |
| | | if (drawMaterialDto.getProductModelId() == null) { |
| | | throw new RuntimeException("产品型号ID不能为空"); |
| | | } |
| | | if (drawMaterialDto.getQualitity() == null || drawMaterialDto.getQualitity().compareTo(BigDecimal.ZERO) == 0) { |
| | | throw new RuntimeException("产品" + drawMaterialDto.getProductName() + "型号" + drawMaterialDto.getModel() |
| | | + "批号" + drawMaterialDto.getBatchNo() + "库存不足!"); |
| | | } |
| | | stockUtils.substractStock(drawMaterialDto.getProductModelId(), drawMaterialDto.getRequisitionQty(), |
| | | StockOutQualifiedRecordTypeEnum.DRAW_MATERIALS_STOCK_OUT.getCode(), productOrderDto.getId(), |
| | | drawMaterialDto.getBatchNo(),drawMaterialDto.getCustomer()); |