案件修改

This commit is contained in:
18792927508
2023-11-28 10:37:17 +08:00
parent c46f81c628
commit 6b73802bf7
4 changed files with 71 additions and 59 deletions
@@ -305,7 +305,7 @@
WHERE case_appli_id = c.id
)
WHERE
ca.identity_type=1 and c.case_status in (1,5,11,15,16,17,31)
ca.identity_type=1 and c.case_status in (1,5,11,14,15,16,17,31)
<if test="caseStatusList != null and caseStatusList.size() > 0">
and c.case_status in
<foreach item="caseStatus" collection="caseStatusList" open="(" separator="," close=")">
@@ -676,13 +676,11 @@
<!-- </foreach> )-->
<!-- </if>-->
<!--申请人-->
<!-- <if test="applicationOrganId != null and applicationOrganId != ''">-->
<!-- or ( t.application_organ_id = #{applicationOrganId} AND t.identity_type=1-->
<!-- &lt;!&ndash;暂时改为可以查询到生成裁决书之前所有的案件状态&ndash;&gt;-->
<!-- and (t.case_status &lt;= 10 or t.case_status=31))-->
<!-- &lt;!&ndash; and t.case_status in (0,2,17))&ndash;&gt;-->
<if test="applicationOrganId != null and applicationOrganId != ''">
or ( t.application_organ_id = #{applicationOrganId} AND t.identity_type=1
and t.case_status in (0,2,17))
<!-- </if>-->
</if>
<!--部门长-->
<if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
or (t.identity_type=1 and t.case_status in
@@ -708,37 +706,37 @@
</where>
union
</if>
<if test="applicationOrganId != null and applicationOrganId != ''">
<!--申请人案件-->
<!-- <if test="applicationOrganId != null and applicationOrganId != ''">-->
<!-- &lt;!&ndash;申请人案件&ndash;&gt;-->
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 &lt;= 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 &lt;= 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">
@@ -757,7 +755,7 @@
WHERE case_appli_id = c.id
)
WHERE
ca.identity_type=1 and c.case_status in (1,5,11,15,16,17,31)
ca.identity_type=1 and c.case_status in (1,5,11,14,15,16,17,31)
<if test="deptIds != null and deptIds.size() > 0">
and ca.application_organ_id in
<foreach item="item" collection="deptIds" open="(" separator="," close=")">