buhuazhen
5 小时以前 5fe16f8eddfddd2b70003c401faa1b19e9d8433c
src/main/java/com/ruoyi/production/service/impl/ProductionProductMainServiceImpl.java
@@ -207,12 +207,7 @@
            }
            productOrderMapper.updateById(productOrder);
        }
        //如果报废数量>0,需要进入报废的库存
        if (ObjectUtils.isNotEmpty(dto.getScrapQty())) {
            if (dto.getScrapQty().compareTo(BigDecimal.ZERO) > 0) {
                stockUtils.addUnStock(productModel.getId(), dto.getScrapQty(), StockInUnQualifiedRecordTypeEnum.PRODUCTION_SCRAP.getCode(), productionProductMain.getId());
            }
        }
        //nextAddProductMain(productionProductOutput) // 由于需要审核,所以需要拆封下来
        return true;
    }
@@ -366,6 +361,13 @@
                    .build();
            salesLedgerProductionAccountingMapper.insert(salesLedgerProductionAccounting);
        }
        //如果报废数量>0,需要进入报废的库存
        if (ObjectUtils.isNotEmpty(productionProductOutput.getScrapQty())) {
            if (productionProductOutput.getScrapQty().compareTo(BigDecimal.ZERO) > 0) {
                stockUtils.addUnStock(productModel.getId(), productionProductOutput.getScrapQty(), StockInUnQualifiedRecordTypeEnum.PRODUCTION_SCRAP.getCode(), productionProductMain.getId());
            }
        }
    }
    @Override