|
|
@@ -38,28 +38,30 @@
|
|
38
|
38
|
</resultMap>
|
|
39
|
39
|
|
|
40
|
40
|
<select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
|
41
|
|
-select t1.* from(
|
|
|
41
|
+ select t1.* from(
|
|
42
|
42
|
select t.* from(
|
|
43
|
43
|
select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
|
|
44
|
44
|
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
|
|
45
|
|
- ELSE '无审理方式'
|
|
46
|
|
- END arbitratMethodName,
|
|
|
45
|
+ ELSE '无审理方式'
|
|
|
46
|
+ END arbitratMethodName,
|
|
47
|
47
|
c.case_status ,
|
|
48
|
48
|
CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
|
|
49
|
|
- when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
|
|
50
|
|
- when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
|
|
51
|
|
- when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
|
|
52
|
|
- when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
|
|
53
|
|
- when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
|
|
54
|
|
- ELSE '无案件状态'
|
|
55
|
|
- END caseStatusName,
|
|
|
49
|
+ when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
|
|
|
50
|
+ when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
|
|
|
51
|
+ when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
|
|
|
52
|
+ when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
|
|
|
53
|
+ when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
|
|
|
54
|
+ ELSE '无案件状态'
|
|
|
55
|
+ END caseStatusName,
|
|
56
|
56
|
c.hear_date ,c.arbitrat_claims ,
|
|
57
|
|
- c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
|
|
|
57
|
+ c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag
|
|
|
58
|
+ ,c.fee_payable ,
|
|
58
|
59
|
c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
|
|
59
|
|
- c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id,ca.application_organ_name as applicantName,
|
|
|
60
|
+ c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id,ca.application_organ_name as
|
|
|
61
|
+ applicantName,
|
|
60
|
62
|
c.arbitrator_id,ca.identity_num , ca.identity_type,c.filearbitra_url
|
|
61
|
63
|
from case_application c
|
|
62
|
|
- LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
|
|
|
64
|
+ LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id
|
|
63
|
65
|
<where>
|
|
64
|
66
|
<if test="caseStatus != null">
|
|
65
|
67
|
AND c.case_status = #{caseStatus}
|
|
|
@@ -77,29 +79,34 @@ select t1.* from(
|
|
77
|
79
|
) t
|
|
78
|
80
|
<where>
|
|
79
|
81
|
|
|
80
|
|
- <!--被申请人-->
|
|
81
|
|
- <if test="idCard != null and idCard != ''">
|
|
82
|
|
- or (t.identity_num=#{idCard} AND t.identity_type=2)
|
|
83
|
|
- </if>
|
|
84
|
|
- <!--仲裁员-->
|
|
85
|
|
- <if test="userId != null and userId != ''">
|
|
86
|
|
- or instr (t.arbitrator_id,#{userId})>0
|
|
87
|
|
- </if>
|
|
88
|
|
- <!--法律顾问-->
|
|
89
|
|
- <if test="deptIds != null and deptIds.size() > 0">
|
|
90
|
|
- or t.name
|
|
91
|
|
- in
|
|
92
|
|
- <foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
|
93
|
|
- #{item}
|
|
94
|
|
- </foreach>
|
|
95
|
|
- </if>
|
|
|
82
|
+ <!--被申请人-->
|
|
|
83
|
+ <if test="idCard != null and idCard != ''">
|
|
|
84
|
+ or (t.identity_num=#{idCard} AND t.identity_type=2 and t.case_status=4)
|
|
|
85
|
+ </if>
|
|
|
86
|
+ <!--仲裁员-->
|
|
|
87
|
+ <if test="userId != null and userId != ''">
|
|
|
88
|
+ or ( t.identity_type=1 and
|
|
|
89
|
+ t.case_status in (7,8,9,12,13,14)
|
|
|
90
|
+ and
|
|
|
91
|
+ instr (t.arbitrator_id,#{userId})>0)
|
|
|
92
|
+ </if>
|
|
|
93
|
+ <!--法律顾问-->
|
|
|
94
|
+ <if test="deptIds != null and deptIds.size() > 0">
|
|
|
95
|
+ or (t.identity_type=1 and t.case_status in (1,5,11,15,16)
|
|
|
96
|
+ and t.application_organ_id in
|
|
|
97
|
+ <foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
|
|
98
|
+ #{item}
|
|
|
99
|
+ </foreach> )
|
|
|
100
|
+ </if>
|
|
96
|
101
|
|
|
97
|
|
- </where>
|
|
|
102
|
+ </where>
|
|
98
|
103
|
) t1
|
|
99
|
104
|
<where>
|
|
100
|
105
|
<!--申请人-->
|
|
101
|
106
|
<if test="nameId != null and nameId != ''">
|
|
102
|
|
- and ( t1.application_organ_id = #{nameId} AND t1.identity_type=1 )
|
|
|
107
|
+ and ( t1.application_organ_id = #{nameId} AND t1.identity_type=1
|
|
|
108
|
+ and t1.case_status in (0,2)
|
|
|
109
|
+ )
|
|
103
|
110
|
</if>
|
|
104
|
111
|
</where>
|
|
105
|
112
|
order by t1.create_time desc,t1.case_num desc
|
|
|
@@ -143,6 +150,50 @@ select t1.* from(
|
|
143
|
150
|
</where>
|
|
144
|
151
|
order by c.create_time desc,c.case_num desc
|
|
145
|
152
|
</select>
|
|
|
153
|
+ <select id="selectDeptHeadCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
|
|
154
|
+ select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
|
|
|
155
|
+ CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
|
|
|
156
|
+ ELSE '无审理方式'
|
|
|
157
|
+ END arbitratMethodName,
|
|
|
158
|
+ c.case_status ,
|
|
|
159
|
+ CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
|
|
|
160
|
+ when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
|
|
|
161
|
+ when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
|
|
|
162
|
+ when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
|
|
|
163
|
+ when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
|
|
|
164
|
+ when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
|
|
|
165
|
+ ELSE '无案件状态'
|
|
|
166
|
+ END caseStatusName,
|
|
|
167
|
+ c.hear_date ,c.arbitrat_claims ,
|
|
|
168
|
+ c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
|
|
|
169
|
+ c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
|
|
|
170
|
+ c.update_by ,c.update_time , c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,c.filearbitra_url
|
|
|
171
|
+ from case_application c
|
|
|
172
|
+ LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
|
|
|
173
|
+ <where>
|
|
|
174
|
+ c.case_status in
|
|
|
175
|
+ <foreach item="caseStatus" collection="statusList" open="(" separator="," close=")">
|
|
|
176
|
+ #{caseStatus}
|
|
|
177
|
+ </foreach>
|
|
|
178
|
+ <if test="caseApplication.caseStatus != null">
|
|
|
179
|
+ AND c.case_status = #{caseApplication.caseStatus}
|
|
|
180
|
+ </if>
|
|
|
181
|
+ <if test="caseApplication.caseNum != null and caseApplication.caseNum != ''">
|
|
|
182
|
+ AND c.case_num = #{caseApplication.caseNum}
|
|
|
183
|
+ </if>
|
|
|
184
|
+ <if test="caseApplication.nameId != null and caseApplication.nameId != ''">
|
|
|
185
|
+ AND ca.application_organ_id=#{caseApplication.nameId} AND ca.identity_type=1
|
|
|
186
|
+ </if>
|
|
|
187
|
+ <if test="caseApplication.caseStatusList != null and caseApplication.caseStatusList.size() > 0">
|
|
|
188
|
+ and c.case_status in
|
|
|
189
|
+ <foreach item="caseStatus" collection="caseApplication.caseStatusList" open="(" separator="," close=")">
|
|
|
190
|
+ #{caseStatus}
|
|
|
191
|
+ </foreach>
|
|
|
192
|
+ </if>
|
|
|
193
|
+ </where>
|
|
|
194
|
+ order by c.create_time desc,c.case_num desc
|
|
|
195
|
+ </select>
|
|
|
196
|
+
|
|
146
|
197
|
|
|
147
|
198
|
<select id="selectCaseApplicationCount" parameterType="CaseApplication" resultType="int">
|
|
148
|
199
|
select count(1) from case_application c
|