AssoTaskPersonelMapper.xml 1.2 KB

1234567891011121314151617181920212223
  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.AssoTaskPersonelMapper">
  4. <select id="getPatentNumber" resultType="java.lang.String">
  5. select PATENT_NO from ASSO_TASK_PERSONEL
  6. where PERSON_ID=#{personelId} and STATE=#{state} and TASK_ID=#{taskId}
  7. </select>
  8. <select id="getSplitMessage" resultType="cn.cslg.report.entity.asso.AssoTaskPatentSplit">
  9. select b.* from ASSO_TASK_PATENT a left join ASSO_TASK_PATENT_SPLIT as b on a.id=b.TASK_PATENT_ID
  10. where a.PATENT_NO=#{patentNo} and a.TASK_ID=#{taskId} limit 1;
  11. </select>
  12. <select id="getPatents" resultType="java.lang.String">
  13. select distinct PATENT_NO from ASSO_TASK_PATENT
  14. <where>
  15. <foreach collection="params" index="index" item="item" open="(" separator=" or " close=")">
  16. PERSON_ID=#{item.personId} and STATE=#{item.state} and TASK_ID in
  17. <foreach collection="item.taskIds" index="index" item="item1" open="(" separator="," close=")">
  18. #{item1}
  19. </foreach>
  20. </foreach>
  21. </where>
  22. </select>
  23. </mapper>