From 8c627df4abacbe7397d0c1831f1a71c62ebe15b2 Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期三, 15 十月 2025 10:45:33 +0800
Subject: [PATCH] yys 1.随机排产
---
main-business/src/main/java/com/ruoyi/business/service/impl/PendingInventoryServiceImpl.java | 8 ++++++--
1 files changed, 6 insertions(+), 2 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 1e6c5ad..3587979 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
@@ -19,6 +19,7 @@
import com.ruoyi.basic.service.CoalFieldService;
import com.ruoyi.basic.service.CoalPlanService;
import com.ruoyi.basic.service.CoalValueService;
+import com.ruoyi.business.constant.InventoryRecordConstant;
import com.ruoyi.business.dto.PendingInventoryDto;
import com.ruoyi.business.entity.OfficialInventory;
import com.ruoyi.business.entity.PendingInventory;
@@ -285,12 +286,15 @@
if (pendingInventoryDto.getOfficialId() == null) {
OfficialInventory officialInventory = new OfficialInventory();
BeanUtils.copyProperties(pendingInventory, officialInventory);
+ officialInventory.setPurchaseNumber(pendingInventory.getPurchaseNumber());
officialInventory.setId(null);
officialInventory.setCoalPlanId(pendingInventoryDto.getCoalPlanId());
officialInventory.setPendingId(pendingInventoryDto.getPId());
officialInventory.setInventoryQuantity(quantity);
officialInventory.setRegistrantId(1L);
+ officialInventory.setType(pendingInventory.getType());
officialInventory.setSupplierId(pendingInventoryDto.getSupplierId());
+ officialInventory.setCode(pendingInventory.getCode());
officialInventoryMapper.insert(officialInventory);
} else {
OfficialInventory officialInventory = officialInventoryMapper.selectById(pendingInventoryDto.getOfficialId());
@@ -316,7 +320,7 @@
// 2. 鍑嗗寰呭叆搴撹褰�
Long userId = SecurityUtils.getUserId();
PendingInventory pendingInventory = new PendingInventory();
- pendingInventory.setUnit("t");
+ pendingInventory.setUnit("鍚�");
pendingInventory.setRegistrantId(userId);
pendingInventory.setRegistrationDate(LocalDate.now());
pendingInventory.setSupplierName("閰嶇叅璁$畻鍣ㄦ柟妗堝叆搴�");
@@ -352,7 +356,7 @@
// 5. 璁剧疆浠锋牸鍜屾暟閲�
BigDecimal cost = safeGetBigDecimal(map, "cost");
- BigDecimal tonnage = safeGetBigDecimal(map, "totalTonnage");
+ BigDecimal tonnage = safeGetBigDecimal(map, "createCoalQuantity");
if (cost == null || tonnage == null) {
throw new BaseException("鎴愭湰鎴栧惃浣嶄笉鑳戒负绌�");
--
Gitblit v1.9.3