PtlAgreementProductCostsNewMapper.xml 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ydtech.modules.protocols.dao.PtlAgreementProductCostsNewMapper">
  6. <select id="getCostsPage" resultType="com.ydtech.modules.protocols.entity.po.PtlAgreementProductCostsNew">
  7. SELECT
  8. pa.insurance_company,
  9. pa.agreement_name,
  10. papcn.*
  11. FROM
  12. ptl_agreement_product_costs_new papcn
  13. LEFT JOIN ptl_agreement pa ON papcn.agreement_id = pa.id
  14. where 1=1
  15. <if test="params.agreementIds != null and params.agreementIds != ''">
  16. AND pa.id in (${params.agreementIds})
  17. </if>
  18. <if test="params.agreementId != null and params.agreementId != ''">
  19. AND pa.id in (#{params.agreementId})
  20. </if>
  21. <if test="params.isAudit != null and params.isAudit != ''">
  22. AND papcn.is_audit = #{params.isAudit}
  23. </if>
  24. <if test="params.costsDescription != null and params.costsDescription != ''">
  25. AND papcn.costs_description like concat('%',#{params.costsDescription},'%')
  26. </if>
  27. <if test="params.productCode != null and params.productCode.size() > 0">
  28. AND papcn.product_id in
  29. <foreach item="item" index="index" collection="params.productCode" open="(" separator="," close=")">
  30. #{item}
  31. </foreach>
  32. </if>
  33. <if test="params.createStartTime != null and params.createStartTime != ''">
  34. and DATE(papcn.create_time) BETWEEN #{params.createStartTime} and #{params.createEndTime}
  35. </if>
  36. </select>
  37. </mapper>