From 98d89a1d9484104005e6d8b43365d7f508dde985 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期一, 08 六月 2026 15:01:39 +0800
Subject: [PATCH] feat:1.收入,支出管理倒序排序 2.开票台账查询优化
---
src/main/java/com/ruoyi/sales/service/impl/SalesLedgerProductServiceImpl.java | 8 ++++++--
src/main/resources/mapper/account/AccountExpenseMapper.xml | 1 +
src/main/resources/mapper/account/AccountIncomeMapper.xml | 1 +
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/main/java/com/ruoyi/sales/service/impl/SalesLedgerProductServiceImpl.java b/src/main/java/com/ruoyi/sales/service/impl/SalesLedgerProductServiceImpl.java
index eb416fb..4042a3e 100644
--- a/src/main/java/com/ruoyi/sales/service/impl/SalesLedgerProductServiceImpl.java
+++ b/src/main/java/com/ruoyi/sales/service/impl/SalesLedgerProductServiceImpl.java
@@ -531,7 +531,9 @@
IPage<SalesLedgerProductDto> salesLedgerProductDtoIPage = salesLedgerProductMapper.listPage(page, salesLedgerProduct);
salesLedgerProductDtoIPage.getRecords().forEach(item -> {
// 鍒ゆ柇鐘舵��
- if(item.getTaxInclusiveTotalPrice().compareTo(item.getInvoiceTotal()) == 0){
+ BigDecimal taxInclusiveTotalPrice = item.getTaxInclusiveTotalPrice();
+ BigDecimal invoiceTotal = item.getInvoiceTotal();
+ if(taxInclusiveTotalPrice != null && invoiceTotal != null && taxInclusiveTotalPrice.compareTo(invoiceTotal) == 0){
item.setStatusName("宸插畬鎴愪粯娆�");
}else{
item.setStatusName("鏈畬鎴愪粯娆�");
@@ -545,7 +547,9 @@
IPage<SalesLedgerProductDto> salesLedgerProductDtoIPage = salesLedgerProductMapper.listPagePurchaseLedger(page, salesLedgerProduct);
salesLedgerProductDtoIPage.getRecords().forEach(item -> {
// 鍒ゆ柇鐘舵��
- if(item.getTaxInclusiveTotalPrice().compareTo(item.getTicketsTotal()) == 0){
+ BigDecimal taxInclusiveTotalPrice = item.getTaxInclusiveTotalPrice();
+ BigDecimal ticketsTotal = item.getTicketsTotal();
+ if(taxInclusiveTotalPrice != null && ticketsTotal != null && taxInclusiveTotalPrice.compareTo(ticketsTotal) == 0){
item.setStatusName("宸插畬鎴愪粯娆�");
}else{
item.setStatusName("鏈畬鎴愪粯娆�");
diff --git a/src/main/resources/mapper/account/AccountExpenseMapper.xml b/src/main/resources/mapper/account/AccountExpenseMapper.xml
index 459a584..66c62b1 100644
--- a/src/main/resources/mapper/account/AccountExpenseMapper.xml
+++ b/src/main/resources/mapper/account/AccountExpenseMapper.xml
@@ -19,6 +19,7 @@
<if test="accountExpense.expenseMethod != null and accountExpense.expenseMethod != '' ">
AND expense_method = #{accountExpense.expenseMethod}
</if>
+ order by create_time desc
</select>
<select id="accountExpenseExport" resultType="com.ruoyi.account.pojo.AccountExpense">
SELECT
diff --git a/src/main/resources/mapper/account/AccountIncomeMapper.xml b/src/main/resources/mapper/account/AccountIncomeMapper.xml
index 3bb4da1..5477623 100644
--- a/src/main/resources/mapper/account/AccountIncomeMapper.xml
+++ b/src/main/resources/mapper/account/AccountIncomeMapper.xml
@@ -20,6 +20,7 @@
<if test="accountIncome.incomeMethod != null and accountIncome.incomeMethod != '' ">
AND income_method = #{accountIncome.incomeMethod}
</if>
+ order by create_time desc
</select>
<select id="accountIncomeExport" resultType="com.ruoyi.account.pojo.AccountIncome">
SELECT
--
Gitblit v1.9.3