智能仲裁后端服务

CaseEvidenceMapper.xml 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.wisdomarbitrate.mapper.CaseEvidenceMapper">
  6. <resultMap type="CaseEvidenceVO" id="CaseEvidenceVOResult">
  7. <id property="id" column="id" />
  8. <result property="caseNum" column="case_num" />
  9. <result property="caseStatus" column="case_status" />
  10. <result property="caseStatus" column="case_status" />
  11. <result property="roomId" column="room_id" />
  12. <result property="caseStatusName" column="caseStatusName" />
  13. </resultMap>
  14. <select id="getCaseListByRespondent" resultType="CaseEvidenceVO" resultMap="CaseEvidenceVOResult">
  15. select t.* from(
  16. select c.id id,c.create_time, c.case_num,c.case_status,
  17. CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
  18. when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
  19. when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
  20. when 9 then '待书面审理' when 10 then '待生成裁决书' when 11 then '待核验裁决书'
  21. when 12 then '待部门长审核裁决书' when 13 then '待裁决书签名' when 14 then '待裁决书用印'
  22. when 15 then '待裁决书送达' when 16 then '待案件归档' when 17 then '已归档'
  23. when 18 then '待仲裁员审核裁决书'
  24. when 31 then '待修改开庭时间'
  25. ELSE ''
  26. END caseStatusName,
  27. rc.room_id,rc.schedule_start_time
  28. from case_application as c join case_affiliate as d on c.id = d.case_appli_id
  29. left join reserved_conference rc on rc.case_id=c.id
  30. where c.id = d.case_appli_id
  31. <if test="identityNum != null and identityNum != ''">
  32. and d.identity_num = #{identityNum}
  33. </if>
  34. <if test="identityType != null ">
  35. and d.identity_type = #{identityType}
  36. </if>
  37. <if test="phone != null and phone != ''">
  38. and (d.contact_telphone = #{phone} or d.contact_telphone_agent=#{phone})
  39. </if>
  40. <if test="caseStatusList != null and caseStatusList.size() > 0">
  41. and c.case_status in
  42. <foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
  43. #{caseStatus}
  44. </foreach>
  45. </if>
  46. union
  47. <!-- 已办案件 -->
  48. select c.id id, c.create_time,c.case_num,c.case_status,
  49. CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
  50. when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
  51. when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
  52. when 9 then '待书面审理' when 10 then '待生成裁决书' when 11 then '待核验裁决书'
  53. when 12 then '待部门长审核裁决书' when 13 then '待裁决书签名' when 14 then '待裁决书用印'
  54. when 15 then '待裁决书送达' when 16 then '待案件归档' when 17 then '已归档'
  55. when 18 then '待仲裁员审核裁决书'
  56. when 31 then '待修改开庭时间'
  57. ELSE ''
  58. END caseStatusName,
  59. rc.room_id,rc.schedule_start_time
  60. from case_log_record r
  61. join case_application c on r.case_appli_id=c.id
  62. JOIN case_affiliate ca ON ca.case_appli_id = c.id
  63. left join reserved_conference rc on rc.case_id=c.id
  64. WHERE
  65. r.create_by=#{loginUserName} AND ca.identity_type=2
  66. and c.id not in(
  67. select c.id
  68. from case_application c
  69. JOIN case_affiliate ca ON ca.case_appli_id = c.id
  70. where c.id = ca.case_appli_id
  71. <if test="identityNum != null and identityNum != ''">
  72. and ca.identity_num = #{identityNum}
  73. </if>
  74. <if test="identityType != null ">
  75. and ca.identity_type = #{identityType}
  76. </if>
  77. <if test="phone != null and phone != ''">
  78. and (ca.contact_telphone = #{phone} or ca.contact_telphone_agent=#{phone})
  79. </if>
  80. <if test="caseStatusList != null and caseStatusList.size() > 0">
  81. and c.case_status in
  82. <foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
  83. #{caseStatus}
  84. </foreach>
  85. </if>
  86. )
  87. ) t order by t.create_time desc
  88. </select>
  89. </mapper>