旭捷内部项目管理系统
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
2.9 KiB

10 months ago
  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="com.gaotao.modules.projectinfo.dao.CaseTaskDao">
  4. <select id="getCaseTaskList" resultType="java.util.Map">
  5. select ct.id as taskId,
  6. pi.project_name as projectName,
  7. pi.project_status as projectStatus,
  8. pc.id as caseId,pc.type,sysn.name as sysName,
  9. pc.demander,pc.encapsulate,pc.function_menu as functionMenu,
  10. pc.entered_by as enteredBy,ct.entered_date as enteredDate,
  11. ct.status,sysu.user_display as ownerName,
  12. ct.plan_finish_date as planFinishDate,
  13. ct.close_date as closeDate,ct.remark,ct.task_desc as taskDesc
  14. from case_task ct
  15. LEFT JOIN project_info pi on pi.id=ct.project_id
  16. LEFT JOIN project_case pc on pc.id=ct.case_id
  17. LEFT JOIN sys_user sysu on sysu.user_id=ct.owner_id
  18. LEFT JOIN sys_name sysn on sysn.id=pc.sys_name_id
  19. <where>
  20. 1 = 1
  21. <if test="param2.statusList != '' and param2.statusList.length>0 ">
  22. and ct.status in
  23. <foreach item="item" index="index" collection="param2.statusList" open="(" separator="," close=")">
  24. #{item}
  25. </foreach>
  26. </if>
  27. <if test="param2.projectId != null and param2.projectId != '' ">
  28. and pc.project_id = #{param2.projectId}
  29. </if>
  30. <if test="param2.projectName != null and param2.projectName != '' ">
  31. and pi.project_name like '%'+#{param2.projectName}+'%'
  32. </if>
  33. <if test="param2.functionMenu != null and param2.functionMenu != '' ">
  34. and pc.function_menu like '%'+#{param2.functionMenu}+'%'
  35. </if>
  36. <if test="param2.encapsulate != null and param2.encapsulate != '' ">
  37. and pc.encapsulate like '%'+#{param2.encapsulate}+'%'
  38. </if>
  39. <if test="param2.sysNameId != null and param2.sysNameId != '' ">
  40. and pc.sys_name_id = #{param2.sysNameId}
  41. </if>
  42. <if test="param2.groupId != null and param2.groupId != '' ">
  43. and pc.group_id = #{param2.groupId}
  44. </if>
  45. <if test="param2.type != null and param2.type != '' ">
  46. and pc.type = #{param2.type}
  47. </if>
  48. <if test="param2.enteredBy != null and param2.enteredBy != '' ">
  49. and pc.entered_by = #{param2.enteredBy}
  50. </if>
  51. <if test="param2.demander != null and param2.demander != '' ">
  52. and pc.demander = #{param2.demander}
  53. </if>
  54. <if test="param2.startDate!= null">
  55. AND ct.entered_date>= #{param2.startDate}
  56. </if>
  57. <if test="param2.endDate!= null">
  58. AND #{param2.endDate} >=ct.entered_date
  59. </if>
  60. </where>
  61. </select>
  62. </mapper>