|
|
@@ -39,7 +39,14 @@
|
|
39
|
39
|
|
|
40
|
40
|
<select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
|
41
|
41
|
select t1.* from(
|
|
42
|
|
- select t.* from(
|
|
|
42
|
+ select dinstinct(t.id),t.case_num ,t.case_subject_amount ,t.register_date ,t.arbitrat_method,
|
|
|
43
|
+ t.arbitratMethodName,t.case_status,t.caseStatusName,t.hear_date ,t.arbitrat_claims ,
|
|
|
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
|
+ 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,
|
|
|
48
|
+ t.arbitrator_id,t.identity_num , t.identity_type,t.filearbitra_url
|
|
|
49
|
+ from(
|
|
43
|
50
|
select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
|
|
44
|
51
|
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
|
|
45
|
52
|
ELSE '无审理方式'
|
|
|
@@ -98,19 +105,106 @@
|
|
98
|
105
|
#{item}
|
|
99
|
106
|
</foreach> )
|
|
100
|
107
|
</if>
|
|
101
|
|
-
|
|
|
108
|
+ <where>
|
|
|
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))
|
|
|
113
|
+ )
|
|
|
114
|
+ </if>
|
|
|
115
|
+ </where>
|
|
102
|
116
|
</where>
|
|
103
|
117
|
) t1
|
|
|
118
|
+<!-- <where>-->
|
|
|
119
|
+<!-- <!–申请人–>-->
|
|
|
120
|
+<!-- <if test="nameId != null and nameId != ''">-->
|
|
|
121
|
+<!-- and ( t1.application_organ_id = #{nameId} AND t1.identity_type=1-->
|
|
|
122
|
+<!-- and t1.case_status in (0,2)-->
|
|
|
123
|
+<!-- )-->
|
|
|
124
|
+<!-- </if>-->
|
|
|
125
|
+<!-- </where>-->
|
|
|
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
|
|
104
|
169
|
<where>
|
|
|
170
|
+
|
|
|
171
|
+ <!--被申请人-->
|
|
|
172
|
+ <if test="idCard != null and idCard != ''">
|
|
|
173
|
+ or (t.identity_num=#{idCard} AND t.identity_type=2 and t.case_status=4)
|
|
|
174
|
+ </if>
|
|
|
175
|
+ <!--仲裁员-->
|
|
|
176
|
+ <if test="userId != null and userId != ''">
|
|
|
177
|
+ or ( t.identity_type=1 and
|
|
|
178
|
+ t.case_status in (7,8,9,12,13,14)
|
|
|
179
|
+ and
|
|
|
180
|
+ instr (t.arbitrator_id,#{userId})>0)
|
|
|
181
|
+ </if>
|
|
|
182
|
+ <!--法律顾问-->
|
|
|
183
|
+ <if test="deptIds != null and deptIds.size() > 0">
|
|
|
184
|
+ or (t.identity_type=1 and t.case_status in (1,5,11,15,16)
|
|
|
185
|
+ and t.application_organ_id in
|
|
|
186
|
+ <foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
|
|
187
|
+ #{item}
|
|
|
188
|
+ </foreach> )
|
|
|
189
|
+ </if>
|
|
105
|
190
|
<!--申请人-->
|
|
106
|
191
|
<if test="nameId != null and nameId != ''">
|
|
107
|
|
- and ( t1.application_organ_id = #{nameId} AND t1.identity_type=1
|
|
108
|
|
- and t1.case_status in (0,2)
|
|
|
192
|
+ or( ( t.application_organ_id = #{nameId} AND t.identity_type=1
|
|
|
193
|
+ and t.case_status in (0,2))
|
|
109
|
194
|
)
|
|
110
|
195
|
</if>
|
|
111
|
196
|
</where>
|
|
112
|
|
- order by t1.create_time desc,t1.case_num desc
|
|
|
197
|
+ ) t1
|
|
|
198
|
+-- <where>
|
|
|
199
|
+<!-- <!–申请人–>-->
|
|
|
200
|
+<!-- <if test="nameId != null and nameId != ''">-->
|
|
|
201
|
+<!-- and ( t1.application_organ_id = #{nameId} AND t1.identity_type=1-->
|
|
|
202
|
+<!-- and t1.case_status in (0,2)-->
|
|
|
203
|
+<!-- )-->
|
|
|
204
|
+<!-- </if>-->
|
|
|
205
|
+-- </where>
|
|
113
|
206
|
</select>
|
|
|
207
|
+
|
|
114
|
208
|
<select id="selectAdminCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
|
115
|
209
|
select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
|
|
116
|
210
|
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
|
|
|
@@ -150,6 +244,53 @@
|
|
150
|
244
|
</where>
|
|
151
|
245
|
order by c.create_time desc,c.case_num desc
|
|
152
|
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
|
+ LEFT 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
|
+
|
|
|
293
|
+ </select>
|
|
153
|
294
|
<select id="selectDeptHeadCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
|
154
|
295
|
select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
|
|
155
|
296
|
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
|
|
|
@@ -193,6 +334,35 @@
|
|
193
|
334
|
</where>
|
|
194
|
335
|
order by c.create_time desc,c.case_num desc
|
|
195
|
336
|
</select>
|
|
|
337
|
+ <select id="selectDeptHeadCaseToDoCount" resultType="com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount">
|
|
|
338
|
+ select sum( case when c.case_status=0 then 1 else 0 end) caseApply,
|
|
|
339
|
+ sum( case when c.case_status=1 then 1 else 0 end) caseApplyCheck,
|
|
|
340
|
+ sum( case when c.case_status=2 then 1 else 0 end) caseApplyPay,
|
|
|
341
|
+ sum( case when c.case_status=3 then 1 else 0 end) caseApplyPayCheck,
|
|
|
342
|
+ sum( case when c.case_status=4 then 1 else 0 end) caseApplyEvidence,
|
|
|
343
|
+ sum( case when c.case_status=5 then 1 else 0 end) caseApplyGroupCheck,
|
|
|
344
|
+ sum( case when c.case_status=6 then 1 else 0 end) caseApplyGroupConfirm,
|
|
|
345
|
+ sum( case when c.case_status=7 then 1 else 0 end) caseApplyArbitrateWay,
|
|
|
346
|
+ sum( case when c.case_status=8 then 1 else 0 end) caseApplyGroupOnline,
|
|
|
347
|
+ sum( case when c.case_status=9 then 1 else 0 end) caseApplyGroupOffline,
|
|
|
348
|
+ sum( case when c.case_status=10 then 1 else 0 end) caseApplyAward,
|
|
|
349
|
+ sum( case when c.case_status=11 then 1 else 0 end) caseApplyAwardCheck,
|
|
|
350
|
+ sum( case when c.case_status=12 then 1 else 0 end) caseApplyAwardConfirm,
|
|
|
351
|
+ sum( case when c.case_status=13 then 1 else 0 end) caseApplyAwardSign,
|
|
|
352
|
+ sum( case when c.case_status=14 then 1 else 0 end) caseApplyAwardSeal,
|
|
|
353
|
+ sum( case when c.case_status=15 then 1 else 0 end) caseApplyAwardSend,
|
|
|
354
|
+ sum( case when c.case_status=16 then 1 else 0 end) caseApplyStored,
|
|
|
355
|
+ sum( case when c.case_status=17 then 1 else 0 end) caseApplyArchived
|
|
|
356
|
+ from case_application c
|
|
|
357
|
+ LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
|
|
|
358
|
+ <where>
|
|
|
359
|
+ c.case_status in
|
|
|
360
|
+ <foreach item="caseStatus" collection="statusList" open="(" separator="," close=")">
|
|
|
361
|
+ #{caseStatus}
|
|
|
362
|
+ </foreach>
|
|
|
363
|
+ </where>
|
|
|
364
|
+
|
|
|
365
|
+ </select>
|
|
196
|
366
|
|
|
197
|
367
|
|
|
198
|
368
|
<select id="selectCaseApplicationCount" parameterType="CaseApplication" resultType="int">
|