From e1b550e2dcf6d71a863d206d4a88fec6588a6fd0 Mon Sep 17 00:00:00 2001 From: liyong <18434998025@163.com> Date: 星期一, 23 六月 2025 10:20:22 +0800 Subject: [PATCH] 2025-06-23 【销售台账】 增加客户合同号、销售合同号、项目名称模糊查询 增加客户名称、客户合同号、项目名称查询,不显示待回款为0,默认为打钩。 销售管理】-【回款流水】,增加合同号、项目名称列查询,增加客户名称、项目名称、合同号查询条件。 【销售管理】-【回款登记】,增加导出功能 --- src/main/resources/mapper/sales/InvoiceRegistrationMapper.xml | 75 +++++++++++++++++++++++++++++++------ 1 files changed, 63 insertions(+), 12 deletions(-) diff --git a/src/main/resources/mapper/sales/InvoiceRegistrationMapper.xml b/src/main/resources/mapper/sales/InvoiceRegistrationMapper.xml index b263bb6..9edbea4 100644 --- a/src/main/resources/mapper/sales/InvoiceRegistrationMapper.xml +++ b/src/main/resources/mapper/sales/InvoiceRegistrationMapper.xml @@ -5,17 +5,68 @@ <mapper namespace="com.ruoyi.sales.mapper.InvoiceRegistrationMapper"> <select id="invoiceRegistrationListPage" resultType="com.ruoyi.sales.dto.InvoiceRegistrationDto"> SELECT - id , - sales_ledger_id , - sales_contract_no , - customer_id , - salesman , - project_name , - create_time , - create_user , - update_time , - update_user , - tenant_id - FROM invoice_registration + T1.id , + T1.sales_ledger_id , + T1.sales_contract_no , + T1.customer_id , + T1.salesman , + T1.project_name , + T1.create_time , + T1.create_user , + T1.update_time , + T1.update_user , + T1.tenant_id, + T2.customer_contract_no, + T3.customer_name, + T2.contract_amount, + CASE WHEN T4.noInvoiceAmountTotal IS NULL THEN 0 ELSE T4.noInvoiceAmountTotal END AS noInvoiceAmountTotal + FROM invoice_registration T1 + LEFT JOIN sales_ledger T2 ON T1.sales_ledger_id = T2.id + LEFT JOIN customer T3 ON T1.customer_id = T3.id + LEFT JOIN ( + SELECT + SUM( no_invoice_amount ) AS noInvoiceAmountTotal , + invoice_registration_id + FROM + invoice_registration_product + GROUP BY + invoice_registration_id + ) T4 ON T1.id = T4.invoice_registration_id + </select> + + <select id="invoiceRegisAndProductExcelDtoList" resultType="com.ruoyi.sales.excel.InvoiceRegisAndProductExcelDto"> + SELECT + T1.id , + T1.sales_ledger_id , + T1.sales_contract_no , + T1.customer_id , + T1.salesman , + T1.project_name , + T1.create_time , + T1.create_user , + T1.update_time , + T1.update_user , + T1.tenant_id, + T2.customer_contract_no, + T3.customer_name, + T2.contract_amount, + T4.product_category, + T4.specification_model, + T4.unit, + T4.quantity, + T4.tax_rate, + T4.tax_inclusive_unit_price, + T4.tax_inclusive_total_price, + T4.tax_exclusive_total_price, + T4.invoice_type, + T4.invoice_num, + T4.invoice_amount, + T4.no_invoice_num, + T4.no_invoice_amount + FROM invoice_registration T1 + JOIN sales_ledger T2 ON T1.sales_ledger_id = T2.id + JOIN customer T3 ON T1.customer_id = T3.id + JOIN invoice_registration_product T4 ON T1.id = T4.invoice_registration_id + ORDER BY T1.id ASC </select> </mapper> \ No newline at end of file -- Gitblit v1.9.3