| 123456789101112131415161718192021222324252627282930313233343536373839 |
- <?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.ydtech.modules.protocols.dao.PtlAgreementProductCostsNewMapper">
- <select id="getCostsPage" resultType="com.ydtech.modules.protocols.entity.po.PtlAgreementProductCostsNew">
- SELECT
- pa.insurance_company,
- pa.agreement_name,
- papcn.*
- FROM
- ptl_agreement_product_costs_new papcn
- LEFT JOIN ptl_agreement pa ON papcn.agreement_id = pa.id
- where 1=1
- <if test="params.agreementIds != null and params.agreementIds != ''">
- AND pa.id in (${params.agreementIds})
- </if>
- <if test="params.agreementId != null and params.agreementId != ''">
- AND pa.id in (#{params.agreementId})
- </if>
- <if test="params.isAudit != null and params.isAudit != ''">
- AND papcn.is_audit = #{params.isAudit}
- </if>
- <if test="params.costsDescription != null and params.costsDescription != ''">
- AND papcn.costs_description like concat('%',#{params.costsDescription},'%')
- </if>
- <if test="params.productCode != null and params.productCode.size() > 0">
- AND papcn.product_id in
- <foreach item="item" index="index" collection="params.productCode" open="(" separator="," close=")">
- #{item}
- </foreach>
- </if>
- <if test="params.createStartTime != null and params.createStartTime != ''">
- and DATE(papcn.create_time) BETWEEN #{params.createStartTime} and #{params.createEndTime}
- </if>
- </select>
- </mapper>
|