|
|
@@ -42,28 +42,36 @@
|
|
42
|
42
|
</resultMap>
|
|
43
|
43
|
|
|
44
|
44
|
<select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
|
45
|
|
-select t1.* from(
|
|
46
|
|
- select t.* from(
|
|
|
45
|
+ select t1.* from(
|
|
|
46
|
+ select DISTINCT(t.id),t.case_num ,t.case_subject_amount ,t.register_date ,t.arbitrat_method,
|
|
|
47
|
+ t.arbitratMethodName,t.case_status,t.caseStatusName,t.hear_date ,t.arbitrat_claims ,
|
|
|
48
|
+ t.loan_start_date ,t.loan_end_date ,t.claim_princi_owed ,t.claim_interest_owed ,t.claim_liquid_damag,t.fee_payable ,
|
|
|
49
|
+ t.begin_video_date ,t.online_video_person ,t.contract_number ,t.create_by ,t.create_time ,
|
|
|
50
|
+ t.update_by ,t.update_time , t.arbitrator_name,t.name,t.application_organ_id,t.applicantName,
|
|
|
51
|
+ t.arbitrator_id,t.identity_num , t.identity_type,t.filearbitra_url
|
|
|
52
|
+ from(
|
|
47
|
53
|
select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
|
|
48
|
54
|
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
|
|
49
|
|
- ELSE '无审理方式'
|
|
50
|
|
- END arbitratMethodName,
|
|
|
55
|
+ ELSE '无审理方式'
|
|
|
56
|
+ END arbitratMethodName,
|
|
51
|
57
|
c.case_status ,
|
|
52
|
58
|
CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
|
|
53
|
|
- when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
|
|
54
|
|
- when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
|
|
55
|
|
- when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
|
|
56
|
|
- when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
|
|
57
|
|
- when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
|
|
58
|
|
- ELSE '无案件状态'
|
|
59
|
|
- END caseStatusName,
|
|
|
59
|
+ when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
|
|
|
60
|
+ when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
|
|
|
61
|
+ when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
|
|
|
62
|
+ when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
|
|
|
63
|
+ when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
|
|
|
64
|
+ ELSE '无案件状态'
|
|
|
65
|
+ END caseStatusName,
|
|
60
|
66
|
c.hear_date ,c.arbitrat_claims ,
|
|
61
|
|
- c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
|
|
|
67
|
+ c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag
|
|
|
68
|
+ ,c.fee_payable ,
|
|
62
|
69
|
c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
|
|
63
|
|
- c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id,ca.application_organ_name as applicantName,
|
|
|
70
|
+ c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id,ca.application_organ_name as
|
|
|
71
|
+ applicantName,
|
|
64
|
72
|
c.arbitrator_id,ca.identity_num , ca.identity_type,c.filearbitra_url
|
|
65
|
73
|
from case_application c
|
|
66
|
|
- LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
|
|
|
74
|
+ LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id
|
|
67
|
75
|
<where>
|
|
68
|
76
|
<if test="caseStatus != null">
|
|
69
|
77
|
AND c.case_status = #{caseStatus}
|
|
|
@@ -81,35 +89,149 @@ select t1.* from(
|
|
81
|
89
|
) t
|
|
82
|
90
|
<where>
|
|
83
|
91
|
|
|
84
|
|
- <!--被申请人-->
|
|
85
|
|
- <if test="idCard != null and idCard != ''">
|
|
86
|
|
- or (t.identity_num=#{idCard} AND t.identity_type=2)
|
|
87
|
|
- </if>
|
|
88
|
|
- <!--仲裁员-->
|
|
89
|
|
- <if test="userId != null and userId != ''">
|
|
90
|
|
- or instr (t.arbitrator_id,#{userId})>0
|
|
91
|
|
- </if>
|
|
92
|
|
- <!--法律顾问-->
|
|
93
|
|
- <if test="deptIds != null and deptIds.size() > 0">
|
|
94
|
|
- or t.name
|
|
95
|
|
- in
|
|
96
|
|
- <foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
|
97
|
|
- #{item}
|
|
98
|
|
- </foreach>
|
|
99
|
|
- </if>
|
|
|
92
|
+ <!--被申请人-->
|
|
|
93
|
+ <if test="idCard != null and idCard != ''">
|
|
|
94
|
+ or (t.identity_num=#{idCard} AND t.identity_type=2 and t.case_status=4)
|
|
|
95
|
+ </if>
|
|
|
96
|
+ <!--仲裁员-->
|
|
|
97
|
+ <if test="userId != null and userId != ''">
|
|
|
98
|
+ or ( t.identity_type=1 and
|
|
|
99
|
+ t.case_status in (7,8,9,12,13,14)
|
|
|
100
|
+ and
|
|
|
101
|
+ instr (t.arbitrator_id,#{userId})>0)
|
|
|
102
|
+ </if>
|
|
|
103
|
+ <!--法律顾问-->
|
|
|
104
|
+ <if test="deptIds != null and deptIds.size() > 0">
|
|
|
105
|
+ or (t.identity_type=1 and t.case_status in (1,5,11,15,16)
|
|
|
106
|
+ and t.application_organ_id in
|
|
|
107
|
+ <foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
|
|
108
|
+ #{item}
|
|
|
109
|
+ </foreach> )
|
|
|
110
|
+ </if>
|
|
|
111
|
+
|
|
|
112
|
+ <!--申请人-->
|
|
|
113
|
+ <if test="nameId != null and nameId != ''">
|
|
|
114
|
+ or ( t.application_organ_id = #{nameId} AND t.identity_type=1
|
|
|
115
|
+ and t.case_status in (0,2))
|
|
100
|
116
|
|
|
101
|
|
- </where>
|
|
|
117
|
+ </if>
|
|
|
118
|
+ <!--部门长-->
|
|
|
119
|
+ <if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
|
|
|
120
|
+ or (t.identity_type=1 and t.case_status in
|
|
|
121
|
+ <foreach item="caseStatus" collection="deptHeadStatus" open="(" separator="," close=")">#{caseStatus}
|
|
|
122
|
+ </foreach>)
|
|
|
123
|
+ </if>
|
|
|
124
|
+ <!--财务-->
|
|
|
125
|
+ <if test="financeStatus != null and financeStatus != ''">
|
|
|
126
|
+ or(t.identity_type=1 and t.case_status =#{financeStatus})
|
|
|
127
|
+
|
|
|
128
|
+ </if>
|
|
|
129
|
+ </where>
|
|
102
|
130
|
) t1
|
|
|
131
|
+<!-- <where>-->
|
|
|
132
|
+<!-- <!–申请人–>-->
|
|
|
133
|
+<!-- <if test="nameId != null and nameId != ''">-->
|
|
|
134
|
+<!-- and ( t1.application_organ_id = #{nameId} AND t1.identity_type=1-->
|
|
|
135
|
+<!-- and t1.case_status in (0,2)-->
|
|
|
136
|
+<!-- )-->
|
|
|
137
|
+<!-- </if>-->
|
|
|
138
|
+<!-- </where>-->
|
|
|
139
|
+ order by t1.create_time desc,t1.case_num desc
|
|
|
140
|
+ </select>
|
|
|
141
|
+ <select id="selectTodoCountByRole" resultType="com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount">
|
|
|
142
|
+ select sum( case when t1.case_status=0 then 1 else 0 end) caseApply,
|
|
|
143
|
+ sum( case when t1.case_status=1 then 1 else 0 end) caseApplyCheck,
|
|
|
144
|
+ sum( case when t1.case_status=2 then 1 else 0 end) caseApplyPay,
|
|
|
145
|
+ sum( case when t1.case_status=3 then 1 else 0 end) caseApplyPayCheck,
|
|
|
146
|
+ sum( case when t1.case_status=4 then 1 else 0 end) caseApplyEvidence,
|
|
|
147
|
+ sum( case when t1.case_status=5 then 1 else 0 end) caseApplyGroupCheck,
|
|
|
148
|
+ sum( case when t1.case_status=6 then 1 else 0 end) caseApplyGroupConfirm,
|
|
|
149
|
+ sum( case when t1.case_status=7 then 1 else 0 end) caseApplyArbitrateWay,
|
|
|
150
|
+ sum( case when t1.case_status=8 then 1 else 0 end) caseApplyGroupOnline,
|
|
|
151
|
+ sum( case when t1.case_status=9 then 1 else 0 end) caseApplyGroupOffline,
|
|
|
152
|
+ sum( case when t1.case_status=10 then 1 else 0 end) caseApplyAward,
|
|
|
153
|
+ sum( case when t1.case_status=11 then 1 else 0 end) caseApplyAwardCheck,
|
|
|
154
|
+ sum( case when t1.case_status=12 then 1 else 0 end) caseApplyAwardConfirm,
|
|
|
155
|
+ sum( case when t1.case_status=13 then 1 else 0 end) caseApplyAwardSign,
|
|
|
156
|
+ sum( case when t1.case_status=14 then 1 else 0 end) caseApplyAwardSeal,
|
|
|
157
|
+ sum( case when t1.case_status=15 then 1 else 0 end) caseApplyAwardSend,
|
|
|
158
|
+ sum( case when t1.case_status=16 then 1 else 0 end) caseApplyStored,
|
|
|
159
|
+ sum( case when t1.case_status=17 then 1 else 0 end) caseApplyArchived
|
|
|
160
|
+ from(
|
|
|
161
|
+ select DISTINCT(t.id),t.case_status,t.application_organ_id, t.arbitrator_id,t.identity_num , t.identity_type from(
|
|
|
162
|
+ select c.id ,
|
|
|
163
|
+ c.case_status,ca.application_organ_id,
|
|
|
164
|
+ c.arbitrator_id,ca.identity_num , ca.identity_type
|
|
|
165
|
+ from case_application c
|
|
|
166
|
+ LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id
|
|
|
167
|
+ <where>
|
|
|
168
|
+ <if test="caseStatus != null">
|
|
|
169
|
+ AND c.case_status = #{caseStatus}
|
|
|
170
|
+ </if>
|
|
|
171
|
+ <if test="caseNum != null and caseNum != ''">
|
|
|
172
|
+ AND c.case_num = #{caseNum}
|
|
|
173
|
+ </if>
|
|
|
174
|
+ <if test="caseStatusList != null and caseStatusList.size() > 0">
|
|
|
175
|
+ and c.case_status in
|
|
|
176
|
+ <foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
|
|
|
177
|
+ #{caseStatus}
|
|
|
178
|
+ </foreach>
|
|
|
179
|
+ </if>
|
|
|
180
|
+ </where>
|
|
|
181
|
+ ) t
|
|
103
|
182
|
<where>
|
|
|
183
|
+
|
|
|
184
|
+ <!--被申请人-->
|
|
|
185
|
+ <if test="idCard != null and idCard != ''">
|
|
|
186
|
+ or (t.identity_num=#{idCard} AND t.identity_type=2 and t.case_status=4)
|
|
|
187
|
+ </if>
|
|
|
188
|
+ <!--仲裁员-->
|
|
|
189
|
+ <if test="userId != null and userId != ''">
|
|
|
190
|
+ or ( t.identity_type=1 and
|
|
|
191
|
+ t.case_status in (7,8,9,12,13,14)
|
|
|
192
|
+ and
|
|
|
193
|
+ instr (t.arbitrator_id,#{userId})>0)
|
|
|
194
|
+ </if>
|
|
|
195
|
+ <!--法律顾问-->
|
|
|
196
|
+ <if test="deptIds != null and deptIds.size() > 0">
|
|
|
197
|
+ or (t.identity_type=1 and t.case_status in (1,5,11,15,16)
|
|
|
198
|
+ and t.application_organ_id in
|
|
|
199
|
+ <foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
|
|
200
|
+ #{item}
|
|
|
201
|
+ </foreach> )
|
|
|
202
|
+ </if>
|
|
104
|
203
|
<!--申请人-->
|
|
105
|
204
|
<if test="nameId != null and nameId != ''">
|
|
106
|
|
- and ( t1.application_organ_id = #{nameId} AND t1.identity_type=1 )
|
|
|
205
|
+ or ( t.application_organ_id = #{nameId} AND t.identity_type=1
|
|
|
206
|
+ and t.case_status in (0,2))
|
|
|
207
|
+
|
|
|
208
|
+ </if>
|
|
|
209
|
+ <!--部门长-->
|
|
|
210
|
+ <if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
|
|
|
211
|
+ or (t.identity_type=1 and t.case_status in
|
|
|
212
|
+ <foreach item="caseStatus" collection="deptHeadStatus" open="(" separator="," close=")">
|
|
|
213
|
+ #{caseStatus}
|
|
|
214
|
+ </foreach>)
|
|
|
215
|
+ </if>
|
|
|
216
|
+ <!--财务-->
|
|
|
217
|
+ <if test="financeStatus != null and financeStatus != ''">
|
|
|
218
|
+ or( t.identity_type=1 and t.case_status =#{financeStatus})
|
|
|
219
|
+
|
|
107
|
220
|
</if>
|
|
108
|
221
|
</where>
|
|
109
|
|
- order by t1.create_time desc,t1.case_num desc
|
|
|
222
|
+ ) t1
|
|
|
223
|
+ <!-- <where>
|
|
|
224
|
+ <!–申请人–>-->
|
|
|
225
|
+<!-- <if test="nameId != null and nameId != ''">-->
|
|
|
226
|
+<!-- and ( t1.application_organ_id = #{nameId} AND t1.identity_type=1-->
|
|
|
227
|
+<!-- and t1.case_status in (0,2)-->
|
|
|
228
|
+<!-- )-->
|
|
|
229
|
+<!-- </if>
|
|
|
230
|
+ </where> -->
|
|
110
|
231
|
</select>
|
|
|
232
|
+
|
|
111
|
233
|
<select id="selectAdminCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
|
112
|
|
- select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
|
|
|
234
|
+ select DISTINCT(c.id) id,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
|
|
113
|
235
|
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
|
|
114
|
236
|
ELSE '无审理方式'
|
|
115
|
237
|
END arbitratMethodName,
|
|
|
@@ -147,6 +269,154 @@ select t1.* from(
|
|
147
|
269
|
</where>
|
|
148
|
270
|
order by c.create_time desc,c.case_num desc
|
|
149
|
271
|
</select>
|
|
|
272
|
+ <select id="selectAdminCaseToDoCount" resultType="com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount">
|
|
|
273
|
+ SELECT
|
|
|
274
|
+ sum( case when c.case_status=0 then 1 else 0 end) caseApply,
|
|
|
275
|
+ sum( case when c.case_status=1 then 1 else 0 end) caseApplyCheck,
|
|
|
276
|
+ sum( case when c.case_status=2 then 1 else 0 end) caseApplyPay,
|
|
|
277
|
+ sum( case when c.case_status=3 then 1 else 0 end) caseApplyPayCheck,
|
|
|
278
|
+ sum( case when c.case_status=4 then 1 else 0 end) caseApplyEvidence,
|
|
|
279
|
+ sum( case when c.case_status=5 then 1 else 0 end) caseApplyGroupCheck,
|
|
|
280
|
+ sum( case when c.case_status=6 then 1 else 0 end) caseApplyGroupConfirm,
|
|
|
281
|
+ sum( case when c.case_status=7 then 1 else 0 end) caseApplyArbitrateWay,
|
|
|
282
|
+ sum( case when c.case_status=8 then 1 else 0 end) caseApplyGroupOnline,
|
|
|
283
|
+ sum( case when c.case_status=9 then 1 else 0 end) caseApplyGroupOffline,
|
|
|
284
|
+ sum( case when c.case_status=10 then 1 else 0 end) caseApplyAward,
|
|
|
285
|
+ sum( case when c.case_status=11 then 1 else 0 end) caseApplyAwardCheck,
|
|
|
286
|
+ sum( case when c.case_status=12 then 1 else 0 end) caseApplyAwardConfirm,
|
|
|
287
|
+ sum( case when c.case_status=13 then 1 else 0 end) caseApplyAwardSign,
|
|
|
288
|
+ sum( case when c.case_status=14 then 1 else 0 end) caseApplyAwardSeal,
|
|
|
289
|
+ sum( case when c.case_status=15 then 1 else 0 end) caseApplyAwardSend,
|
|
|
290
|
+ sum( case when c.case_status=16 then 1 else 0 end) caseApplyStored,
|
|
|
291
|
+ sum( case when c.case_status=17 then 1 else 0 end) caseApplyArchived
|
|
|
292
|
+ FROM
|
|
|
293
|
+ case_application c
|
|
|
294
|
+ JOIN case_affiliate ca ON ca.case_appli_id = c.id
|
|
|
295
|
+ AND ca.identity_type = 1
|
|
|
296
|
+ WHERE
|
|
|
297
|
+ c.case_status IN (
|
|
|
298
|
+ 0,
|
|
|
299
|
+ 1,
|
|
|
300
|
+ 2,
|
|
|
301
|
+ 3,
|
|
|
302
|
+ 4,
|
|
|
303
|
+ 5,
|
|
|
304
|
+ 6,
|
|
|
305
|
+ 7,
|
|
|
306
|
+ 8,
|
|
|
307
|
+ 9,
|
|
|
308
|
+ 10,
|
|
|
309
|
+ 11,
|
|
|
310
|
+ 12,
|
|
|
311
|
+ 13,
|
|
|
312
|
+ 14,
|
|
|
313
|
+ 15,
|
|
|
314
|
+ 16,
|
|
|
315
|
+ 17
|
|
|
316
|
+ )
|
|
|
317
|
+
|
|
|
318
|
+ </select>
|
|
|
319
|
+ <select id="selectDeptHeadCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
|
|
320
|
+ select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
|
|
|
321
|
+ CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
|
|
|
322
|
+ ELSE '无审理方式'
|
|
|
323
|
+ END arbitratMethodName,
|
|
|
324
|
+ c.case_status ,
|
|
|
325
|
+ CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
|
|
|
326
|
+ when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
|
|
|
327
|
+ when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
|
|
|
328
|
+ when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
|
|
|
329
|
+ when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
|
|
|
330
|
+ when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
|
|
|
331
|
+ ELSE '无案件状态'
|
|
|
332
|
+ END caseStatusName,
|
|
|
333
|
+ c.hear_date ,c.arbitrat_claims ,
|
|
|
334
|
+ c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
|
|
|
335
|
+ c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
|
|
|
336
|
+ c.update_by ,c.update_time , c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,c.filearbitra_url
|
|
|
337
|
+ from case_application c
|
|
|
338
|
+ LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
|
|
|
339
|
+ <where>
|
|
|
340
|
+ c.case_status in
|
|
|
341
|
+ <foreach item="caseStatus" collection="statusList" open="(" separator="," close=")">
|
|
|
342
|
+ #{caseStatus}
|
|
|
343
|
+ </foreach>
|
|
|
344
|
+ <if test="caseApplication.caseStatus != null">
|
|
|
345
|
+ AND c.case_status = #{caseApplication.caseStatus}
|
|
|
346
|
+ </if>
|
|
|
347
|
+ <if test="caseApplication.caseNum != null and caseApplication.caseNum != ''">
|
|
|
348
|
+ AND c.case_num = #{caseApplication.caseNum}
|
|
|
349
|
+ </if>
|
|
|
350
|
+ <if test="caseApplication.nameId != null and caseApplication.nameId != ''">
|
|
|
351
|
+ AND ca.application_organ_id=#{caseApplication.nameId} AND ca.identity_type=1
|
|
|
352
|
+ </if>
|
|
|
353
|
+ <if test="caseApplication.caseStatusList != null and caseApplication.caseStatusList.size() > 0">
|
|
|
354
|
+ and c.case_status in
|
|
|
355
|
+ <foreach item="caseStatus" collection="caseApplication.caseStatusList" open="(" separator="," close=")">
|
|
|
356
|
+ #{caseStatus}
|
|
|
357
|
+ </foreach>
|
|
|
358
|
+ </if>
|
|
|
359
|
+ </where>
|
|
|
360
|
+ order by c.create_time desc,c.case_num desc
|
|
|
361
|
+ </select>
|
|
|
362
|
+ <select id="selectDeptHeadCaseToDoCount" resultType="com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount">
|
|
|
363
|
+ select sum( case when c.case_status=0 then 1 else 0 end) caseApply,
|
|
|
364
|
+ sum( case when c.case_status=1 then 1 else 0 end) caseApplyCheck,
|
|
|
365
|
+ sum( case when c.case_status=2 then 1 else 0 end) caseApplyPay,
|
|
|
366
|
+ sum( case when c.case_status=3 then 1 else 0 end) caseApplyPayCheck,
|
|
|
367
|
+ sum( case when c.case_status=4 then 1 else 0 end) caseApplyEvidence,
|
|
|
368
|
+ sum( case when c.case_status=5 then 1 else 0 end) caseApplyGroupCheck,
|
|
|
369
|
+ sum( case when c.case_status=6 then 1 else 0 end) caseApplyGroupConfirm,
|
|
|
370
|
+ sum( case when c.case_status=7 then 1 else 0 end) caseApplyArbitrateWay,
|
|
|
371
|
+ sum( case when c.case_status=8 then 1 else 0 end) caseApplyGroupOnline,
|
|
|
372
|
+ sum( case when c.case_status=9 then 1 else 0 end) caseApplyGroupOffline,
|
|
|
373
|
+ sum( case when c.case_status=10 then 1 else 0 end) caseApplyAward,
|
|
|
374
|
+ sum( case when c.case_status=11 then 1 else 0 end) caseApplyAwardCheck,
|
|
|
375
|
+ sum( case when c.case_status=12 then 1 else 0 end) caseApplyAwardConfirm,
|
|
|
376
|
+ sum( case when c.case_status=13 then 1 else 0 end) caseApplyAwardSign,
|
|
|
377
|
+ sum( case when c.case_status=14 then 1 else 0 end) caseApplyAwardSeal,
|
|
|
378
|
+ sum( case when c.case_status=15 then 1 else 0 end) caseApplyAwardSend,
|
|
|
379
|
+ sum( case when c.case_status=16 then 1 else 0 end) caseApplyStored,
|
|
|
380
|
+ sum( case when c.case_status=17 then 1 else 0 end) caseApplyArchived
|
|
|
381
|
+ from case_application c
|
|
|
382
|
+ LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
|
|
|
383
|
+ <where>
|
|
|
384
|
+ <!--部门长-->
|
|
|
385
|
+ <if test="statusList != null and statusList.size() > 0">
|
|
|
386
|
+ or c.case_status in
|
|
|
387
|
+ <foreach item="caseStatus" collection="statusList" open="(" separator="," close=")">
|
|
|
388
|
+ #{caseStatus}
|
|
|
389
|
+ </foreach>
|
|
|
390
|
+ <!--被申请人-->
|
|
|
391
|
+ <if test="idCard != null and idCard != ''">
|
|
|
392
|
+ or (t.identity_num=#{idCard} AND t.identity_type=2 and t.case_status=4)
|
|
|
393
|
+ </if>
|
|
|
394
|
+ <!--仲裁员-->
|
|
|
395
|
+ <if test="userId != null and userId != ''">
|
|
|
396
|
+ or ( t.identity_type=1 and
|
|
|
397
|
+ t.case_status in (7,8,9,12,13,14)
|
|
|
398
|
+ and
|
|
|
399
|
+ instr (t.arbitrator_id,#{userId})>0)
|
|
|
400
|
+ </if>
|
|
|
401
|
+ <!--法律顾问-->
|
|
|
402
|
+ <if test="deptIds != null and deptIds.size() > 0">
|
|
|
403
|
+ or (t.identity_type=1 and t.case_status in (1,5,11,15,16)
|
|
|
404
|
+ and t.application_organ_id in
|
|
|
405
|
+ <foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
|
|
406
|
+ #{item}
|
|
|
407
|
+ </foreach> )
|
|
|
408
|
+ </if>
|
|
|
409
|
+ <!--申请人-->
|
|
|
410
|
+ <if test="nameId != null and nameId != ''">
|
|
|
411
|
+ or( ( t.application_organ_id = #{nameId} AND t.identity_type=1
|
|
|
412
|
+ and t.case_status in (0,2))
|
|
|
413
|
+ )
|
|
|
414
|
+ </if>
|
|
|
415
|
+ </if>
|
|
|
416
|
+ </where>
|
|
|
417
|
+
|
|
|
418
|
+ </select>
|
|
|
419
|
+
|
|
150
|
420
|
|
|
151
|
421
|
<select id="selectCaseApplicationCount" parameterType="CaseApplication" resultType="int">
|
|
152
|
422
|
select count(1) from case_application c
|
|
|
@@ -333,7 +603,7 @@ select t1.* from(
|
|
333
|
603
|
END paymentStatusName,c.pay_type,
|
|
334
|
604
|
CASE c.pay_type when 0 then '线上支付' when 0 then '线下支付' else '' end payTypeName
|
|
335
|
605
|
from case_application c left join case_payment_record p on c.id = p.case_id
|
|
336
|
|
- where c.case_status = 3 and p.payment_status = 1
|
|
|
606
|
+ where c.case_status = 3
|
|
337
|
607
|
AND c.id = #{id}
|
|
338
|
608
|
|
|
339
|
609
|
</select>
|