gongchunyi
11 小时以前 a9d2ef88a2ac9cdc0b07e98e9c3a8ba621cfb1d8
src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java
@@ -437,8 +437,8 @@
                    salesLedgerProduct.setApproveStatus(0);
                    salesLedgerProduct.setPendingInvoiceTotal(salesLedgerProductImportDto.getTaxInclusiveTotalPrice());
                    salesLedgerProductMapper.insert(salesLedgerProduct);
                    // 添加生产数据
                    salesLedgerProductServiceImpl.addProductionData(salesLedgerProduct);
                    // 添加生产数据,并处理冻结库存
                    salesLedgerProductServiceImpl.processStockAndProduction(salesLedgerProduct);
                }
            }
@@ -539,6 +539,11 @@
                .collect(Collectors.toList());
        //删除生产数据
        salesLedgerProductServiceImpl.deleteProductionData(productIds);
        // 还原冻结的物理库存
        for (Long productId : productIds) {
            salesLedgerProductServiceImpl.revertFrozenStock(productId);
        }
        // 批量删除产品子表
        if (!productIds.isEmpty()) {
@@ -737,8 +742,8 @@
                salesLedgerProduct.setNoInvoiceAmount(salesLedgerProduct.getTaxInclusiveTotalPrice());
                salesLedgerProduct.setPendingInvoiceTotal(salesLedgerProduct.getTaxInclusiveTotalPrice());
                salesLedgerProductMapper.insert(salesLedgerProduct);
                // 添加生产数据
                salesLedgerProductServiceImpl.addProductionData(salesLedgerProduct);
                // 添加生产数据,并处理冻结库存
                salesLedgerProductServiceImpl.processStockAndProduction(salesLedgerProduct);
            }
        }
    }