gongchunyi
3 天以前 2d1e904f3049218474318cb1e2fe5c3a3869cfb0
src/main/resources/mapper/sales/SalesLedgerMapper.xml
@@ -15,24 +15,25 @@
    <select id="selectSalesLedgerList" resultType="com.ruoyi.sales.pojo.SalesLedger">
        SELECT
            T1.id,
            T1.sales_contract_no,
            T1.customer_contract_no,
            T1.project_name,
            T1.entry_date,
            T1.salesman,
            T1.customer_id,
            T1.customer_name,
            T1.entry_person,
            T1.remarks,
            T1.attachment_materials,
            T1.tenant_id,
            T1.contract_amount,
            T1.execution_date,
            T2.nick_name AS entry_person_name,
            T1.payment_method
        T1.id,
        T1.sales_contract_no,
        T1.customer_contract_no,
        T1.project_name,
        T1.entry_date,
        T1.salesman,
        T1.customer_id,
        T1.customer_name,
        T1.entry_person,
        T1.remarks,
        T1.attachment_materials,
        T1.tenant_id,
        T1.contract_amount,
        T1.execution_date,
        T2.nick_name AS entry_person_name,
        T1.payment_method,
        DATEDIFF(T1.delivery_date, CURDATE()) AS delivery_days_diff
        FROM
            sales_ledger T1
        sales_ledger T1
        LEFT JOIN sys_user T2 ON T1.entry_person = T2.user_id
        <where>
            <if test="salesLedgerDto.customerName != null and salesLedgerDto.customerName != '' ">
@@ -56,14 +57,15 @@
        T1.attachment_materials,
        T1.tenant_id,
        T1.contract_amount,
        T1.contract_amount as noInvoiceAmountTotal,
        T1.execution_date,
        T2.nick_name AS entry_person_name,
        T1.payment_method,
        t3.shipping_car_number
        T1.delivery_date,
        DATEDIFF(T1.delivery_date, CURDATE()) AS delivery_days_diff
        FROM
        sales_ledger T1
        LEFT JOIN sys_user T2 ON T1.entry_person = T2.user_id
        left join shipping_info t3 on T1.id = t3.sales_ledger_id
        <where>
            <if test="salesLedgerDto.customerName != null and salesLedgerDto.customerName != '' ">
                AND  T1.customer_name LIKE CONCAT('%',#{salesLedgerDto.customerName},'%')