From 5a423dfede4ee5caa88adf95ec52d35a85072321 Mon Sep 17 00:00:00 2001 From: buhuazhen <hua100783@gmail.com> Date: 星期三, 27 八月 2025 14:35:29 +0800 Subject: [PATCH] Merge branch 'feature/0826' into pim-jlmy --- main-business/src/main/resources/mapper/ReceiptPaymentMapper.xml | 61 ++++++++++++++++++++++++++++++ 1 files changed, 61 insertions(+), 0 deletions(-) diff --git a/main-business/src/main/resources/mapper/ReceiptPaymentMapper.xml b/main-business/src/main/resources/mapper/ReceiptPaymentMapper.xml new file mode 100644 index 0000000..f2ce721 --- /dev/null +++ b/main-business/src/main/resources/mapper/ReceiptPaymentMapper.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE mapper + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> +<mapper namespace="com.ruoyi.business.mapper.ReceiptPaymentMapper"> + + <select id="invoiceInfo" resultType="com.ruoyi.business.dto.SalesRecordDto"> + SELECT + T1.*, + T3.coal + FROM + sales_record T1 + LEFT JOIN customer T2 ON T1.customer_id = T2.id + LEFT JOIN coal_info T3 ON T1.coal_id = T3.id + WHERE T1.id = #{id} + </select> + <select id="bindInvoiceNoRegPage" resultType="com.ruoyi.business.dto.ReceiptPaymentDto"> + SELECT + T1.*, + T2.customer, + T3.coal + FROM + receipt_payment T1 + LEFT JOIN sales_record T2 ON T1.sales_record_id = T2.id + LEFT JOIN coal_info T3 ON T2.coal_id = T3.id + where 1=1 + <if test="receiptPaymentDto.customer != null and receiptPaymentDto.customer != ''"> + and T2.customer like concat('%',#{receiptPaymentDto.customer},'%') + </if> + <if test="receiptPaymentDto.coal != null and receiptPaymentDto.coal != ''"> + and T3.coal like concat('%',#{receiptPaymentDto.coal},'%') + </if> + <if test="receiptPaymentDto.receiptPaymentDateStart != null and receiptPaymentDto.receiptPaymentDateEnd != ''"> + and T1.receipt_payment_date between to_timestamp(#{receiptPaymentDto.receiptPaymentDateStart}, 'yyyy-MM-dd HH24:mi:ss') AND + to_timestamp(#{receiptPaymentDto.receiptPaymentDateEnd}, 'yyyy-MM-dd HH24:mi:ss') + </if> + </select> + <select id="receiptPaymentHistoryListNoPage" resultType="com.ruoyi.business.dto.ReceiptPaymentDto"> + SELECT + T1.*, + T2.customer, + T3.coal + FROM + receipt_payment T1 + LEFT JOIN sales_record T2 ON T1.sales_record_id = T2.id + LEFT JOIN coal_info T3 ON T2.coal_id = T3.id + where 1=1 + <if test="receiptPaymentDto.customer != null and receiptPaymentDto.customer != ''"> + and T2.customer like concat('%',#{receiptPaymentDto.customer},'%') + </if> + <if test="receiptPaymentDto.coal != null and receiptPaymentDto.coal != ''"> + and T3.coal like concat('%',#{receiptPaymentDto.coal},'%') + </if> + <if test="receiptPaymentDto.receiptPaymentDateStart != null and receiptPaymentDto.receiptPaymentDateEnd != ''"> + and T1.receipt_payment_date between to_timestamp(#{receiptPaymentDto.receiptPaymentDateStart}, 'yyyy-MM-dd HH24:mi:ss') AND + to_timestamp(#{receiptPaymentDto.receiptPaymentDateEnd}, 'yyyy-MM-dd HH24:mi:ss') + </if> + </select> + + +</mapper> \ No newline at end of file -- Gitblit v1.9.3