CompareMessageMapper.xml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
  3. <mapper namespace="cn.cslg.report.mapper.CompareMessageMapper">
  4. <select id="getCompareMessage" resultType="cn.cslg.report.common.model.vo.CompareMessageVO">
  5. select a.* ,b.TARGET_DESCRIPTION,b.COMPARE_DESCRIPTION,b.COMPARE_RESULT from FEATURES a left join COMPARE_MESSAGE b on a.id =b.FEATURE_ID
  6. where a.SIGN_PATENT_NO=#{patentNo} and a.TASK_ID=#{taskId};
  7. </select>
  8. <select id="getComparedMessage" resultType="java.lang.String">
  9. select DISTINCT f.SIGN_PATENT_NO from FEATURES f left join COMPARE_MESSAGE cm on f.ID =cm.FEATURE_ID
  10. <where>
  11. and f.REPORT_ID=#{params.reportId}
  12. and cm.ID is not null
  13. <if test="params.compareResult !=null">
  14. and cm.COMPARE_RESULT=#{params.compareResult}
  15. </if>
  16. <if test="params.compareResult !=null">
  17. and cm.COMPARE_RESULT=#{params.compareResult}
  18. </if>
  19. </where>
  20. </select>
  21. <select id="getComparedMessageAll" resultType="java.lang.String">
  22. select DISTINCT f.SIGN_PATENT_NO from RMS_TEST.FEATURES f left join RMS_TEST.COMPARE_MESSAGE cm on f.ID =cm.FEATURE_ID
  23. <where>
  24. and f.REPORT_ID=#{params.reportId}
  25. and cm.ID is not null
  26. <if test="params.patentNo !=null">
  27. and f.SIGN_PATENT_NO=
  28. like concat('%', #{params.patentNo}, '%')
  29. </if>
  30. <if test="params.compareResult !=null">
  31. and cm.COMPARE_RESULT=#{params.compareResult}
  32. </if>
  33. </where>
  34. </select>
  35. </mapper>