From 08c0e7417807e0e172640835d21f873157b03650 Mon Sep 17 00:00:00 2001
From: liding <756868258@qq.com>
Date: 星期二, 13 五月 2025 16:48:51 +0800
Subject: [PATCH] 采购台账联调优化

---
 src/main/resources/mapper/sales/InvoiceLedgerMapper.xml |   29 ++++++++++++++++++++++++++++-
 1 files changed, 28 insertions(+), 1 deletions(-)

diff --git a/src/main/resources/mapper/sales/InvoiceLedgerMapper.xml b/src/main/resources/mapper/sales/InvoiceLedgerMapper.xml
index d29b8bf..093b5c4 100644
--- a/src/main/resources/mapper/sales/InvoiceLedgerMapper.xml
+++ b/src/main/resources/mapper/sales/InvoiceLedgerMapper.xml
@@ -19,9 +19,12 @@
             T1.update_time       ,
             T1.update_user       ,
             T1.tenant_id         ,
-            T2.customer_name
+            T2.customer_name,
+            T3.customer_contract_no,
+            T3.salesman
         FROM invoice_ledger T1
         LEFT JOIN customer T2 ON T1.customer_id = T2.id
+        LEFT JOIN sales_ledger T3 ON T1.sales_ledger_id = T3.id
         <where>
             <if test="invoiceLedgerDto.searchText != null and invoiceLedgerDto.searchText != ''">
                 AND (
@@ -66,4 +69,28 @@
             </if>
         </where>
     </select>
+
+    <select id="invoiceLedgerInfo" resultType="com.ruoyi.sales.dto.InvoiceLedgerDto">
+        SELECT
+        T1.id                ,
+        T1.sales_ledger_id   ,
+        T1.sales_contract_no ,
+        T1.customer_id       ,
+        T1.invoice_no        ,
+        T1.invoice_amount    ,
+        T1.tax_rate          ,
+        T1.invoice_person    ,
+        T1.invoice_date      ,
+        T1.create_time       ,
+        T1.create_user       ,
+        T1.update_time       ,
+        T1.update_user       ,
+        T1.tenant_id         ,
+        T2.customer_name
+        FROM invoice_ledger T1
+        LEFT JOIN customer T2 ON T1.customer_id = T2.id
+        WHERE T1.id = #{id}
+    </select>
+
+
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.3