From 43d67f1b44403f6e998f2df23f46efb6d061b2e9 Mon Sep 17 00:00:00 2001
From: gongchunyi <deslre0381@gmail.com>
Date: 星期五, 03 四月 2026 18:39:01 +0800
Subject: [PATCH] fix: 库存出库空数据补全

---
 src/main/resources/mapper/purchase/PurchaseLedgerMapper.xml |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/main/resources/mapper/purchase/PurchaseLedgerMapper.xml b/src/main/resources/mapper/purchase/PurchaseLedgerMapper.xml
index ac57202..595c73b 100644
--- a/src/main/resources/mapper/purchase/PurchaseLedgerMapper.xml
+++ b/src/main/resources/mapper/purchase/PurchaseLedgerMapper.xml
@@ -14,16 +14,23 @@
         pl.id,
         pl.purchase_contract_number ,
         pl.sales_contract_no,
+        pl.supplier_id,
         pl.supplier_name,
         pl.project_name,
         pl.contract_amount,
         sum(pr.tickets_amount)as receipt_payment_amount,
         pl.contract_amount-sum(pr.tickets_amount) AS unReceipt_payment_amount,
         pl.entry_date,
+        pl.recorder_id,
         pl.recorder_name,
+        pl.template_name,
+        pl.approver_id,
+        sm.is_white,
+        pl.approval_status,
         pl.payment_method
         from purchase_ledger pl
         left join product_record pr on pl.id = pr.purchase_ledger_id
+        left join supplier_manage sm on pl.supplier_id = sm.id
         <where>
             1 = 1
             <if test="c.purchaseContractNumber != null and c.purchaseContractNumber != ''">
@@ -31,6 +38,9 @@
             </if>
             <if test="c.supplierName != null and c.supplierName != ''">
                 and pl.supplier_name like concat('%',#{c.supplierName},'%')
+            </if>
+            <if test="c.approvalStatus != null and c.approvalStatus != ''">
+                and pl.approval_status = #{c.approvalStatus}
             </if>
             <if test="c.salesContractNo != null and c.salesContractNo != ''">
                 and pl.sales_contract_no like concat('%',#{c.salesContractNo},'%')
@@ -48,7 +58,8 @@
         group by pl.id, pl.purchase_contract_number, pl.sales_contract_no, pl.supplier_name,
         pl.project_name,pl.entry_date,
         pl.recorder_name,
-        pl.contract_amount
+        pl.contract_amount,
+        pl.approval_status
         order by pl.entry_date desc
 
     </select>
@@ -71,4 +82,4 @@
         WHERE
             T4.id = #{id}
     </select>
-</mapper>
\ No newline at end of file
+</mapper>

--
Gitblit v1.9.3