|
|
@@ -126,12 +126,12 @@
|
|
126
|
126
|
instr (t.arbitrator_id,#{userId})>0)
|
|
127
|
127
|
</if>
|
|
128
|
128
|
<!--申请人-->
|
|
129
|
|
- <if test="applicationOrganId != null and applicationOrganId != ''">
|
|
130
|
|
- or ( t.application_organ_id = #{applicationOrganId} AND t.identity_type=1
|
|
131
|
|
- <!--暂时改为可以查询到生成裁决书之前所有的案件状态-->
|
|
132
|
|
- and (t.case_status <= 10 or t.case_status=31))
|
|
|
129
|
+<!-- <if test="applicationOrganId != null and applicationOrganId != ''">-->
|
|
|
130
|
+<!-- or ( t.application_organ_id = #{applicationOrganId} AND t.identity_type=1-->
|
|
|
131
|
+<!-- <!–暂时改为可以查询到生成裁决书之前所有的案件状态–>-->
|
|
|
132
|
+<!-- and (t.case_status <= 10 or t.case_status=31))-->
|
|
133
|
133
|
|
|
134
|
|
- </if>
|
|
|
134
|
+<!-- </if>-->
|
|
135
|
135
|
<!--部门长-->
|
|
136
|
136
|
<if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
|
|
137
|
137
|
or (t.identity_type=1 and t.case_status in
|
|
|
@@ -158,61 +158,58 @@
|
|
158
|
158
|
</where>
|
|
159
|
159
|
union
|
|
160
|
160
|
</if>
|
|
161
|
|
-<!-- <if test="applicationOrganId != null and applicationOrganId != ''">-->
|
|
|
161
|
+ <if test="applicationOrganId != null and applicationOrganId != ''">
|
|
162
|
162
|
|
|
163
|
163
|
|
|
164
|
|
-<!-- <!–申请人案件–>-->
|
|
165
|
|
-<!-- select c.id ,l.id AS caseLogId,c.case_num ,l.case_subject_amount ,c.register_date ,c.arbitrat_method ,-->
|
|
166
|
|
-<!-- CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'-->
|
|
167
|
|
-<!-- ELSE '无审理方式'-->
|
|
168
|
|
-<!-- END arbitratMethodName,-->
|
|
169
|
|
-<!-- c.case_status ,-->
|
|
170
|
|
-<!-- CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'-->
|
|
171
|
|
-<!-- when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'-->
|
|
172
|
|
-<!-- when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'-->
|
|
173
|
|
-<!-- when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'-->
|
|
174
|
|
-<!-- when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'-->
|
|
175
|
|
-<!-- when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'-->
|
|
176
|
|
-<!-- when 31 then '待修改开庭时间'-->
|
|
177
|
|
-<!-- ELSE '无案件状态'-->
|
|
178
|
|
-<!-- END caseStatusName,-->
|
|
179
|
|
-<!-- c.hear_date ,l.arbitrat_claims ,-->
|
|
180
|
|
-<!-- l.loan_start_date ,l.loan_end_date ,l.claim_princi_owed ,l.claim_interest_owed ,l.claim_liquid_damag-->
|
|
181
|
|
-<!-- ,l.fee_payable ,-->
|
|
182
|
|
-<!-- c.begin_video_date ,c.online_video_person ,l.contract_number ,c.create_by ,c.create_time ,-->
|
|
183
|
|
-<!-- c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id,ca.application_organ_name-->
|
|
184
|
|
-<!-- as-->
|
|
185
|
|
-<!-- applicantName,-->
|
|
186
|
|
-<!-- c.arbitrator_id,ca.identity_num , ca.identity_type,c.filearbitra_url,c.lock_status,l.version,l.update_submit_status as updateSubmitStatus-->
|
|
187
|
|
-<!-- from case_application c-->
|
|
188
|
|
-<!-- JOIN case_application_log l ON c.id = l.case_appli_id-->
|
|
189
|
|
-<!-- JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id AND ca.identity_type = 1-->
|
|
190
|
|
-
|
|
191
|
|
-<!-- <where>-->
|
|
192
|
|
-<!-- (c.case_status <= 10 or c.case_status=31) AND ca.identity_type=1-->
|
|
193
|
|
-<!-- and l.version=(SELECT-->
|
|
194
|
|
-<!-- max( version ) version-->
|
|
195
|
|
-<!-- FROM-->
|
|
196
|
|
-<!-- case_application_log where case_appli_id = c.id and update_submit_status not in(4,5))-->
|
|
197
|
|
-<!-- <if test="applicationOrganId != null and applicationOrganId != ''">-->
|
|
198
|
|
-<!-- AND ca.application_organ_id = #{applicationOrganId}-->
|
|
199
|
|
-<!-- </if>-->
|
|
200
|
|
-<!-- <if test="caseStatus != null">-->
|
|
201
|
|
-<!-- AND c.case_status = #{caseStatus}-->
|
|
202
|
|
-<!-- </if>-->
|
|
203
|
|
-<!-- <if test="caseNum != null and caseNum != ''">-->
|
|
204
|
|
-<!-- AND c.case_num = #{caseNum}-->
|
|
205
|
|
-<!-- </if>-->
|
|
206
|
|
-<!-- <if test="nameId != null and nameId != ''">-->
|
|
207
|
|
-<!-- AND ca.application_organ_id=#{nameId}-->
|
|
208
|
|
-<!-- </if>-->
|
|
|
164
|
+ <!--申请人案件-->
|
|
|
165
|
+ select c.id ,l.id AS caseLogId,c.case_num ,l.case_subject_amount ,c.register_date ,c.arbitrat_method ,
|
|
|
166
|
+ CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
|
|
|
167
|
+ ELSE '无审理方式'
|
|
|
168
|
+ END arbitratMethodName,
|
|
|
169
|
+ c.case_status ,
|
|
|
170
|
+ CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
|
|
|
171
|
+ when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
|
|
|
172
|
+ when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
|
|
|
173
|
+ when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
|
|
|
174
|
+ when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
|
|
|
175
|
+ when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
|
|
|
176
|
+ when 31 then '待修改开庭时间'
|
|
|
177
|
+ ELSE '无案件状态'
|
|
|
178
|
+ END caseStatusName,
|
|
|
179
|
+ c.hear_date ,l.arbitrat_claims ,
|
|
|
180
|
+ l.loan_start_date ,l.loan_end_date ,l.claim_princi_owed ,l.claim_interest_owed ,l.claim_liquid_damag
|
|
|
181
|
+ ,l.fee_payable ,
|
|
|
182
|
+ c.begin_video_date ,c.online_video_person ,l.contract_number ,c.create_by ,c.create_time ,
|
|
|
183
|
+ c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id,ca.application_organ_name
|
|
|
184
|
+ as
|
|
|
185
|
+ applicantName,
|
|
|
186
|
+ c.arbitrator_id,ca.identity_num , ca.identity_type,c.filearbitra_url,c.lock_status,(select version from case_application_log where case_appli_id=c.id order by version desc limit 1) as version,(select update_submit_status from case_application_log where case_appli_id=c.id order by version desc limit 1) as updateSubmitStatus
|
|
|
187
|
+ from case_application c
|
|
|
188
|
+ JOIN case_application_log l ON c.id = l.case_appli_id and c.version=l.version
|
|
|
189
|
+ JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id AND ca.identity_type = 1
|
|
209
|
190
|
|
|
210
|
|
-<!-- <if test="lockStatus != null">-->
|
|
211
|
|
-<!-- AND c.lock_status = #{lockStatus}-->
|
|
212
|
|
-<!-- </if>-->
|
|
213
|
|
-<!-- </where>-->
|
|
214
|
|
-<!-- union-->
|
|
215
|
|
-<!-- </if>-->
|
|
|
191
|
+ <where>
|
|
|
192
|
+ (c.case_status <= 10 or c.case_status=31) AND ca.identity_type=1
|
|
|
193
|
+
|
|
|
194
|
+ <if test="applicationOrganId != null and applicationOrganId != ''">
|
|
|
195
|
+ AND ca.application_organ_id = #{applicationOrganId}
|
|
|
196
|
+ </if>
|
|
|
197
|
+ <if test="caseStatus != null">
|
|
|
198
|
+ AND c.case_status = #{caseStatus}
|
|
|
199
|
+ </if>
|
|
|
200
|
+ <if test="caseNum != null and caseNum != ''">
|
|
|
201
|
+ AND c.case_num = #{caseNum}
|
|
|
202
|
+ </if>
|
|
|
203
|
+ <if test="nameId != null and nameId != ''">
|
|
|
204
|
+ AND ca.application_organ_id=#{nameId}
|
|
|
205
|
+ </if>
|
|
|
206
|
+
|
|
|
207
|
+ <if test="lockStatus != null">
|
|
|
208
|
+ AND c.lock_status = #{lockStatus}
|
|
|
209
|
+ </if>
|
|
|
210
|
+ </where>
|
|
|
211
|
+ union
|
|
|
212
|
+ </if>
|
|
216
|
213
|
<!--秘书案件-->
|
|
217
|
214
|
<if test="deptIds != null and deptIds.size() > 0">
|
|
218
|
215
|
|
|
|
@@ -447,7 +444,7 @@
|
|
447
|
444
|
FROM
|
|
448
|
445
|
case_application_log
|
|
449
|
446
|
WHERE
|
|
450
|
|
- update_submit_status IN ( 1, 2 ) and c.id = case_appli_id)
|
|
|
447
|
+ c.id = case_appli_id)
|
|
451
|
448
|
</if>
|
|
452
|
449
|
</trim>
|
|
453
|
450
|
) t1
|
|
|
@@ -679,13 +676,13 @@
|
|
679
|
676
|
<!-- </foreach> )-->
|
|
680
|
677
|
<!-- </if>-->
|
|
681
|
678
|
<!--申请人-->
|
|
682
|
|
- <if test="applicationOrganId != null and applicationOrganId != ''">
|
|
683
|
|
- or ( t.application_organ_id = #{applicationOrganId} AND t.identity_type=1
|
|
684
|
|
- <!--暂时改为可以查询到生成裁决书之前所有的案件状态-->
|
|
685
|
|
- and (t.case_status <= 10 or t.case_status=31))
|
|
686
|
|
- <!-- and t.case_status in (0,2,17))-->
|
|
|
679
|
+<!-- <if test="applicationOrganId != null and applicationOrganId != ''">-->
|
|
|
680
|
+<!-- or ( t.application_organ_id = #{applicationOrganId} AND t.identity_type=1-->
|
|
|
681
|
+<!-- <!–暂时改为可以查询到生成裁决书之前所有的案件状态–>-->
|
|
|
682
|
+<!-- and (t.case_status <= 10 or t.case_status=31))-->
|
|
|
683
|
+<!-- <!– and t.case_status in (0,2,17))–>-->
|
|
687
|
684
|
|
|
688
|
|
- </if>
|
|
|
685
|
+<!-- </if>-->
|
|
689
|
686
|
<!--部门长-->
|
|
690
|
687
|
<if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
|
|
691
|
688
|
or (t.identity_type=1 and t.case_status in
|
|
|
@@ -711,40 +708,37 @@
|
|
711
|
708
|
</where>
|
|
712
|
709
|
union
|
|
713
|
710
|
</if>
|
|
714
|
|
-<!-- <if test="applicationOrganId != null and applicationOrganId != ''">-->
|
|
715
|
|
-<!-- <!–申请人案件–>-->
|
|
716
|
|
-
|
|
717
|
|
-<!-- select l.case_appli_id id ,-->
|
|
718
|
|
-<!-- c.case_status,ca.application_organ_id,-->
|
|
719
|
|
-<!-- c.arbitrator_id,ca.identity_num , ca.identity_type-->
|
|
720
|
|
-<!-- from case_application c-->
|
|
721
|
|
-<!-- JOIN case_application_log l ON c.id = l.case_appli_id-->
|
|
722
|
|
-<!-- JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id AND ca.identity_type = 1-->
|
|
723
|
|
-<!-- <where>-->
|
|
724
|
|
-<!-- (c.case_status <= 10 or c.case_status=31) AND ca.identity_type=1-->
|
|
725
|
|
-<!-- and l.version=(SELECT-->
|
|
726
|
|
-<!-- max( version ) version-->
|
|
727
|
|
-<!-- FROM-->
|
|
728
|
|
-<!-- case_application_log where case_appli_id = c.id and update_submit_status not in(4,5))-->
|
|
729
|
|
-<!-- <if test="applicationOrganId != null and applicationOrganId != ''">-->
|
|
730
|
|
-<!-- AND ca.application_organ_id = #{applicationOrganId}-->
|
|
731
|
|
-<!-- </if>-->
|
|
732
|
|
-<!-- <if test="caseStatus != null">-->
|
|
733
|
|
-<!-- AND c.case_status = #{caseStatus}-->
|
|
734
|
|
-<!-- </if>-->
|
|
735
|
|
-<!-- <if test="caseNum != null and caseNum != ''">-->
|
|
736
|
|
-<!-- AND c.case_num = #{caseNum}-->
|
|
737
|
|
-<!-- </if>-->
|
|
738
|
|
-<!-- <if test="nameId != null and nameId != ''">-->
|
|
739
|
|
-<!-- AND ca.application_organ_id=#{nameId}-->
|
|
740
|
|
-<!-- </if>-->
|
|
|
711
|
+ <if test="applicationOrganId != null and applicationOrganId != ''">
|
|
|
712
|
+ <!--申请人案件-->
|
|
741
|
713
|
|
|
742
|
|
-<!-- <if test="lockStatus != null">-->
|
|
743
|
|
-<!-- AND c.lock_status = #{lockStatus}-->
|
|
744
|
|
-<!-- </if>-->
|
|
745
|
|
-<!-- </where>-->
|
|
746
|
|
-<!-- union-->
|
|
747
|
|
-<!-- </if>-->
|
|
|
714
|
+ select l.case_appli_id id ,
|
|
|
715
|
+ c.case_status,ca.application_organ_id,
|
|
|
716
|
+ c.arbitrator_id,ca.identity_num , ca.identity_type
|
|
|
717
|
+ from case_application c
|
|
|
718
|
+ JOIN case_application_log l ON c.id = l.case_appli_id
|
|
|
719
|
+ JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id AND ca.identity_type = 1 and c.version=l.version
|
|
|
720
|
+ <where>
|
|
|
721
|
+ (c.case_status <= 10 or c.case_status=31) AND ca.identity_type=1
|
|
|
722
|
+
|
|
|
723
|
+ <if test="applicationOrganId != null and applicationOrganId != ''">
|
|
|
724
|
+ AND ca.application_organ_id = #{applicationOrganId}
|
|
|
725
|
+ </if>
|
|
|
726
|
+ <if test="caseStatus != null">
|
|
|
727
|
+ AND c.case_status = #{caseStatus}
|
|
|
728
|
+ </if>
|
|
|
729
|
+ <if test="caseNum != null and caseNum != ''">
|
|
|
730
|
+ AND c.case_num = #{caseNum}
|
|
|
731
|
+ </if>
|
|
|
732
|
+ <if test="nameId != null and nameId != ''">
|
|
|
733
|
+ AND ca.application_organ_id=#{nameId}
|
|
|
734
|
+ </if>
|
|
|
735
|
+
|
|
|
736
|
+ <if test="lockStatus != null">
|
|
|
737
|
+ AND c.lock_status = #{lockStatus}
|
|
|
738
|
+ </if>
|
|
|
739
|
+ </where>
|
|
|
740
|
+ union
|
|
|
741
|
+ </if>
|
|
748
|
742
|
<!--秘书案件-->
|
|
749
|
743
|
<if test="deptIds != null and deptIds.size() > 0">
|
|
750
|
744
|
|
|
|
@@ -794,7 +788,7 @@
|
|
794
|
788
|
JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id
|
|
795
|
789
|
AND ca.identity_type = 1
|
|
796
|
790
|
WHERE
|
|
797
|
|
- l.update_submit_status IN ( 1, 4 ) and ca.identity_type=1
|
|
|
791
|
+ l.update_submit_status IN ( 1, 2 ) and ca.identity_type=1
|
|
798
|
792
|
<if test="deptIds != null and deptIds.size() > 0">
|
|
799
|
793
|
and ca.application_organ_id in
|
|
800
|
794
|
<foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
|
|
@@ -819,7 +813,7 @@
|
|
819
|
813
|
FROM
|
|
820
|
814
|
case_application_log
|
|
821
|
815
|
WHERE
|
|
822
|
|
- update_submit_status IN ( 1, 4 ) and c.id = case_appli_id)
|
|
|
816
|
+ c.id = case_appli_id)
|
|
823
|
817
|
|
|
824
|
818
|
</if>
|
|
825
|
819
|
</trim>
|
|
|
@@ -1594,7 +1588,7 @@ order by c.create_time desc limit 1
|
|
1594
|
1588
|
from case_application where room_id like concat('%', #{roomId}, '%') limit 1
|
|
1595
|
1589
|
</select>
|
|
1596
|
1590
|
|
|
1597
|
|
- <select id="selectMaxRoomId" resultType="java.lang.Integer">
|
|
|
1591
|
+ <select id="selectMaxRoomId" resultType="java.lang.Long">
|
|
1598
|
1592
|
select max(room_id+1) as maxRoomId
|
|
1599
|
1593
|
from reserved_conference ;
|
|
1600
|
1594
|
</select>
|