From bb5bf872de5e67d7b406e3a305c9dfcbd0f218a6 Mon Sep 17 00:00:00 2001 From: liding <756868258@qq.com> Date: 星期四, 26 六月 2025 18:03:55 +0800 Subject: [PATCH] 采购,正式库优化 --- main-business/src/main/java/com/ruoyi/business/service/impl/PendingInventoryServiceImpl.java | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/main-business/src/main/java/com/ruoyi/business/service/impl/PendingInventoryServiceImpl.java b/main-business/src/main/java/com/ruoyi/business/service/impl/PendingInventoryServiceImpl.java index 5e340eb..412e7bb 100644 --- a/main-business/src/main/java/com/ruoyi/business/service/impl/PendingInventoryServiceImpl.java +++ b/main-business/src/main/java/com/ruoyi/business/service/impl/PendingInventoryServiceImpl.java @@ -233,6 +233,7 @@ BigDecimal left = pendingInventory.getInventoryQuantity().subtract(quantity); if (left.compareTo(BigDecimal.ZERO) > 0) { pendingInventory.setInventoryQuantity(left); + pendingInventory.setCoalPlanId(pendingInventoryDto.getCoalPlanId()); pendingInventoryMapper.updateById(pendingInventory); } else { pendingInventoryMapper.deleteById(pendingInventoryDto.getPId()); @@ -242,8 +243,11 @@ OfficialInventory officialInventory = new OfficialInventory(); BeanUtils.copyProperties(pendingInventory, officialInventory); officialInventory.setId(null); + officialInventory.setCoalPlanId(pendingInventoryDto.getCoalPlanId()); officialInventory.setPendingId(pendingInventoryDto.getPId()); officialInventory.setInventoryQuantity(quantity); + officialInventory.setRegistrantId(1L); + officialInventory.setSupplierId(pendingInventoryDto.getSupplierId()); officialInventoryMapper.insert(officialInventory); } else { OfficialInventory officialInventory = officialInventoryMapper.selectById(pendingInventoryDto.getOfficialId()); -- Gitblit v1.9.3