旭捷内部项目管理系统
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.

78 lines
3.8 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.ProjectCaseDao">
  4. <select id="getCaseList" resultType="java.util.Map">
  5. select pi.id as projectId,
  6. pi.project_name as projectName,
  7. pi.project_status as projectStatus,
  8. sysn.name as sysName,cg.name as groupName,
  9. pc.id as caseId,pc.type,
  10. pc.demander,pc.encapsulate,pc.function_menu as functionMenu,
  11. pc.entered_by as enteredBy,pc.entered_date as enteredDate,
  12. pc.status,pc.xj_owner as xjOwner,pc.inner_status as innerStatus,
  13. pc.plan_finish_date as planFinishDate,pc.inner_plan_finish_date as innerPlanFinishDate,
  14. pc.upgrade_date as upgradeDate,
  15. pc.close_date as closeDate,pc.remark,pc.xjshow
  16. from project_case pc
  17. LEFT JOIN project_info pi on pi.id=pc.project_id
  18. LEFT JOIN sys_name sysn on sysn.id=pc.sys_name_id
  19. LEFT JOIN cus_group cg on cg.id=pc.group_id
  20. <where>
  21. 1 = 1
  22. <if test="param2.statusList != '' and param2.statusList.length>0 ">
  23. and pc.status in
  24. <foreach item="item" index="index" collection="param2.statusList" open="(" separator="," close=")">
  25. #{item}
  26. </foreach>
  27. </if>
  28. <if test="param2.innerStatusList != '' and param2.innerStatusList.length>0 ">
  29. and pc.inner_status in
  30. <foreach item="item" index="index" collection="param2.innerStatusList" open="(" separator="," close=")">
  31. #{item}
  32. </foreach>
  33. </if>
  34. <if test="param2.linkedCustomerId != null and param2.linkedCustomerId != '' ">
  35. and pc.customer_id=#{param2.linkedCustomerId}
  36. </if>
  37. <if test="param2.projectId != null and param2.projectId != '' ">
  38. and pc.project_id = #{param2.projectId}
  39. </if>
  40. <if test="param2.projectName != null and param2.projectName != '' ">
  41. and pi.project_name like '%'+#{param2.projectName}+'%'
  42. </if>
  43. <if test="param2.functionMenu != null and param2.functionMenu != '' ">
  44. and pc.function_menu like '%'+#{param2.functionMenu}+'%'
  45. </if>
  46. <if test="param2.encapsulate != null and param2.encapsulate != '' ">
  47. and pc.encapsulate like '%'+#{param2.encapsulate}+'%'
  48. </if>
  49. <if test="param2.sysNameId != null and param2.sysNameId != '' ">
  50. and pc.sys_name_id = #{param2.sysNameId}
  51. </if>
  52. <if test="param2.groupId != null and param2.groupId != '' ">
  53. and pc.group_id = #{param2.groupId}
  54. </if>
  55. <if test="param2.type != null and param2.type != '' ">
  56. and pc.type = #{param2.type}
  57. </if>
  58. <if test="param2.enteredBy != null and param2.enteredBy != '' ">
  59. and pc.entered_by = #{param2.enteredBy}
  60. </if>
  61. <if test="param2.demander != null and param2.demander != '' ">
  62. and pc.demander = #{param2.demander}
  63. </if>
  64. <if test = "param2.startDate!= null">
  65. AND pc.entered_date>= #{param2.startDate}
  66. </if>
  67. <if test = "param2.endDate!= null">
  68. AND #{param2.endDate} >=pc.entered_date
  69. </if>
  70. <if test="param2.manageAudit == '待审核'">
  71. and pc.xjshow = 'N'
  72. </if>
  73. <if test="param2.xjshow != null and param2.xjshow != ''">
  74. and pc.xjshow = #{param2.xjshow}
  75. </if>
  76. </where>
  77. </select>
  78. </mapper>