From 684e4306a08feeae188070f264148e6765da8dcf Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期日, 20 九月 2026 19:25:15 +0800
Subject: [PATCH] feat(account): 更新往来付款回款流水表及接口

---
 src/main/java/com/ruoyi/sales/mapper/SalesLedgerMapper.java |   21 +++++++++++++++++++--
 1 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/ruoyi/sales/mapper/SalesLedgerMapper.java b/src/main/java/com/ruoyi/sales/mapper/SalesLedgerMapper.java
index 3100a55..a730371 100644
--- a/src/main/java/com/ruoyi/sales/mapper/SalesLedgerMapper.java
+++ b/src/main/java/com/ruoyi/sales/mapper/SalesLedgerMapper.java
@@ -6,10 +6,13 @@
 import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ruoyi.home.dto.IncomeExpenseAnalysisDto;
+import com.ruoyi.purchase.vo.PurchaseReportVo;
+import com.ruoyi.sales.dto.CustomerDepositAmountDto;
 import com.ruoyi.sales.dto.SalesLedgerDto;
 import com.ruoyi.sales.dto.SalesTrendDto;
 import com.ruoyi.sales.dto.StatisticsTableDto;
 import com.ruoyi.sales.pojo.SalesLedger;
+import com.ruoyi.sales.vo.SalesLedgerVo;
 import org.apache.ibatis.annotations.Param;
 import org.apache.ibatis.annotations.Select;
 
@@ -52,7 +55,7 @@
      * @param salesLedgerDto
      * @return
      */
-    IPage<SalesLedger> selectSalesLedgerListPage(Page page, @Param("salesLedgerDto") SalesLedgerDto salesLedgerDto);
+    IPage<SalesLedgerVo> selectSalesLedgerListPage(Page page, @Param("salesLedgerDto") SalesLedgerDto salesLedgerDto);
 
     /**
      * 鎸夋湀浠界粺璁¤鍗曟暟銆侀攢鍞锛堟敮鎸佷骇鍝佸ぇ绫汇�佸鎴峰悕绉扮瓫閫夛級
@@ -69,7 +72,8 @@
             "SUM(CASE WHEN slp.approve_status = 2 THEN 1 ELSE 0 END) / COUNT(DISTINCT sl.id) * 100), 2) AS ship_rate " +
             "FROM sales_ledger sl " +
             "LEFT JOIN sales_ledger_product slp ON sl.id = slp.sales_ledger_id " +
-            "WHERE sl.entry_date BETWEEN #{statisticsTableDto.entryDateStart} AND #{statisticsTableDto.entryDateEnd} " +
+            "WHERE sl.entry_date &gt;= DATE_FORMAT(#{statisticsTableDto.entryDateStart}, '%Y-%m-01') " +
+            "AND sl.entry_date &lt;= LAST_DAY(#{statisticsTableDto.entryDateEnd}) " +
             // 浜у搧澶х被绛涢��
             "<if test='statisticsTableDto.productCategory != null and statisticsTableDto.productCategory != \"\"'>" +
             "AND slp.product_category = #{statisticsTableDto.productCategory} " +
@@ -82,4 +86,17 @@
             "ORDER BY month" +
             "</script>")
     List<SalesTrendDto> statisticsTable(@Param("statisticsTableDto")StatisticsTableDto statisticsTableDto);
+
+    IPage<SalesLedgerDto> listSalesLedgerAndShipped(Page page, @Param("ew") SalesLedgerDto salesLedgerDto);
+
+    IPage<PurchaseReportVo> selectPurchaseReportVoPage(Page page, @Param("customerName") String customerName);
+
+    /**
+     * 鎸夊鎴锋壒閲忔眹鎬讳唬鍌ㄩ噾棰濓紙璇ュ鎴峰叏閮ㄣ�岀被鍨�=浠e偍銆嶇殑閿�鍞彴璐﹀悎鍚岄噾棰濅箣鍜岋級
+     *
+     * @param customerIds 瀹㈡埛id闆嗗悎
+     * @return 瀹㈡埛id + 浠e偍閲戦鍚堣锛屾棤浠e偍璁板綍鐨勫鎴蜂笉浼氬嚭鐜板湪缁撴灉閲�
+     */
+    List<CustomerDepositAmountDto> selectDepositAmountByCustomerIds(@Param("customerIds") List<Long> customerIds);
+
 }

--
Gitblit v1.9.3