优化批量送达裁决书功能
This commit is contained in:
@@ -879,6 +879,113 @@
|
||||
order by c.batch_number desc
|
||||
</select>
|
||||
|
||||
<select id="selectAdminCaseApplicationListBatch1" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
||||
SELECT DISTINCT t1.batch_number ,t1.arbitrat_method ,t1.arbitrator_name ,
|
||||
t1.arbitrator_id ,t1.identity_type ,t1.name ,t1.applicationOrganId ,
|
||||
t1.applicantName,t1.arbitratMethodName
|
||||
FROM(
|
||||
<trim suffixOverrides="union">
|
||||
<!--被申请人,仲裁员,部门长,财务,代理人案件-->
|
||||
<if test="isOtherRole!=null and isOtherRole==1">
|
||||
SELECT c.batch_number ,c.arbitrat_method ,c.arbitrator_name ,
|
||||
c.arbitrator_id ,ca.identity_type ,ca.name ,ca.application_organ_id as applicationOrganId,
|
||||
ca.application_organ_name as applicantName, c.lock_status,
|
||||
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
|
||||
ELSE '无审理方式'
|
||||
END arbitratMethodName
|
||||
FROM case_application c left join case_affiliate ca on c.id = ca.case_appli_id
|
||||
<where>
|
||||
<!--根据角色和状态过滤-->
|
||||
<!--被申请人-->
|
||||
<if test="idCard != null and idCard != ''">
|
||||
or (ca.identity_num=#{idCard} AND ca.identity_type=2
|
||||
and (c.case_status=4 or c.case_status=17)
|
||||
)
|
||||
</if>
|
||||
<!--仲裁员-->
|
||||
<if test="userId != null and userId != ''">
|
||||
or ( ca.identity_type=1 and
|
||||
c.case_status in (7,13,17,18)
|
||||
and
|
||||
instr (c.arbitrator_id,#{userId})>0 )
|
||||
</if>
|
||||
<!--部门长-->
|
||||
<if test="deptHeadStatus != null and deptHeadStatus.size() > 0">
|
||||
or (ca.identity_type=1)
|
||||
</if>
|
||||
<!--财务-->
|
||||
<if test="financeStatus != null and financeStatus != ''">
|
||||
or (ca.identity_type=1
|
||||
and c.case_status =#{financeStatus}
|
||||
)
|
||||
</if>
|
||||
<!--代理人-->
|
||||
<if test="agentDeptIds != null and agentDeptIds.size()>0">
|
||||
or (
|
||||
ca.application_organ_id in
|
||||
<foreach item="deptId" collection="agentDeptIds" open="(" separator="," close=")">#{deptId}
|
||||
</foreach>
|
||||
AND ca.identity_type=1
|
||||
and c.case_status in (0,9)
|
||||
)
|
||||
|
||||
</if>
|
||||
</where>
|
||||
|
||||
union
|
||||
</if>
|
||||
|
||||
<!--申请人案件-->
|
||||
<if test="applicationOrganId != null and applicationOrganId != ''">
|
||||
SELECT c.batch_number ,c.arbitrat_method ,c.arbitrator_name ,
|
||||
c.arbitrator_id ,ca.identity_type ,ca.name ,ca.application_organ_id as applicationOrganId,
|
||||
ca.application_organ_name as applicantName, c.lock_status,
|
||||
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
|
||||
ELSE '无审理方式'
|
||||
END arbitratMethodName
|
||||
FROM case_application c left join case_affiliate ca on c.id = ca.case_appli_id
|
||||
|
||||
<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>
|
||||
</where>
|
||||
union
|
||||
</if>
|
||||
|
||||
<!--秘书案件-->
|
||||
<if test="deptIds != null and deptIds.size() > 0">
|
||||
|
||||
SELECT c.batch_number ,c.arbitrat_method ,c.arbitrator_name ,
|
||||
c.arbitrator_id ,ca.identity_type ,ca.name ,ca.application_organ_id as applicationOrganId,
|
||||
ca.application_organ_name as applicantName, c.lock_status,
|
||||
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
|
||||
ELSE '无审理方式'
|
||||
END arbitratMethodName
|
||||
FROM case_application c left join case_affiliate ca on c.id = ca.case_appli_id
|
||||
|
||||
WHERE ca.identity_type=1
|
||||
and c.case_status in (1,5,8,9,11,14,15,16,17,31)
|
||||
union
|
||||
</if>
|
||||
</trim>
|
||||
|
||||
) t1
|
||||
WHERE t1.lock_status = 0 and t1.batch_number is not null
|
||||
and t1.identity_type = 1
|
||||
<if test="batchNumber != null and batchNumber != ''">
|
||||
AND t1.batch_number = #{batchNumber}
|
||||
</if>
|
||||
<if test="nameId != null and nameId != ''">
|
||||
AND t1.application_organ_id=#{nameId}
|
||||
</if>
|
||||
order by t1.batch_number desc
|
||||
|
||||
</select>
|
||||
|
||||
<select id="selectAdminCaseToDoCount" resultType="com.ruoyi.wisdomarbitrate.domain.vo.ToDoCount">
|
||||
SELECT
|
||||
sum( case when c.case_status=0 then 1 else 0 end) caseApply,
|
||||
|
||||
Reference in New Issue
Block a user