|
|
@@ -39,12 +39,11 @@
|
|
39
|
39
|
|
|
40
|
40
|
<select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
|
41
|
41
|
select t1.* from(
|
|
42
|
|
- select dinstinct(t.id),t.case_num ,t.case_subject_amount ,t.register_date ,t.arbitrat_method,
|
|
|
42
|
+ select DISTINCT(t.id),t.case_num ,t.case_subject_amount ,t.register_date ,t.arbitrat_method,
|
|
43
|
43
|
t.arbitratMethodName,t.case_status,t.caseStatusName,t.hear_date ,t.arbitrat_claims ,
|
|
44
|
44
|
t.loan_start_date ,t.loan_end_date ,t.claim_princi_owed ,t.claim_interest_owed ,t.claim_liquid_damag,t.fee_payable ,
|
|
45
|
45
|
t.begin_video_date ,t.online_video_person ,t.contract_number ,t.create_by ,t.create_time ,
|
|
46
|
|
- t.update_by ,t.update_time , t.arbitrator_name,t.name,t.application_organ_id,t.application_organ_name as
|
|
47
|
|
- applicantName,
|
|
|
46
|
+ t.update_by ,t.update_time , t.arbitrator_name,t.name,t.application_organ_id,t.applicantName,
|
|
48
|
47
|
t.arbitrator_id,t.identity_num , t.identity_type,t.filearbitra_url
|
|
49
|
48
|
from(
|
|
50
|
49
|
select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
|
|
|
@@ -105,14 +104,25 @@
|
|
105
|
104
|
#{item}
|
|
106
|
105
|
</foreach> )
|
|
107
|
106
|
</if>
|
|
108
|
|
- <where>
|
|
|
107
|
+
|
|
109
|
108
|
<!--申请人-->
|
|
110
|
109
|
<if test="nameId != null and nameId != ''">
|
|
111
|
|
- or( ( t.application_organ_id = #{nameId} AND t.identity_type=1
|
|
|
110
|
+ or ( t.application_organ_id = #{nameId} AND t.identity_type=1
|
|
112
|
111
|
and t.case_status in (0,2))
|
|
113
|
|
- )
|
|
|
112
|
+
|
|
114
|
113
|
</if>
|
|
115
|
|
- </where>
|
|
|
114
|
+ <!--部门长-->
|
|
|
115
|
+ <if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
|
|
|
116
|
+ or t.case_status in
|
|
|
117
|
+ <foreach item="caseStatus" collection="deptHeadStatus" open="(" separator="," close=")">
|
|
|
118
|
+ #{caseStatus}
|
|
|
119
|
+ </foreach>
|
|
|
120
|
+ </if>
|
|
|
121
|
+ <!--申请人-->
|
|
|
122
|
+ <if test="financeStatus != null and financeStatus != ''">
|
|
|
123
|
+ or( t.case_status =#{financeStatus})
|
|
|
124
|
+
|
|
|
125
|
+ </if>
|
|
116
|
126
|
</where>
|
|
117
|
127
|
) t1
|
|
118
|
128
|
<!-- <where>-->
|
|
|
@@ -356,10 +366,38 @@
|
|
356
|
366
|
from case_application c
|
|
357
|
367
|
LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
|
|
358
|
368
|
<where>
|
|
359
|
|
- c.case_status in
|
|
|
369
|
+ <!--部门长-->
|
|
|
370
|
+ <if test="statusList != null and statusList.size() > 0">
|
|
|
371
|
+ or c.case_status in
|
|
360
|
372
|
<foreach item="caseStatus" collection="statusList" open="(" separator="," close=")">
|
|
361
|
373
|
#{caseStatus}
|
|
362
|
374
|
</foreach>
|
|
|
375
|
+ <!--被申请人-->
|
|
|
376
|
+ <if test="idCard != null and idCard != ''">
|
|
|
377
|
+ or (t.identity_num=#{idCard} AND t.identity_type=2 and t.case_status=4)
|
|
|
378
|
+ </if>
|
|
|
379
|
+ <!--仲裁员-->
|
|
|
380
|
+ <if test="userId != null and userId != ''">
|
|
|
381
|
+ or ( t.identity_type=1 and
|
|
|
382
|
+ t.case_status in (7,8,9,12,13,14)
|
|
|
383
|
+ and
|
|
|
384
|
+ instr (t.arbitrator_id,#{userId})>0)
|
|
|
385
|
+ </if>
|
|
|
386
|
+ <!--法律顾问-->
|
|
|
387
|
+ <if test="deptIds != null and deptIds.size() > 0">
|
|
|
388
|
+ or (t.identity_type=1 and t.case_status in (1,5,11,15,16)
|
|
|
389
|
+ and t.application_organ_id in
|
|
|
390
|
+ <foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
|
|
391
|
+ #{item}
|
|
|
392
|
+ </foreach> )
|
|
|
393
|
+ </if>
|
|
|
394
|
+ <!--申请人-->
|
|
|
395
|
+ <if test="nameId != null and nameId != ''">
|
|
|
396
|
+ or( ( t.application_organ_id = #{nameId} AND t.identity_type=1
|
|
|
397
|
+ and t.case_status in (0,2))
|
|
|
398
|
+ )
|
|
|
399
|
+ </if>
|
|
|
400
|
+ </if>
|
|
363
|
401
|
</where>
|
|
364
|
402
|
|
|
365
|
403
|
</select>
|