From 78e8144e8713af9e6b3aa14ff1f8b4091d698616 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期五, 24 四月 2026 14:25:13 +0800
Subject: [PATCH] feat: 产品维护导出功能
---
src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java b/src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java
index 570b2f5..38c4b12 100644
--- a/src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java
+++ b/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);
}
}
@@ -479,6 +479,8 @@
.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());
}
@@ -537,6 +539,11 @@
.collect(Collectors.toList());
//鍒犻櫎鐢熶骇鏁版嵁
salesLedgerProductServiceImpl.deleteProductionData(productIds);
+
+ // 杩樺師鍐荤粨鐨勭墿鐞嗗簱瀛�
+ for (Long productId : productIds) {
+ salesLedgerProductServiceImpl.revertFrozenStock(productId);
+ }
// 鎵归噺鍒犻櫎浜у搧瀛愯〃
if (!productIds.isEmpty()) {
@@ -735,8 +742,8 @@
salesLedgerProduct.setNoInvoiceAmount(salesLedgerProduct.getTaxInclusiveTotalPrice());
salesLedgerProduct.setPendingInvoiceTotal(salesLedgerProduct.getTaxInclusiveTotalPrice());
salesLedgerProductMapper.insert(salesLedgerProduct);
- // 娣诲姞鐢熶骇鏁版嵁
- salesLedgerProductServiceImpl.addProductionData(salesLedgerProduct);
+ // 娣诲姞鐢熶骇鏁版嵁锛屽苟澶勭悊鍐荤粨搴撳瓨
+ salesLedgerProductServiceImpl.processStockAndProduction(salesLedgerProduct);
}
}
}
--
Gitblit v1.9.3