From 13fd47c5aa585b74bfc8b77722bde3f7a2399587 Mon Sep 17 00:00:00 2001
From: zss <zss@example.com>
Date: 星期四, 21 五月 2026 10:26:42 +0800
Subject: [PATCH] refactor(invoice): 删除invoice_registration invoice_registration_product invoice_ledger invoice_ledger_file
---
src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java | 33 +--------------------------------
1 files changed, 1 insertions(+), 32 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 3872bdf..1d46da8 100644
--- a/src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java
+++ b/src/main/java/com/ruoyi/sales/service/impl/SalesLedgerServiceImpl.java
@@ -88,9 +88,6 @@
private final ShippingInfoServiceImpl shippingInfoServiceImpl;
private final CommonFileServiceImpl commonFileService;
private final ShippingInfoMapper shippingInfoMapper;
- private final InvoiceLedgerMapper invoiceLedgerMapper;
- private final InvoiceRegistrationProductMapper invoiceRegistrationProductMapper;
- private final InvoiceRegistrationMapper invoiceRegistrationMapper;
private final ProductionProductMainMapper productionProductMainMapper;
private final ProductionProductOutputMapper productionProductOutputMapper;
private final ProductionProductInputMapper productionProductInputMapper;
@@ -294,24 +291,12 @@
.filter(Objects::nonNull)
.reduce(BigDecimal.ZERO, BigDecimal::add);
- // 寮�绁ㄩ噾棰�
- LambdaQueryWrapper<InvoiceLedger> invoiceLedgerQuery = new LambdaQueryWrapper<>();
- invoiceLedgerQuery
- .ge(InvoiceLedger::getCreateTime, startTime)
- .le(InvoiceLedger::getCreateTime, endTime);
- List<InvoiceLedger> invoiceLedgers =
- invoiceLedgerMapper.selectList(invoiceLedgerQuery);
-
- BigDecimal invoiceAmount = invoiceLedgers.stream()
- .map(InvoiceLedger::getInvoiceTotal)
- .filter(Objects::nonNull)
- .reduce(BigDecimal.ZERO, BigDecimal::add);
MonthlyAmountDto dto = new MonthlyAmountDto();
dto.setMonth(yearMonth.format(DateTimeFormatter.ofPattern("yyyy-MM")));
dto.setReceiptAmount(receiptAmount);
- dto.setInvoiceAmount(invoiceAmount);
+ dto.setInvoiceAmount(BigDecimal.ZERO);
result.add(dto);
}
@@ -533,23 +518,7 @@
salesLedgerProductMapper.deleteBatchIds(productIds);
}
- LambdaQueryWrapper<InvoiceRegistrationProduct> wrapper = new LambdaQueryWrapper<>();
- wrapper.in(InvoiceRegistrationProduct::getSalesLedgerId, idList);
- List<InvoiceRegistrationProduct> invoiceRegistrationProducts = invoiceRegistrationProductMapper.selectList(wrapper);
List<Integer> invoiceLedgerIds = new ArrayList<>();
- if (CollectionUtils.isNotEmpty(invoiceRegistrationProducts)) {
- LambdaQueryWrapper<InvoiceLedger> wrapperOne = new LambdaQueryWrapper<>();
- wrapperOne.in(InvoiceLedger::getInvoiceRegistrationProductId, invoiceRegistrationProducts.stream().map(InvoiceRegistrationProduct::getId).collect(Collectors.toList()));
- List<InvoiceLedger> invoiceLedgers = invoiceLedgerMapper.selectList(wrapperOne);
- if (CollectionUtils.isNotEmpty(invoiceLedgers)) {
- invoiceLedgerIds = invoiceLedgers.stream().map(InvoiceLedger::getId).collect(Collectors.toList());
- }
- invoiceLedgerMapper.delete(wrapperOne);
- }
- invoiceRegistrationProductMapper.delete(wrapper);
- LambdaQueryWrapper<InvoiceRegistration> wrapperTwo = new LambdaQueryWrapper<>();
- wrapperTwo.in(InvoiceRegistration::getSalesLedgerId, idList);
- invoiceRegistrationMapper.delete(wrapperTwo);
if (CollectionUtils.isNotEmpty(invoiceLedgerIds)) {
LambdaQueryWrapper<ReceiptPayment> wrapperTree = new LambdaQueryWrapper<>();
--
Gitblit v1.9.3