| | |
| | | salesLedgerProduct.setApproveStatus(0); |
| | | salesLedgerProduct.setPendingInvoiceTotal(salesLedgerProductImportDto.getTaxInclusiveTotalPrice()); |
| | | salesLedgerProductMapper.insert(salesLedgerProduct); |
| | | // 添加生产数据 |
| | | salesLedgerProductServiceImpl.addProductionData(salesLedgerProduct); |
| | | // 添加生产数据,并处理冻结库存 |
| | | salesLedgerProductServiceImpl.processStockAndProduction(salesLedgerProduct); |
| | | } |
| | | } |
| | | |
| | |
| | | .eq(ShippingInfo::getSalesLedgerProductId, product.getId()) |
| | | .orderByDesc(ShippingInfo::getCreateTime) |
| | | .last("limit 1")); |
| | | product.setShippingCarNumber(shippingInfo.getShippingCarNumber()); |
| | | product.setShippingDate(shippingInfo.getShippingDate()); |
| | | if (shippingInfo != null) { |
| | | product.setShippingStatus(shippingInfo.getStatus()); |
| | | } |
| | |
| | | .collect(Collectors.toList()); |
| | | //删除生产数据 |
| | | salesLedgerProductServiceImpl.deleteProductionData(productIds); |
| | | |
| | | // 还原冻结的物理库存 |
| | | for (Long productId : productIds) { |
| | | salesLedgerProductServiceImpl.revertFrozenStock(productId); |
| | | } |
| | | |
| | | // 批量删除产品子表 |
| | | if (!productIds.isEmpty()) { |
| | |
| | | salesLedgerProduct.setNoInvoiceAmount(salesLedgerProduct.getTaxInclusiveTotalPrice()); |
| | | salesLedgerProduct.setPendingInvoiceTotal(salesLedgerProduct.getTaxInclusiveTotalPrice()); |
| | | salesLedgerProductMapper.insert(salesLedgerProduct); |
| | | // 添加生产数据 |
| | | salesLedgerProductServiceImpl.addProductionData(salesLedgerProduct); |
| | | // 添加生产数据,并处理冻结库存 |
| | | salesLedgerProductServiceImpl.processStockAndProduction(salesLedgerProduct); |
| | | } |
| | | } |
| | | } |