From 3c8b8029a94666ce55e38d1f11c0d1bb0330afa5 Mon Sep 17 00:00:00 2001
From: huangh <hshgjzd5@163.com>
Date: Tue, 29 Oct 2024 14:59:11 +0800
Subject: [PATCH] fix:统计重复案件,添加本级数据处理,修改请求方式
---
dyh-service/dyh-mediate/src/main/java/cn/huge/module/analysis/dao/mapper/xml/AnalysisMapper.xml | 28 ++++++++++++++++++++++++++--
1 files changed, 26 insertions(+), 2 deletions(-)
diff --git a/dyh-service/dyh-mediate/src/main/java/cn/huge/module/analysis/dao/mapper/xml/AnalysisMapper.xml b/dyh-service/dyh-mediate/src/main/java/cn/huge/module/analysis/dao/mapper/xml/AnalysisMapper.xml
index 20a82d1..1bbba00 100644
--- a/dyh-service/dyh-mediate/src/main/java/cn/huge/module/analysis/dao/mapper/xml/AnalysisMapper.xml
+++ b/dyh-service/dyh-mediate/src/main/java/cn/huge/module/analysis/dao/mapper/xml/AnalysisMapper.xml
@@ -233,8 +233,16 @@
<if test="groupByRoad != null and groupByRoad != ''">
road_name as groupByType,
</if>
- <if test="groupByTime != null and groupByTime != '' and groupByTime == 'month'">
- DATE_FORMAT(ci.create_time, '%Y-%m') as groupByType,
+ <if test="groupByTime != null and groupByTime != ''">
+ <if test="groupByTime == 'day'">
+ DATE_FORMAT(ci.create_time, '%Y-%m-%d') as groupByType,
+ </if>
+ <if test="groupByTime == 'month'">
+ DATE_FORMAT(ci.create_time, '%Y-%m') as groupByType,
+ </if>
+ <if test="groupByTime == 'year'">
+ DATE_FORMAT(ci.create_time, '%Y') as groupByType,
+ </if>
</if>
COUNT(DISTINCT fc.case_id) as repeatCount
FROM FilteredCases fc
@@ -245,6 +253,12 @@
<if test="createTimeStart != null and createTimeStart != '' and createTimeEnd != null and createTimeEnd != ''">
AND ci.create_time BETWEEN #{createTimeStart} AND #{createTimeEnd}
</if>
+ <if test="finishTimeStart != null and finishTimeStart != '' and finishTimeEnd != null and finishTimeEnd != ''">
+ AND cui.close_time BETWEEN #{finishTimeStart} AND #{finishTimeEnd}
+ </if>
+ <if test="caseType != null and caseType != ''">
+ AND CI."case_type" = #{caseType}
+ </if>
<if test="queCity != null and queCity != ''">
AND unit.city = #{queCity}
</if>
@@ -254,13 +268,23 @@
<if test="queRoad != null and queRoad != ''">
AND unit.road = #{queRoad}
</if>
+ <if test="isFinish != null and isFinish != ''">
+ <if test="isFinish == 'true'">
+ AND CI."process" == '6'
+ </if>
+ <if test="isFinish == 'false'">
+ AND CI."process" != '6'
+ </if>
+ </if>
<if test="groupByCaseType != null and groupByCaseType != ''">
GROUP BY case_type_first_name
</if>
<if test="groupByArea != null and groupByArea != ''">
+<!-- AND road_name is not NULL-->
GROUP BY area_name
</if>
<if test="groupByRoad != null and groupByRoad != ''">
+<!-- AND road_name is not NULL-->
GROUP BY road_name
</if>
<if test="groupByTime != null and groupByTime != ''">
--
Gitblit v1.8.0