智能仲裁后端服务

CaseApplicationMapper.xml 28KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512
  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="isAbsence" column="is_absence" />
  31. <result property="responCrossOpin" column="respon_cross_opin" />
  32. <result property="applicaCrossOpin" column="applica_cross_opin" />
  33. <result property="responDefenOpini" column="respon_defen_opini" />
  34. <result property="arbitratorId" column="arbitrator_id" />
  35. <result property="arbitratorName" column="arbitrator_name" />
  36. <result property="paymentStatus" column="payment_status" />
  37. <result property="paymentStatusName" column="paymentStatusName" />
  38. <result property="filearbitraUrl" column="filearbitra_url" />
  39. <result property="requestRule" column="request_rule" />
  40. <result property="properPreser" column="proper_preser" />
  41. <result property="adjudicaCounter" column="adjudica_counter" />
  42. </resultMap>
  43. <select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
  44. select t1.* from(
  45. select DISTINCT(t.id),t.case_num ,t.case_subject_amount ,t.register_date ,t.arbitrat_method,
  46. t.arbitratMethodName,t.case_status,t.caseStatusName,t.hear_date ,t.arbitrat_claims ,
  47. t.loan_start_date ,t.loan_end_date ,t.claim_princi_owed ,t.claim_interest_owed ,t.claim_liquid_damag,t.fee_payable ,
  48. t.begin_video_date ,t.online_video_person ,t.contract_number ,t.create_by ,t.create_time ,
  49. t.update_by ,t.update_time , t.arbitrator_name,t.name,t.application_organ_id,t.applicantName,
  50. t.arbitrator_id,t.identity_num , t.identity_type,t.filearbitra_url
  51. from(
  52. select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
  53. CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
  54. ELSE '无审理方式'
  55. END arbitratMethodName,
  56. c.case_status ,
  57. CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
  58. when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
  59. when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
  60. when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
  61. when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
  62. when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
  63. ELSE '无案件状态'
  64. END caseStatusName,
  65. c.hear_date ,c.arbitrat_claims ,
  66. c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag
  67. ,c.fee_payable ,
  68. c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
  69. c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id,ca.application_organ_name as
  70. applicantName,
  71. c.arbitrator_id,ca.identity_num , ca.identity_type,c.filearbitra_url
  72. from case_application c
  73. LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id
  74. <where>
  75. <if test="caseStatus != null">
  76. AND c.case_status = #{caseStatus}
  77. </if>
  78. <if test="caseNum != null and caseNum != ''">
  79. AND c.case_num = #{caseNum}
  80. </if>
  81. <if test="caseStatusList != null and caseStatusList.size() > 0">
  82. and c.case_status in
  83. <foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
  84. #{caseStatus}
  85. </foreach>
  86. </if>
  87. </where>
  88. ) t
  89. <where>
  90. <!--被申请人-->
  91. <if test="idCard != null and idCard != ''">
  92. or (t.identity_num=#{idCard} AND t.identity_type=2 and (t.case_status=4 or t.case_status=17))
  93. </if>
  94. <!--仲裁员-->
  95. <if test="userId != null and userId != ''">
  96. or ( t.identity_type=1 and
  97. t.case_status in (7,8,9,12,13,14,17)
  98. and
  99. instr (t.arbitrator_id,#{userId})>0)
  100. </if>
  101. <!--法律顾问-->
  102. <if test="deptIds != null and deptIds.size() > 0">
  103. or (t.identity_type=1 and t.case_status in (1,5,11,15,16,17)
  104. and t.application_organ_id in
  105. <foreach item="item" collection="deptIds" open="(" separator="," close=")">
  106. #{item}
  107. </foreach> )
  108. </if>
  109. <!--申请人-->
  110. <if test="nameId != null and nameId != ''">
  111. or ( t.application_organ_id = #{nameId} AND t.identity_type=1
  112. and t.case_status in (0,2,17))
  113. </if>
  114. <!--部门长-->
  115. <if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
  116. or (t.identity_type=1 and t.case_status in
  117. <foreach item="caseStatus" collection="deptHeadStatus" open="(" separator="," close=")">#{caseStatus}
  118. </foreach>)
  119. </if>
  120. <!--财务-->
  121. <if test="financeStatus != null and financeStatus != ''">
  122. or (t.identity_type=1 and t.case_status =#{financeStatus})
  123. </if>
  124. </where>
  125. ) t1
  126. order by t1.create_time desc,t1.case_num desc
  127. </select>
  128. <select id="selectTodoCountByRole" resultType="com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount">
  129. select sum( case when t1.case_status=0 then 1 else 0 end) caseApply,
  130. sum( case when t1.case_status=1 then 1 else 0 end) caseApplyCheck,
  131. sum( case when t1.case_status=2 then 1 else 0 end) caseApplyPay,
  132. sum( case when t1.case_status=3 then 1 else 0 end) caseApplyPayCheck,
  133. sum( case when t1.case_status=4 then 1 else 0 end) caseApplyEvidence,
  134. sum( case when t1.case_status=5 then 1 else 0 end) caseApplyGroupCheck,
  135. sum( case when t1.case_status=6 then 1 else 0 end) caseApplyGroupConfirm,
  136. sum( case when t1.case_status=7 then 1 else 0 end) caseApplyArbitrateWay,
  137. sum( case when t1.case_status=8 then 1 else 0 end) caseApplyGroupOnline,
  138. sum( case when t1.case_status=9 then 1 else 0 end) caseApplyGroupOffline,
  139. sum( case when t1.case_status=10 then 1 else 0 end) caseApplyAward,
  140. sum( case when t1.case_status=11 then 1 else 0 end) caseApplyAwardCheck,
  141. sum( case when t1.case_status=12 then 1 else 0 end) caseApplyAwardConfirm,
  142. sum( case when t1.case_status=13 then 1 else 0 end) caseApplyAwardSign,
  143. sum( case when t1.case_status=14 then 1 else 0 end) caseApplyAwardSeal,
  144. sum( case when t1.case_status=15 then 1 else 0 end) caseApplyAwardSend,
  145. sum( case when t1.case_status=16 then 1 else 0 end) caseApplyStored,
  146. sum( case when t1.case_status=17 then 1 else 0 end) caseApplyArchived
  147. from(
  148. select DISTINCT(t.id),t.case_status,t.application_organ_id, t.arbitrator_id,t.identity_num , t.identity_type from(
  149. select c.id ,
  150. c.case_status,ca.application_organ_id,
  151. c.arbitrator_id,ca.identity_num , ca.identity_type
  152. from case_application c
  153. LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id
  154. <where>
  155. <if test="caseStatus != null">
  156. AND c.case_status = #{caseStatus}
  157. </if>
  158. <if test="caseNum != null and caseNum != ''">
  159. AND c.case_num = #{caseNum}
  160. </if>
  161. <if test="caseStatusList != null and caseStatusList.size() > 0">
  162. and c.case_status in
  163. <foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
  164. #{caseStatus}
  165. </foreach>
  166. </if>
  167. </where>
  168. ) t
  169. <where>
  170. <!--被申请人-->
  171. <if test="idCard != null and idCard != ''">
  172. or (t.identity_num=#{idCard} AND t.identity_type=2 and (t.case_status=4 or t.case_status=17))
  173. </if>
  174. <!--仲裁员-->
  175. <if test="userId != null and userId != ''">
  176. or ( t.identity_type=1 and
  177. t.case_status in (7,8,9,12,13,14,17)
  178. and
  179. instr (t.arbitrator_id,#{userId})>0)
  180. </if>
  181. <!--法律顾问-->
  182. <if test="deptIds != null and deptIds.size() > 0">
  183. or (t.identity_type=1 and t.case_status in (1,5,11,15,16,17)
  184. and t.application_organ_id in
  185. <foreach item="item" collection="deptIds" open="(" separator="," close=")">
  186. #{item}
  187. </foreach> )
  188. </if>
  189. <!--申请人-->
  190. <if test="nameId != null and nameId != ''">
  191. or ( t.application_organ_id = #{nameId} AND t.identity_type=1
  192. and t.case_status in (0,2,17))
  193. </if>
  194. <!--部门长-->
  195. <if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
  196. or (t.identity_type=1 and t.case_status in
  197. <foreach item="caseStatus" collection="deptHeadStatus" open="(" separator="," close=")">
  198. #{caseStatus}
  199. </foreach>)
  200. </if>
  201. <!--财务-->
  202. <if test="financeStatus != null and financeStatus != ''">
  203. or ( t.identity_type=1 and t.case_status =#{financeStatus})
  204. </if>
  205. </where>
  206. ) t1
  207. </select>
  208. <select id="selectAdminCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
  209. select DISTINCT(c.id) id,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
  210. CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
  211. ELSE '无审理方式'
  212. END arbitratMethodName,
  213. c.case_status ,
  214. CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
  215. when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
  216. when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
  217. when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
  218. when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
  219. when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
  220. ELSE '无案件状态'
  221. END caseStatusName,
  222. c.hear_date ,c.arbitrat_claims ,
  223. c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
  224. c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
  225. c.update_by ,c.update_time , c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,c.filearbitra_url
  226. from case_application c
  227. LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
  228. <where>
  229. <if test="caseStatus != null">
  230. AND c.case_status = #{caseStatus}
  231. </if>
  232. <if test="caseNum != null and caseNum != ''">
  233. AND c.case_num = #{caseNum}
  234. </if>
  235. <if test="nameId != null and nameId != ''">
  236. AND ca.application_organ_id=#{nameId} AND ca.identity_type=1
  237. </if>
  238. <if test="caseStatusList != null and caseStatusList.size() > 0">
  239. and c.case_status in
  240. <foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
  241. #{caseStatus}
  242. </foreach>
  243. </if>
  244. </where>
  245. order by c.create_time desc,c.case_num desc
  246. </select>
  247. <select id="selectAdminCaseToDoCount" resultType="com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount">
  248. SELECT
  249. sum( case when c.case_status=0 then 1 else 0 end) caseApply,
  250. sum( case when c.case_status=1 then 1 else 0 end) caseApplyCheck,
  251. sum( case when c.case_status=2 then 1 else 0 end) caseApplyPay,
  252. sum( case when c.case_status=3 then 1 else 0 end) caseApplyPayCheck,
  253. sum( case when c.case_status=4 then 1 else 0 end) caseApplyEvidence,
  254. sum( case when c.case_status=5 then 1 else 0 end) caseApplyGroupCheck,
  255. sum( case when c.case_status=6 then 1 else 0 end) caseApplyGroupConfirm,
  256. sum( case when c.case_status=7 then 1 else 0 end) caseApplyArbitrateWay,
  257. sum( case when c.case_status=8 then 1 else 0 end) caseApplyGroupOnline,
  258. sum( case when c.case_status=9 then 1 else 0 end) caseApplyGroupOffline,
  259. sum( case when c.case_status=10 then 1 else 0 end) caseApplyAward,
  260. sum( case when c.case_status=11 then 1 else 0 end) caseApplyAwardCheck,
  261. sum( case when c.case_status=12 then 1 else 0 end) caseApplyAwardConfirm,
  262. sum( case when c.case_status=13 then 1 else 0 end) caseApplyAwardSign,
  263. sum( case when c.case_status=14 then 1 else 0 end) caseApplyAwardSeal,
  264. sum( case when c.case_status=15 then 1 else 0 end) caseApplyAwardSend,
  265. sum( case when c.case_status=16 then 1 else 0 end) caseApplyStored,
  266. sum( case when c.case_status=17 then 1 else 0 end) caseApplyArchived
  267. FROM
  268. case_application c
  269. JOIN case_affiliate ca ON ca.case_appli_id = c.id
  270. AND ca.identity_type = 1
  271. WHERE
  272. c.case_status IN (
  273. 0,
  274. 1,
  275. 2,
  276. 3,
  277. 4,
  278. 5,
  279. 6,
  280. 7,
  281. 8,
  282. 9,
  283. 10,
  284. 11,
  285. 12,
  286. 13,
  287. 14,
  288. 15,
  289. 16,
  290. 17
  291. )
  292. </select>
  293. <select id="selectCaseApplicationCount" parameterType="CaseApplication" resultType="int">
  294. select count(1) from case_application c
  295. <where>
  296. <if test="caseNum != null and caseNum != ''">
  297. AND c.case_num = #{caseNum}
  298. </if>
  299. </where>
  300. </select>
  301. <insert id="insertCaseApplication" parameterType="CaseApplication" useGeneratedKeys="true" keyProperty="id">
  302. insert into case_application(
  303. <if test="caseNum != null and caseNum != ''">case_num,</if>
  304. <if test="caseSubjectAmount != null">case_subject_amount,</if>
  305. register_date,
  306. <if test="arbitratMethod != null and arbitratMethod != ''">arbitrat_method,</if>
  307. <if test="caseStatus != null ">case_status,</if>
  308. <if test="hearDate != null ">hear_date,</if>
  309. <if test="arbitratClaims != null and arbitratClaims != ''">arbitrat_claims,</if>
  310. <if test="requestRule != null and requestRule != ''">request_rule,</if>
  311. <if test="loanStartDate != null ">loan_start_date,</if>
  312. <if test="loanEndDate != null ">loan_end_date,</if>
  313. <if test="claimPrinciOwed != null ">claim_princi_owed,</if>
  314. <if test="claimInterestOwed != null ">claim_interest_owed,</if>
  315. <if test="claimLiquidDamag != null ">claim_liquid_damag,</if>
  316. <if test="feePayable != null ">fee_payable,</if>
  317. <if test="beginVideoDate != null ">begin_video_date,</if>
  318. <if test="onlineVideoPerson != null and onlineVideoPerson != ''">online_video_person,</if>
  319. <if test="contractNumber != null and contractNumber != ''">contract_number,</if>
  320. <if test="adjudicaCounter != null ">adjudica_counter,</if>
  321. <if test="properPreser != null ">proper_preser,</if>
  322. <if test="createBy != null and createBy != ''">create_by,</if>
  323. create_time
  324. )values(
  325. <if test="caseNum != null and caseNum != ''">#{caseNum},</if>
  326. <if test="caseSubjectAmount != null">#{caseSubjectAmount},</if>
  327. sysdate(),
  328. <if test="arbitratMethod != null and arbitratMethod != ''">#{arbitratMethod},</if>
  329. <if test="caseStatus != null ">#{caseStatus},</if>
  330. <if test="hearDate != null ">#{hearDate},</if>
  331. <if test="arbitratClaims != null and arbitratClaims != ''">#{arbitratClaims},</if>
  332. <if test="requestRule != null and requestRule != ''">#{requestRule},</if>
  333. <if test="loanStartDate != null ">#{loanStartDate},</if>
  334. <if test="loanEndDate != null ">#{loanEndDate},</if>
  335. <if test="claimPrinciOwed != null ">#{claimPrinciOwed},</if>
  336. <if test="claimInterestOwed != null ">#{claimInterestOwed},</if>
  337. <if test="claimLiquidDamag != null ">#{claimLiquidDamag},</if>
  338. <if test="feePayable != null ">#{feePayable},</if>
  339. <if test="beginVideoDate != null ">#{beginVideoDate},</if>
  340. <if test="onlineVideoPerson != null and onlineVideoPerson != ''">#{onlineVideoPerson},</if>
  341. <if test="contractNumber != null and contractNumber != ''">#{contractNumber},</if>
  342. <if test="adjudicaCounter != null ">#{adjudicaCounter},</if>
  343. <if test="properPreser != null ">#{properPreser},</if>
  344. <if test="createBy != null and createBy != ''">#{createBy},</if>
  345. sysdate()
  346. )
  347. </insert>
  348. <update id="updataCaseApplication" parameterType="CaseApplication">
  349. update case_application
  350. <set>
  351. <if test="caseSubjectAmount != null">case_subject_amount = #{caseSubjectAmount},</if>
  352. <if test="registerDate != null">register_date = #{registerDate},</if>
  353. <if test="arbitratMethod != null and arbitratMethod != ''">arbitrat_method = #{arbitratMethod},</if>
  354. <if test="hearDate != null ">hear_date = #{hearDate},</if>
  355. <if test="arbitratClaims != null and arbitratClaims != ''">arbitrat_claims = #{arbitratClaims},</if>
  356. <if test="requestRule != null and requestRule != ''">request_rule = #{requestRule},</if>
  357. <if test="loanStartDate != null ">loan_start_date = #{loanStartDate},</if>
  358. <if test="loanEndDate != null ">loan_end_date = #{loanEndDate},</if>
  359. <if test="loanEndDate != null ">claim_princi_owed = #{claimPrinciOwed},</if>
  360. <if test="claimInterestOwed != null ">claim_interest_owed = #{claimInterestOwed},</if>
  361. <if test="claimLiquidDamag != null ">claim_liquid_damag = #{claimLiquidDamag},</if>
  362. <if test="feePayable != null ">fee_payable = #{feePayable},</if>
  363. <if test="beginVideoDate != null ">begin_video_date = #{beginVideoDate},</if>
  364. <if test="onlineVideoPerson != null and onlineVideoPerson != ''">online_video_person = #{onlineVideoPerson},</if>
  365. <if test="contractNumber != null and contractNumber != ''">contract_number = #{contractNumber},</if>
  366. <if test="caseName != null and caseName != ''">case_name = #{caseName},</if>
  367. <if test="caseDescribe != null and caseDescribe != ''">case_describe = #{caseDescribe},</if>
  368. <if test="caseResult != null and caseResult != ''">case_result = #{caseResult},</if>
  369. <if test="caseStatus != null">case_status = #{caseStatus},</if>
  370. <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
  371. <if test="caseNum != null and caseNum != ''">case_num = #{caseNum},</if>
  372. update_time = sysdate()
  373. </set>
  374. where id = #{id}
  375. </update>
  376. <update id="submitCaseApplication" parameterType="CaseApplication">
  377. update case_application
  378. <set>
  379. <if test="caseStatus != null">case_status = #{caseStatus},</if>
  380. <if test="arbitratorId != null and arbitratorId != ''">arbitrator_id = #{arbitratorId},</if>
  381. <if test="arbitratorName != null and arbitratorName != ''">arbitrator_name = #{arbitratorName},</if>
  382. <if test="pendingAppointArbotrar != null ">pending_appoint_arbotrar = #{pendingAppointArbotrar},</if>
  383. <if test="arbitratMethod != null ">arbitrat_method = #{arbitratMethod},</if>
  384. <if test="caseName != null and caseName != ''">case_name = #{caseName},</if>
  385. <if test="caseDescribe != null and caseDescribe != ''">case_describe = #{caseDescribe},</if>
  386. <if test="caseResult != null and caseResult != ''">case_result = #{caseResult},</if>
  387. <if test="isAgreePendTral != null">is_agree_pend_tral = #{isAgreePendTral},</if>
  388. <if test="adjudicaCounter != null">adjudica_counter = #{adjudicaCounter},</if>
  389. <if test="objectiJuris != null">objecti_juris = #{objectiJuris},</if>
  390. <if test="isAbsence != null">is_absence = #{isAbsence},</if>
  391. <if test="appliIsAbsen != null">appli_is_absen = #{appliIsAbsen},</if>
  392. <if test="responCrossOpin != null and responCrossOpin != ''">respon_cross_opin = #{responCrossOpin},</if>
  393. <if test="applicaCrossOpin != null and applicaCrossOpin != ''">applica_cross_opin = #{applicaCrossOpin},</if>
  394. <if test="responDefenOpini != null and responDefenOpini != ''">respon_defen_opini = #{responDefenOpini},</if>
  395. <if test="objectionAddEviden != null">objection_add_eviden = #{objectionAddEviden},</if>
  396. <if test="openCourtHear != null">open_court_hear = #{openCourtHear},</if>
  397. <if test="hearDate != null">hear_date = #{hearDate},</if>
  398. <if test="filearbitraUrl != null and filearbitraUrl != ''">filearbitra_url = #{filearbitraUrl},</if>
  399. </set>
  400. where id = #{id}
  401. </update>
  402. <update id="updatePayType">
  403. update case_application set pay_type=#{payType} where id = #{caseId}
  404. </update>
  405. <delete id="deletecaseApplication" parameterType="CaseApplication">
  406. delete from case_application where id = #{id}
  407. </delete>
  408. <select id="selectCaseApplication" parameterType="CaseApplication" resultMap="CaseApplicationResult">
  409. select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
  410. CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
  411. ELSE '无审理方式'
  412. END arbitratMethodName,
  413. c.case_status ,
  414. CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
  415. when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
  416. when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
  417. when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
  418. when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
  419. when 15 then '待仲裁文书送达' when 16 then '待案件归档'
  420. ELSE '无案件状态'
  421. END caseStatusName,
  422. c.hear_date ,c.arbitrat_claims ,
  423. c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
  424. c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,c.request_rule,c.adjudica_counter,c.proper_preser,
  425. c.is_absence ,c.respon_cross_opin ,c.applica_cross_opin ,c.respon_defen_opini ,
  426. c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName
  427. from case_application c
  428. LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
  429. <where>
  430. <if test="id != null ">
  431. AND c.id = #{id}
  432. </if>
  433. </where>
  434. </select>
  435. <select id="selectCaseApplicationConfirm" parameterType="CaseApplication" resultMap="CaseApplicationResult">
  436. select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
  437. CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
  438. ELSE '无审理方式'
  439. END arbitratMethodName,
  440. c.case_status ,
  441. CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
  442. when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
  443. when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
  444. when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
  445. when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
  446. when 15 then '待仲裁文书送达' when 16 then '待案件归档'
  447. ELSE '无案件状态'
  448. END caseStatusName,
  449. c.hear_date ,c.arbitrat_claims ,
  450. c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
  451. c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
  452. c.update_by ,c.update_time,c.arbitrator_id,c.arbitrator_name,
  453. p.payment_status ,
  454. CASE p.payment_status when 1 then '已支付' when 0 then '未支付'
  455. ELSE '无支付状态'
  456. END paymentStatusName,c.pay_type,
  457. CASE c.pay_type when 0 then '线上支付' when 0 then '线下支付' else '' end payTypeName
  458. from case_application c left join case_payment_record p on c.id = p.case_id
  459. where c.case_status = 3
  460. AND c.id = #{id}
  461. </select>
  462. <select id="selectCaseNumLike" resultType="java.lang.Integer">
  463. select max(substring(case_num, #{length}+1,12)+1) as maxCaseNum
  464. from case_application where case_num like CONCAT(#{caseNum},'%') ;
  465. </select>
  466. <select id="selectArbitratorList" resultType="java.lang.String">
  467. select a.arbitrator_id id from case_application a where a.id=#{id}
  468. </select>
  469. </mapper>