TaskMapper.xml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  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.TaskMapper">
  4. <select id="queryTasks" resultType="cn.cslg.report.common.model.vo.TaskReportVO" >
  5. select a.* ,b.TYPE as reportType from TASK a left join REPORT b on a.REPORT_ID=b.ID
  6. <where>
  7. <if test="param.type !=null">
  8. and a.TYPE =#{param.type}
  9. </if>
  10. <if test="param.taskStatuses !=null and param.taskStatuses.size>0">
  11. and a.TASK_STATUS in
  12. <foreach collection="param.taskStatuses" item="item" separator="," open="(" close=")">
  13. #{item}
  14. </foreach>
  15. </if>
  16. <if test="param.createName !=null and param.createName !='' ">
  17. and a.CREATE_NAME like concat('%', #{param.createName}, '%')
  18. </if>
  19. <if test="param.taskName !=null and param.taskName !=''">
  20. and a.TASK_NAME like concat('%', #{param.taskName}, '%')
  21. </if>
  22. <if test="param.roleInTask !=null and param.roleInTask == 0">
  23. and a.CREATE_ID=#{param.loginId}
  24. </if>
  25. <if test="param.roleInTask !=null and param.roleInTask == 1">
  26. and a.HANDLE_PERSON_ID=#{param.loginId}
  27. </if>
  28. </where>
  29. order by a.id desc
  30. </select>
  31. </mapper>