From efa7c238ab4608dbd6e57983cf1d5c53470867bc Mon Sep 17 00:00:00 2001
From: liyj <15602261488@163.com>
Date: Tue, 15 Oct 2024 15:20:17 +0800
Subject: [PATCH] 1、一二级事件流程优化
---
dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseInfoMapper.xml | 124 +++++++++++++++++++++++++++++++++--------
1 files changed, 100 insertions(+), 24 deletions(-)
diff --git a/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseInfoMapper.xml b/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseInfoMapper.xml
index 58419b0..ea18c9a 100644
--- a/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseInfoMapper.xml
+++ b/dyh-service/dyh-mediate/src/main/java/cn/huge/module/cases/dao/mapper/xml/CaseInfoMapper.xml
@@ -48,6 +48,7 @@
<result property="canalName" column="canal_name"/>
<result property="visitWay" column="visit_way"/>
<result property="visitWayName" column="visit_way_name"/>
+ <result property="zxslStatus" column="zxsl_status"/>
<result property="caseDes" column="case_des"/>
<result property="caseClaim" column="case_claim"/>
<result property="majorStatus" column="major_status"/>
@@ -72,6 +73,7 @@
<result property="processName" column="process_name"/>
<result property="infoProcess" column="info_process"/>
<result property="infoProcessName" column="info_process_name"/>
+ <result property="partyShow" column="party_show"/>
<result property="wantUnitId" column="want_unit_id"/>
<result property="wantUnitName" column="want_unit_name"/>
<result property="wantUserId" column="want_user_id"/>
@@ -103,14 +105,19 @@
<result property="agreeTypeName" column="agree_type_name"/>
<result property="agreeContent" column="agree_content"/>
<result property="createTime" column="create_time"/>
+ <result property="plaintiffs" column="plaintiffs"/>
+ <result property="defendants" column="defendants"/>
+ <result property="queCityName" column="que_city_name"/>
+ <result property="queAreaName" column="que_area_name"/>
+ <result property="queRoadName" column="que_road_name"/>
+ <result property="caseTypeFirst" column="case_type_first"/>
+ <result property="caseTypeFirstName" column="case_type_first_name"/>
+ <result property="caseTaskId" column="caseTaskId"/>
</resultMap>
<!-- 表 -->
<sql id='table-name'>dyh_case_info</sql>
<sql id="column-part-all">
- a
- .
- id
- ,
+ a.id,
a.status,
a.status_name,
a.canal,
@@ -121,6 +128,13 @@
a.input_unit_id,
a.input_unit_name,
a.create_time,
+ a.plaintiffs,
+ a.defendants,
+ a.que_city_name,
+ a.que_area_name,
+ a.que_road_name,
+ a.case_type_first,
+ a.case_type_first_name,
b.medi_result,
b.medi_result_name,
b.mediate_unit_id,
@@ -130,7 +144,8 @@
b.close_time,
b.agree_type,
b.agree_type_name,
- b.agree_content
+ b.agree_content,
+ c.id as caseTaskId
</sql>
<!-- 字段 -->
<sql id="column-part">
@@ -172,6 +187,7 @@
canal_name,
visit_way,
visit_way_name,
+ zxsl_status,
case_des,
case_claim,
major_status,
@@ -200,6 +216,7 @@
want_unit_name,
want_user_id,
want_user_name,
+ party_show,
delete_status,
cust_id,
create_time,
@@ -243,6 +260,7 @@
<if test="entity.canalName != null">canal_name = #{entity.canalName},</if>
<if test="entity.visitWay != null">visit_way = #{entity.visitWay},</if>
<if test="entity.visitWayName != null">visit_way_name = #{entity.visitWayName},</if>
+ <if test="entity.zxslStatus != null">zxsl_status = #{entity.zxslStatus},</if>
<if test="entity.caseDes != null">case_des = #{entity.caseDes},</if>
<if test="entity.caseClaim != null">case_claim = #{entity.caseClaim},</if>
<if test="entity.majorStatus != null">major_status = #{entity.majorStatus},</if>
@@ -267,6 +285,7 @@
<if test="entity.processName != null">process_name = #{entity.processName},</if>
<if test="entity.infoProcess != null">info_process = #{entity.infoProcess},</if>
<if test="entity.infoProcessName != null">info_process_name = #{entity.infoProcessName},</if>
+ <if test="entity.partyShow != null">party_show = #{entity.partyShow},</if>
<if test="entity.wantUnitId != null">want_unit_id = #{entity.wantUnitId},</if>
<if test="entity.wantUnitName != null">want_unit_name = #{entity.wantUnitName},</if>
<if test="entity.wantUserId != null">want_user_id = #{entity.wantUserId},</if>
@@ -281,6 +300,12 @@
<if test="terms != null">
<where>
and delete_status = 0
+ <if test="terms.ids != null and terms.ids.size > 0">
+ and a.id in
+ <foreach collection="terms.ids" item="id" index="index" open="(" separator="," close=")">
+ #{id}
+ </foreach>
+ </if>
<if test="terms.status != null and terms.status !=''">
and a.status = #{terms.status}
</if>
@@ -306,7 +331,7 @@
and a.input_unit_id = #{terms.inputUnitId}
</if>
<if test="terms.inputUnitName != null and terms.inputUnitName !=''">
- and a.input_unit_name = #{terms.inputUnitName}
+ and a.input_unit_name like CONCAT('%', #{terms.inputUnitName}, '%')
</if>
<if test="terms.visitTimeStart != null and terms.visitTimeStart !='' and terms.visitTimeEnd != null and terms.visitTimeEnd !=''">
and (DATE_FORMAT(a.visit_time,'%Y-%m-%d %H:%i:%s') <![CDATA[ >= ]]> #{terms.visitTimeStart}
@@ -337,7 +362,46 @@
and a.que_road = #{terms.queRoad}
</if>
<if test="terms.isArea != null and terms.isArea !=''">
- and a.que_city is not null
+ and a.que_city is not null and a.que_area is not null and a.que_road is not null
+ </if>
+ <if test="terms.caseRef != null and terms.caseRef !=''">
+ and a.case_ref = #{terms.caseRef}
+ </if>
+ <if test="terms.plaintiffs != null and terms.plaintiffs !=''">
+ and a.plaintiffs like CONCAT('%', #{terms.plaintiffs}, '%')
+ </if>
+ <if test="terms.defendants != null and terms.defendants !=''">
+ and a.defendants like CONCAT('%', #{terms.defendants}, '%')
+ </if>
+ <if test="terms.peopleNumStart != null and terms.peopleNumStart !=''">
+ and a.people_num <![CDATA[ >= ]]> #{terms.peopleNumStart}
+ </if>
+ <if test="terms.peopleNumEnd != null and terms.peopleNumEnd !=''">
+ and a.people_num <![CDATA[ <= ]]> #{terms.peopleNumEnd}
+ </if>
+ <if test="terms.amountStart != null and terms.amountStart !=''">
+ and a.amount <![CDATA[ >= ]]> #{terms.amountStart}
+ </if>
+ <if test="terms.amountEnd != null and terms.amountEnd !=''">
+ and a.amount <![CDATA[ <= ]]> #{terms.amountEnd}
+ </if>
+ <if test="terms.evaluateGrade != null and terms.evaluateGrade !=''">
+ and a.id in(select case_id from dyh_case_evaluate where evaluate_grade = #{terms.evaluateGrade})
+ </if>
+ <if test="terms.mediateUnitId != null and terms.mediateUnitId !=''">
+ and b.mediate_unit_id = #{terms.mediateUnitId}
+ </if>
+ <if test="terms.assistUnitId != null and terms.assistUnitId !=''">
+ and b.assist_unit_id = #{terms.assistUnitId}
+ </if>
+ <if test="terms.mediateUnitName != null and terms.mediateUnitName !=''">
+ and b.mediate_unit_name like CONCAT('%', #{terms.mediateUnitName}, '%')
+ </if>
+ <if test="terms.assistUnitName != null and terms.assistUnitName !=''">
+ and b.assist_unit_name like CONCAT('%', #{terms.assistUnitName}, '%')
+ </if>
+ <if test="terms.mediResult != null and terms.mediResult !=''">
+ and b.medi_result = #{terms.mediResult}
</if>
</where>
</if>
@@ -354,6 +418,9 @@
</if>
<if test="terms.id != null and terms.id !=''">
and id = #{terms.id}
+ </if>
+ <if test="terms.partyShow != null and terms.partyShow !=''">
+ and party_show = #{terms.partyShow}
</if>
<if test="terms.caseTitle != null and terms.caseTitle !=''">
and case_title = #{terms.caseTitle}
@@ -462,6 +529,9 @@
</if>
<if test="terms.visitWayName != null and terms.visitWayName !=''">
and visit_way_name = #{terms.visitWayName}
+ </if>
+ <if test="terms.zxslStatus != null and terms.zxslStatus !=''">
+ and zxsl_status = #{terms.zxslStatus}
</if>
<if test="terms.caseDes != null and terms.caseDes !=''">
and case_des = #{terms.caseDes}
@@ -660,8 +730,8 @@
<sql id="where-register-part">
<if test="terms != null">
<where>
- <if test="terms.inputUnitName != null and terms.inputUnitName !=''">
- and t1.input_unit_mame = #{inputUnitName}
+ <if test="terms.inputUnitId != null and terms.inputUnitId !=''">
+ and t1.input_unit_id = #{terms.inputUnitId}
</if>
<if test="terms.createStart != null and terms.createStart !='' and terms.createEnd != null and terms.createEnd !=''">
and (DATE_FORMAT(t1.create_time,'%Y-%m-%d') <![CDATA[ >= ]]> #{terms.createStart}
@@ -673,29 +743,29 @@
<if test="terms.caseTypeFirstName != null and terms.caseTypeFirstName !=''">
and t1.case_type_first_name = #{caseTypeFirstName}
</if>
- <if test="terms.caseTypeName != null and terms.caseTypeName !=''">
- and t1.case_type_name = #{terms.caseTypeName}
+ <if test="terms.caseType != null and terms.caseType !=''">
+ and t1.case_type = #{terms.caseType}
</if>
<if test="terms.canal != null and terms.canal !=''">
- and t1.canal = #{canal}
+ and t1.canal = #{terms.canal}
</if>
<if test="terms.canalName != null and terms.canalName !=''">
- and t1.canal_name = #{canalName}
+ and t1.canal_name = #{terms.canalName}
</if>
<if test="terms.plaintiffs != null and terms.plaintiffs !=''">
- and t1.plaintiffs = #{terms.plaintiffs}
+ and t1.plaintiffs like CONCAT('%', #{terms.plaintiffs}, '%')
</if>
<if test="terms.defendants != null and terms.defendants !=''">
- and t1.defendants = #{terms.defendants}
- </if>
- <if test="terms.status != null and terms.status !=''">
- and t1.status = #{terms.status}
+ and t1.defendants like CONCAT('%', #{terms.defendants}, '%')
</if>
<if test="terms.statusName != null and terms.statusName !=''">
- and t1.statusName = #{terms.statusName}
+ and t1.status_name = #{terms.statusName}
</if>
<if test="terms.mediResultName != null and terms.mediResultName !=''">
and t2.medi_result_name = #{terms.mediResultName}
+ </if>
+ <if test="terms.mediResult != null and terms.mediResult !=''">
+ and t2.medi_result = #{terms.mediResult}
</if>
</where>
</if>
@@ -703,14 +773,17 @@
<select id="pageTermsCaseRegister" resultType="cn.huge.module.cases.domain.dto.CaseRegisterDTO">
SELECT
- t1.create_time as createTime,t1.input_user_name as inputUserName,t1.status_name as statusName,t1.case_level as
+ t1.id as caseId,t1.create_time as createTime,t1.input_user_name as inputUserName,t1.status_name as statusName,t1.case_level as
caseLevel,t1.canal_name as canalName,
t1.case_type_first_name as caseTypeFirstName,t1.case_type_name as caseTypeName,t1.plaintiffs as
plaintiffs,t1.defendants as defendants,t2.medi_result_name as mediResultName,
- t3.number as superviseCount
+ t3.number as superviseCount,
+ t4.id as caseTaskId
FROM
- dyh_case_info t1 left join dyh_case_info_unfold t2 on t1.id = t2.id
+ dyh_case_info t1
+ left join dyh_case_info_unfold t2 on t1.id = t2.id
left join (select count(*) as number ,case_id from dyh_case_supervise group by case_id) t3 on t3.case_id=t1.id
+ left join (select id ,case_id from dyh_case_task group by case_id) t4 on t1.id = t4.case_id
<include refid="where-register-part"/>
<if test="page.sort != null">
<foreach collection="page.sort" item="s" index="index" separator="," open="order by ">
@@ -728,7 +801,8 @@
SELECT
count(t1.id)
FROM
- dyh_case_info t1 left join dyh_case_info_unfold t2 on t1.id = t2.id
+ dyh_case_info t1
+ left join dyh_case_info_unfold t2 on t1.id = t2.id
<include refid="where-register-part"/>
</select>
<!-- 根据条件统计 -->
@@ -745,6 +819,7 @@
<include refid="column-part-all"/>
FROM
dyh_case_info a LEFT JOIN dyh_case_info_unfold b on a.id = b.id
+ left join (select id ,case_id from dyh_case_task group by case_id) c on a.id = c.case_id
<include refid="where-part-all"/>
<if test="page.sort != null">
<foreach collection="page.sort" item="s" index="index" separator="," open="order by ">
@@ -772,7 +847,8 @@
count(1) as caseNum,
sum(case when b.medi_result = '22_00025-1' then 1 else 0 end) as resolveNum,
sum(case when b.medi_result is null and a.info_process <![CDATA[ < ]]> 4 then 1 else 0 end) as resolveingNum,
- sum(case when b.medi_result = '22_00025-2' then 1 else 0 end) as unResolveNum
+ sum(case when b.medi_result = '22_00025-2' then 1 else 0 end) as unResolveNum,
+ sum(case when a.info_process = 4 then 1 else 0 end) as rejectNum
FROM
dyh_case_info a LEFT JOIN dyh_case_info_unfold b on a.id = b.id
<include refid="where-part-all"/>
--
Gitblit v1.8.0