From 92d4fac0b58498efc6be7764f00364535beb3d71 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期二, 08 七月 2025 18:02:00 +0800
Subject: [PATCH] 1.首页数据 2.装备数据

---
 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