智能仲裁后端服务

CaseApplicationMapper.xml 14KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  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.CaseApplicationMapper">
  6. <resultMap type="CaseApplication" id="CaseApplicationResult">
  7. <id property="id" column="id" />
  8. <result property="caseNum" column="case_num" />
  9. <result property="caseSubjectAmount" column="case_subject_amount" />
  10. <result property="registerDate" column="register_date" />
  11. <result property="arbitratMethod" column="arbitrat_method" />
  12. <result property="caseStatus" column="case_status" />
  13. <result property="hearDate" column="hear_date" />
  14. <result property="arbitratClaims" column="arbitrat_claims" />
  15. <result property="loanStartDate" column="loan_start_date" />
  16. <result property="loanEndDate" column="loan_end_date" />
  17. <result property="claimPrinciOwed" column="claim_princi_owed" />
  18. <result property="claimInterestOwed" column="claim_interest_owed" />
  19. <result property="claimLiquidDamag" column="claim_liquid_damag" />
  20. <result property="feePayable" column="fee_payable" />
  21. <result property="beginVideoDate" column="begin_video_date" />
  22. <result property="onlineVideoPerson" column="online_video_person" />
  23. <result property="contractNumber" column="contract_number" />
  24. <result property="caseStatusName" column="caseStatusName" />
  25. <result property="createBy" column="create_by" />
  26. <result property="createTime" column="create_time" />
  27. <result property="updateBy" column="update_by" />
  28. <result property="updateTime" column="update_time" />
  29. <result property="arbitratMethodName" column="arbitratMethodName" />
  30. <result property="arbitratorId" column="arbitrator_id" />
  31. <result property="arbitratorName" column="arbitrator_name" />
  32. <result property="paymentStatus" column="payment_status" />
  33. <result property="paymentStatusName" column="paymentStatusName" />
  34. </resultMap>
  35. <select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
  36. select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
  37. CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
  38. ELSE '无审理方式'
  39. END arbitratMethodName,
  40. c.case_status ,
  41. CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
  42. when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
  43. when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
  44. when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
  45. when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
  46. when 15 then '待仲裁文书送达' when 16 then '待案件归档'
  47. ELSE '无案件状态'
  48. END caseStatusName,
  49. c.hear_date ,c.arbitrat_claims ,
  50. c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
  51. c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
  52. c.update_by ,c.update_time , c.arbitrator_name
  53. from case_application c
  54. <where>
  55. <if test="caseStatus != null">
  56. AND c.case_status = #{caseStatus}
  57. </if>
  58. <if test="caseNum != null and caseNum != ''">
  59. AND c.case_num = #{caseNum}
  60. </if>
  61. <if test="caseStatusList != null and caseStatusList.size() > 0">
  62. and c.case_status in
  63. <foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
  64. #{caseStatus}
  65. </foreach>
  66. </if>
  67. </where>
  68. order by c.create_time desc,c.case_num desc
  69. </select>
  70. <select id="selectCaseApplicationCount" parameterType="CaseApplication" resultType="int">
  71. select count(1) from case_application c
  72. <where>
  73. <if test="caseNum != null and caseNum != ''">
  74. AND c.case_num = #{caseNum}
  75. </if>
  76. </where>
  77. </select>
  78. <insert id="insertCaseApplication" parameterType="CaseApplication" useGeneratedKeys="true" keyProperty="id">
  79. insert into case_application(
  80. <if test="caseNum != null and caseNum != ''">case_num,</if>
  81. <if test="caseSubjectAmount != null">case_subject_amount,</if>
  82. <if test="registerDate != null">register_date,</if>
  83. <if test="arbitratMethod != null and arbitratMethod != ''">arbitrat_method,</if>
  84. <if test="caseStatus != null ">case_status,</if>
  85. <if test="hearDate != null ">hear_date,</if>
  86. <if test="arbitratClaims != null and arbitratClaims != ''">arbitrat_claims,</if>
  87. <if test="loanStartDate != null ">loan_start_date,</if>
  88. <if test="loanEndDate != null ">loan_end_date,</if>
  89. <if test="claimPrinciOwed != null ">claim_princi_owed,</if>
  90. <if test="claimInterestOwed != null ">claim_interest_owed,</if>
  91. <if test="claimLiquidDamag != null ">claim_liquid_damag,</if>
  92. <if test="feePayable != null ">fee_payable,</if>
  93. <if test="beginVideoDate != null ">begin_video_date,</if>
  94. <if test="onlineVideoPerson != null and onlineVideoPerson != ''">online_video_person,</if>
  95. <if test="contractNumber != null and contractNumber != ''">contract_number,</if>
  96. <if test="createBy != null and createBy != ''">create_by,</if>
  97. create_time
  98. )values(
  99. <if test="caseNum != null and caseNum != ''">#{caseNum},</if>
  100. <if test="caseSubjectAmount != null">#{caseSubjectAmount},</if>
  101. <if test="registerDate != null">#{registerDate},</if>
  102. <if test="arbitratMethod != null and arbitratMethod != ''">#{arbitratMethod},</if>
  103. <if test="caseStatus != null ">#{caseStatus},</if>
  104. <if test="hearDate != null ">#{hearDate},</if>
  105. <if test="arbitratClaims != null and arbitratClaims != ''">#{arbitratClaims},</if>
  106. <if test="loanStartDate != null ">#{loanStartDate},</if>
  107. <if test="loanEndDate != null ">#{loanEndDate},</if>
  108. <if test="claimPrinciOwed != null ">#{claimPrinciOwed},</if>
  109. <if test="claimInterestOwed != null ">#{claimInterestOwed},</if>
  110. <if test="claimLiquidDamag != null ">#{claimLiquidDamag},</if>
  111. <if test="feePayable != null ">#{feePayable},</if>
  112. <if test="beginVideoDate != null ">#{beginVideoDate},</if>
  113. <if test="onlineVideoPerson != null and onlineVideoPerson != ''">#{onlineVideoPerson},</if>
  114. <if test="contractNumber != null and contractNumber != ''">#{contractNumber},</if>
  115. <if test="createBy != null and createBy != ''">#{createBy},</if>
  116. sysdate()
  117. )
  118. </insert>
  119. <update id="updataCaseApplication" parameterType="CaseApplication">
  120. update case_application
  121. <set>
  122. <if test="caseSubjectAmount != null">case_subject_amount = #{caseSubjectAmount},</if>
  123. <if test="registerDate != null">register_date = #{registerDate},</if>
  124. <if test="arbitratMethod != null and arbitratMethod != ''">arbitrat_method = #{arbitratMethod},</if>
  125. <if test="hearDate != null ">hear_date = #{hearDate},</if>
  126. <if test="arbitratClaims != null and arbitratClaims != ''">arbitrat_claims = #{arbitratClaims},</if>
  127. <if test="loanStartDate != null ">loan_start_date = #{loanStartDate},</if>
  128. <if test="loanEndDate != null ">loan_end_date = #{loanEndDate},</if>
  129. <if test="loanEndDate != null ">claim_princi_owed = #{claimPrinciOwed},</if>
  130. <if test="claimInterestOwed != null ">claim_interest_owed = #{claimInterestOwed},</if>
  131. <if test="claimLiquidDamag != null ">claim_liquid_damag = #{claimLiquidDamag},</if>
  132. <if test="feePayable != null ">fee_payable = #{feePayable},</if>
  133. <if test="beginVideoDate != null ">begin_video_date = #{beginVideoDate},</if>
  134. <if test="onlineVideoPerson != null and onlineVideoPerson != ''">online_video_person = #{onlineVideoPerson},</if>
  135. <if test="contractNumber != null and contractNumber != ''">contract_number = #{contractNumber},</if>
  136. <if test="caseName != null and caseName != ''">case_name = #{caseName},</if>
  137. <if test="caseDescribe != null and caseDescribe != ''">case_describe = #{caseDescribe},</if>
  138. <if test="caseResult != null and caseResult != ''">case_result = #{caseResult},</if>
  139. <if test="caseStatus != null">case_status = #{caseStatus},</if>
  140. <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
  141. <if test="caseNum != null and caseNum != ''">case_num = #{caseNum},</if>
  142. update_time = sysdate()
  143. </set>
  144. where id = #{id}
  145. </update>
  146. <update id="submitCaseApplication" parameterType="CaseApplication">
  147. update case_application
  148. <set>
  149. <if test="caseStatus != null">case_status = #{caseStatus},</if>
  150. <if test="arbitratorId != null and arbitratorId != ''">arbitrator_id = #{arbitratorId},</if>
  151. <if test="arbitratorName != null and arbitratorName != ''">arbitrator_name = #{arbitratorName},</if>
  152. <if test="pendingAppointArbotrar != null ">pending_appoint_arbotrar = #{pendingAppointArbotrar},</if>
  153. <if test="arbitratMethod != null ">arbitrat_method = #{arbitratMethod},</if>
  154. <if test="caseName != null and caseName != ''">case_name = #{caseName},</if>
  155. <if test="caseDescribe != null and caseDescribe != ''">case_describe = #{caseDescribe},</if>
  156. <if test="caseResult != null and caseResult != ''">case_result = #{caseResult},</if>
  157. <if test="isAgreePendTral != null">is_agree_pend_tral = #{isAgreePendTral},</if>
  158. <if test="objectionAddEviden != null">objection_add_eviden = #{objectionAddEviden},</if>
  159. <if test="openCourtHear != null">open_court_hear = #{openCourtHear},</if>
  160. <if test="hearDate != null">hear_date = #{hearDate},</if>
  161. </set>
  162. where id = #{id}
  163. </update>
  164. <delete id="deletecaseApplication" parameterType="CaseApplication">
  165. delete from case_application where id = #{id}
  166. </delete>
  167. <select id="selectCaseApplication" parameterType="CaseApplication" resultMap="CaseApplicationResult">
  168. select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
  169. CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
  170. ELSE '无审理方式'
  171. END arbitratMethodName,
  172. c.case_status ,
  173. CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
  174. when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
  175. when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
  176. when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
  177. when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
  178. when 15 then '待仲裁文书送达' when 16 then '待案件归档'
  179. ELSE '无案件状态'
  180. END caseStatusName,
  181. c.hear_date ,c.arbitrat_claims ,
  182. c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
  183. c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
  184. c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name
  185. from case_application c
  186. <where>
  187. <if test="id != null ">
  188. AND c.id = #{id}
  189. </if>
  190. </where>
  191. </select>
  192. <select id="selectCaseApplicationConfirm" parameterType="CaseApplication" resultMap="CaseApplicationResult">
  193. select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
  194. CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
  195. ELSE '无审理方式'
  196. END arbitratMethodName,
  197. c.case_status ,
  198. CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
  199. when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
  200. when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
  201. when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
  202. when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
  203. when 15 then '待仲裁文书送达' when 16 then '待案件归档'
  204. ELSE '无案件状态'
  205. END caseStatusName,
  206. c.hear_date ,c.arbitrat_claims ,
  207. c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
  208. c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
  209. c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name,
  210. p.payment_status ,
  211. CASE p.payment_status when 1 then '已支付' when 0 then '未支付'
  212. ELSE '无支付状态'
  213. END paymentStatusName
  214. from case_application c left join case_payment_record p on c.id = p.case_id
  215. where c.case_status = 3 and p.payment_status = 1
  216. AND c.id = #{id}
  217. </select>
  218. <select id="selectCaseNumLike" resultType="java.lang.Integer">
  219. select max(substring(case_num, #{length}+1,12)+1) as maxCaseNum
  220. from case_application where case_num like CONCAT(#{caseNum},'%') ;
  221. </select>
  222. </mapper>