Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into hjb
This commit is contained in:
@@ -130,12 +130,12 @@
|
||||
instr (t.arbitrator_id,#{userId})>0)
|
||||
</if>
|
||||
<!--申请人-->
|
||||
<!-- <if test="applicationOrganId != null and applicationOrganId != ''">-->
|
||||
<!-- or ( t.application_organ_id = #{applicationOrganId} AND t.identity_type=1-->
|
||||
<!-- <!–暂时改为可以查询到生成裁决书之前所有的案件状态–>-->
|
||||
<!-- and (t.case_status <= 10 or t.case_status=31))-->
|
||||
<!-- <if test="applicationOrganId != null and applicationOrganId != ''">-->
|
||||
<!-- or ( t.application_organ_id = #{applicationOrganId} AND t.identity_type=1-->
|
||||
<!-- <!–暂时改为可以查询到生成裁决书之前所有的案件状态–>-->
|
||||
<!-- and (t.case_status <= 10 or t.case_status=31))-->
|
||||
|
||||
<!-- </if>-->
|
||||
<!-- </if>-->
|
||||
<!--部门长-->
|
||||
<if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
|
||||
or (t.identity_type=1 and t.case_status in
|
||||
@@ -348,6 +348,7 @@
|
||||
</where>
|
||||
union
|
||||
<!--秘书审核案件-->
|
||||
select tt2.* from(
|
||||
SELECT
|
||||
l.case_appli_id id,
|
||||
l.id AS caseLogId,
|
||||
@@ -431,22 +432,22 @@
|
||||
JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id
|
||||
AND ca.identity_type = 1
|
||||
WHERE
|
||||
l.update_submit_status IN ( 1, 2 ) and ca.identity_type=1 and c.case_status >10
|
||||
<if test="caseStatusList != null and caseStatusList.size() > 0">
|
||||
and c.case_status in
|
||||
<foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
|
||||
#{caseStatus}
|
||||
</foreach>
|
||||
</if>
|
||||
l.update_submit_status IN ( 1, 2 ) and ca.identity_type=1
|
||||
<!-- <if test="caseStatusList != null and caseStatusList.size() > 0">-->
|
||||
<!-- and c.case_status in-->
|
||||
<!-- <foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">-->
|
||||
<!-- #{caseStatus}-->
|
||||
<!-- </foreach>-->
|
||||
<!-- </if>-->
|
||||
<if test="deptIds != null and deptIds.size() > 0">
|
||||
and ca.application_organ_id in
|
||||
<foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="caseStatus != null">
|
||||
AND c.case_status = #{caseStatus}
|
||||
</if>
|
||||
<!-- <if test="caseStatus != null">-->
|
||||
<!-- AND c.case_status = #{caseStatus}-->
|
||||
<!-- </if>-->
|
||||
<if test="lockStatus != null">
|
||||
AND c.lock_status = #{lockStatus}
|
||||
</if>
|
||||
@@ -467,6 +468,21 @@
|
||||
case_application_log
|
||||
WHERE
|
||||
c.id = case_appli_id)
|
||||
) tt2
|
||||
|
||||
<where>
|
||||
<if test="caseStatusList != null and caseStatusList.size() > 0">
|
||||
and tt2.case_status in
|
||||
<foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
|
||||
#{caseStatus}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="caseStatus != null">
|
||||
AND tt2.case_status = #{caseStatus}
|
||||
</if>
|
||||
|
||||
</where>
|
||||
|
||||
</if>
|
||||
</trim>
|
||||
) t1
|
||||
@@ -589,13 +605,13 @@
|
||||
instr (t.arbitrator_id,#{userId})>0)
|
||||
</if>
|
||||
<!--法律顾问秘书-->
|
||||
<!-- <if test="deptIds != null and deptIds.size() > 0">-->
|
||||
<!-- or (t.identity_type=1 and t.case_status in (1,5,11,15,16,17,31)-->
|
||||
<!-- and t.application_organ_id in-->
|
||||
<!-- <foreach item="item" collection="deptIds" open="(" separator="," close=")">-->
|
||||
<!-- #{item}-->
|
||||
<!-- </foreach> )-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="deptIds != null and deptIds.size() > 0">-->
|
||||
<!-- or (t.identity_type=1 and t.case_status in (1,5,11,15,16,17,31)-->
|
||||
<!-- and t.application_organ_id in-->
|
||||
<!-- <foreach item="item" collection="deptIds" open="(" separator="," close=")">-->
|
||||
<!-- #{item}-->
|
||||
<!-- </foreach> )-->
|
||||
<!-- </if>-->
|
||||
|
||||
<!--申请人-->
|
||||
<if test="applicationOrganId != null and applicationOrganId != ''">
|
||||
@@ -665,9 +681,7 @@
|
||||
<if test="caseStatus != null">
|
||||
AND c.case_status = #{caseStatus}
|
||||
</if>
|
||||
<if test="caseNum != null and caseNum != ''">
|
||||
AND c.case_num = #{caseNum}
|
||||
</if>
|
||||
|
||||
<if test="caseStatusList != null and caseStatusList.size() > 0">
|
||||
and c.case_status in
|
||||
<foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
|
||||
@@ -690,13 +704,13 @@
|
||||
instr (t.arbitrator_id,#{userId})>0)
|
||||
</if>
|
||||
<!--法律顾问-->
|
||||
<!-- <if test="deptIds != null and deptIds.size() > 0">-->
|
||||
<!-- or (t.identity_type=1 and t.case_status in (1,5,11,15,16,17,31)-->
|
||||
<!-- and t.application_organ_id in-->
|
||||
<!-- <foreach item="item" collection="deptIds" open="(" separator="," close=")">-->
|
||||
<!-- #{item}-->
|
||||
<!-- </foreach> )-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="deptIds != null and deptIds.size() > 0">-->
|
||||
<!-- or (t.identity_type=1 and t.case_status in (1,5,11,15,16,17,31)-->
|
||||
<!-- and t.application_organ_id in-->
|
||||
<!-- <foreach item="item" collection="deptIds" open="(" separator="," close=")">-->
|
||||
<!-- #{item}-->
|
||||
<!-- </foreach> )-->
|
||||
<!-- </if>-->
|
||||
<!--申请人-->
|
||||
<if test="applicationOrganId != null and applicationOrganId != ''">
|
||||
or ( t.application_organ_id = #{applicationOrganId} AND t.identity_type=1
|
||||
@@ -728,37 +742,37 @@
|
||||
</where>
|
||||
union
|
||||
</if>
|
||||
<!-- <if test="applicationOrganId != null and applicationOrganId != ''">-->
|
||||
<!-- <!–申请人案件–>-->
|
||||
<!-- <if test="applicationOrganId != null and applicationOrganId != ''">-->
|
||||
<!-- <!–申请人案件–>-->
|
||||
|
||||
<!-- select l.case_appli_id id ,-->
|
||||
<!-- c.case_status,ca.application_organ_id,-->
|
||||
<!-- c.arbitrator_id,ca.identity_num , ca.identity_type-->
|
||||
<!-- from case_application c-->
|
||||
<!-- JOIN case_application_log l ON c.id = l.case_appli_id-->
|
||||
<!-- JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id AND ca.identity_type = 1 and c.version=l.version-->
|
||||
<!-- <where>-->
|
||||
<!-- (c.case_status <= 10 or c.case_status=31) AND ca.identity_type=1-->
|
||||
<!-- select l.case_appli_id id ,-->
|
||||
<!-- c.case_status,ca.application_organ_id,-->
|
||||
<!-- c.arbitrator_id,ca.identity_num , ca.identity_type-->
|
||||
<!-- from case_application c-->
|
||||
<!-- JOIN case_application_log l ON c.id = l.case_appli_id-->
|
||||
<!-- JOIN case_affiliate_log ca ON ca.case_appli_log_id = l.id AND ca.identity_type = 1 and c.version=l.version-->
|
||||
<!-- <where>-->
|
||||
<!-- (c.case_status <= 10 or c.case_status=31) AND ca.identity_type=1-->
|
||||
|
||||
<!-- <if test="applicationOrganId != null and applicationOrganId != ''">-->
|
||||
<!-- AND ca.application_organ_id = #{applicationOrganId}-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="caseStatus != null">-->
|
||||
<!-- AND c.case_status = #{caseStatus}-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="caseNum != null and caseNum != ''">-->
|
||||
<!-- AND c.case_num = #{caseNum}-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="nameId != null and nameId != ''">-->
|
||||
<!-- AND ca.application_organ_id=#{nameId}-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="applicationOrganId != null and applicationOrganId != ''">-->
|
||||
<!-- AND ca.application_organ_id = #{applicationOrganId}-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="caseStatus != null">-->
|
||||
<!-- AND c.case_status = #{caseStatus}-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="caseNum != null and caseNum != ''">-->
|
||||
<!-- AND c.case_num = #{caseNum}-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="nameId != null and nameId != ''">-->
|
||||
<!-- AND ca.application_organ_id=#{nameId}-->
|
||||
<!-- </if>-->
|
||||
|
||||
<!-- <if test="lockStatus != null">-->
|
||||
<!-- AND c.lock_status = #{lockStatus}-->
|
||||
<!-- </if>-->
|
||||
<!-- </where>-->
|
||||
<!-- union-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="lockStatus != null">-->
|
||||
<!-- AND c.lock_status = #{lockStatus}-->
|
||||
<!-- </if>-->
|
||||
<!-- </where>-->
|
||||
<!-- union-->
|
||||
<!-- </if>-->
|
||||
<!--秘书案件-->
|
||||
<if test="deptIds != null and deptIds.size() > 0">
|
||||
|
||||
@@ -787,12 +801,7 @@
|
||||
<if test="caseStatus != null">
|
||||
AND c.case_status = #{caseStatus}
|
||||
</if>
|
||||
<if test="lockStatus != null">
|
||||
AND c.lock_status = #{lockStatus}
|
||||
</if>
|
||||
<if test="caseNum != null and caseNum != ''">
|
||||
AND c.case_num = #{caseNum}
|
||||
</if>
|
||||
|
||||
<if test="nameId != null and nameId != ''">
|
||||
AND ca.application_organ_id=#{nameId} AND ca.identity_type=1
|
||||
</if>
|
||||
@@ -822,9 +831,14 @@
|
||||
c.hear_date ,c.arbitrat_claims ,
|
||||
c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
|
||||
c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,c.lock_status,
|
||||
c.update_by ,c.update_time , c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,c.filearbitra_url,c.version
|
||||
c.update_by ,c.update_time , c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,c.filearbitra_url,(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
|
||||
from case_application c
|
||||
JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
|
||||
JOIN case_application_log l ON c.id = l.case_appli_id and c.version=l.version
|
||||
|
||||
<where>
|
||||
<if test="caseStatus != null">
|
||||
AND c.case_status = #{caseStatus}
|
||||
@@ -1270,9 +1284,9 @@
|
||||
<if test="nameId != null and nameId != ''">
|
||||
AND ca.application_organ_id=#{nameId} AND ca.identity_type=1
|
||||
</if>
|
||||
<!-- <if test="caseStatusList != null and caseStatusList.size() > 0">-->
|
||||
<!-- and c.case_status in (1,5)-->
|
||||
<!-- </if>-->
|
||||
<!-- <if test="caseStatusList != null and caseStatusList.size() > 0">-->
|
||||
<!-- and c.case_status in (1,5)-->
|
||||
<!-- </if>-->
|
||||
<!-- 查询该案件的最新记录 -->
|
||||
AND l.version = (
|
||||
SELECT
|
||||
@@ -1454,7 +1468,7 @@
|
||||
<update id="bindCaseId">
|
||||
update case_application set room_id=#{roomId} where id = #{caseId}
|
||||
|
||||
<!-- update case_application set room_id= CONCAT(room_id,',',#{roomId}) where id =#{caseId} -->
|
||||
<!-- update case_application set room_id= CONCAT(room_id,',',#{roomId}) where id =#{caseId} -->
|
||||
</update>
|
||||
<update id="updateVersionById">
|
||||
update case_application set version = #{version} where id = #{id}
|
||||
@@ -1499,7 +1513,7 @@
|
||||
AND c.id = #{id}
|
||||
</if>
|
||||
</where>
|
||||
order by c.create_time desc limit 1
|
||||
order by c.create_time desc limit 1
|
||||
</select>
|
||||
<select id="listCaseApplicationByIds" resultMap="CaseApplicationResult">
|
||||
select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
|
||||
|
||||
Reference in New Issue
Block a user