From 60117d199e9345ac3e5287f1e82d51f74f14dddb Mon Sep 17 00:00:00 2001
From: maven <2163098428@qq.com>
Date: 星期二, 13 一月 2026 15:57:23 +0800
Subject: [PATCH] yys 付款,回款改为绑定台账,产品

---
 src/main/resources/mapper/sales/SalesLedgerProductMapper.xml |   62 +++++++++++++++++++++++++++++++
 1 files changed, 62 insertions(+), 0 deletions(-)

diff --git a/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml b/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
index 8982caf..5db186a 100644
--- a/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
+++ b/src/main/resources/mapper/sales/SalesLedgerProductMapper.xml
@@ -33,4 +33,66 @@
 
 
     </select>
+    <select id="listPage" resultType="com.ruoyi.sales.dto.SalesLedgerProductDto">
+        select slp.*,
+        sl.project_name,
+        sl.customer_name,
+        sl.sales_contract_no,
+        sl.customer_contract_no
+        from sales_ledger_product slp
+        left join sales_ledger sl on slp.sales_ledger_id = sl.id
+        <where>
+            slp.type = 1
+            <if test="req.salesContractNo != null and req.salesContractNo != '' ">
+                AND  sl.sales_contract_no like concat('%',#{req.salesContractNo},'%')
+            </if>
+            <if test="req.customerContractNo != null and req.customerContractNo != '' ">
+                AND  sl.customer_contract_no like concat('%',#{req.customerContractNo},'%')
+            </if>
+            <if test="req.projectName != null and req.projectName != '' ">
+                AND  sl.project_name like concat('%',#{req.projectName},'%')
+            </if>
+            <if test="req.customerName != null and req.customerName != '' ">
+                AND  sl.customer_name like concat('%',#{req.customerName},'%')
+            </if>
+            <if test="req.productCategory != null and req.productCategory != '' ">
+                AND  slp.product_category like concat('%',#{req.productCategory},'%')
+            </if>
+            <if test="req.status != null and req.status ">
+                AND  slp.pending_invoice_total &gt; 0
+            </if>
+        </where>
+        order by slp.register_date desc
+    </select>
+    <select id="listPagePurchaseLedger" resultType="com.ruoyi.sales.dto.SalesLedgerProductDto">
+        select slp.*,
+        sl.project_name,
+        sl.customer_name,
+        sl.sales_contract_no,
+        sl.customer_contract_no
+        from sales_ledger_product slp
+        left join purchase_ledger sl on slp.sales_ledger_id = sl.id
+        <where>
+            slp.type = 2
+            <if test="req.purchaseContractNumber != null and req.purchaseContractNumber != '' ">
+                AND  sl.purchase_contract_number like concat('%',#{req.purchaseContractNumber},'%')
+            </if>
+            <if test="req.customerContractNo != null and req.customerContractNo != '' ">
+                AND  sl.customer_contract_no like concat('%',#{req.customerContractNo},'%')
+            </if>
+            <if test="req.projectName != null and req.projectName != '' ">
+                AND  sl.project_name like concat('%',#{req.projectName},'%')
+            </if>
+            <if test="req.customerName != null and req.customerName != '' ">
+                AND  sl.customer_name like concat('%',#{req.customerName},'%')
+            </if>
+            <if test="req.productCategory != null and req.productCategory != '' ">
+                AND  slp.product_category like concat('%',#{req.productCategory},'%')
+            </if>
+            <if test="req.status != null and req.status ">
+                AND  slp.pending_invoice_total &gt; 0
+            </if>
+        </where>
+        order by slp.register_date desc
+    </select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3