From abbaf2374fff7d02ecc3eecd6bf62504fbf27c4b Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Tue, 06 Apr 2021 22:33:25 +0800
Subject: [PATCH] 预警数量统计接口修改,预警数量分布接口修改,预警分类占比接口新增

---
 blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/healthcode/mapper/healthcodeMapper.xml |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/healthcode/mapper/healthcodeMapper.xml b/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/healthcode/mapper/healthcodeMapper.xml
index aa5f3e4..d7a271d 100644
--- a/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/healthcode/mapper/healthcodeMapper.xml
+++ b/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/healthcode/mapper/healthcodeMapper.xml
@@ -118,6 +118,7 @@
 	    ) b
 		 on
 		 a.click_date = b.datetime
+		 order by a.click_date asc
     </select>
 
 
@@ -137,7 +138,27 @@
         <if test="healthcodeVO.type!=null">
             and type=#{healthcodeVO.type}
         </if>
-        ORDER BY dtime asc
+        <if test="healthcodeVO.province!=null">
+            and province like concat('%',#{healthcodeVO.province},'%')
+        </if>
+        <if test="healthcodeVO.city!=null">
+            and city like concat('%',#{healthcodeVO.city},'%')
+        </if>
+        <if test="healthcodeVO.district!=null">
+            and district like concat('%',#{healthcodeVO.district},'%')
+        </if>
+        <if test="healthcodeVO.begTime!=null and healthcodeVO.begTime!='' and healthcodeVO.endTime!=null and healthcodeVO.endTime!='' ">
+            and date(dtime) between #{healthcodeVO.begTime} and #{healthcodeVO.endTime}
+        </if>
+        ORDER BY dtime desc
     </select>
 
+    <!--查询当前时间段红色健康码总个数-->
+    <select id="selHealthcodeTimeCount" resultType="java.lang.Integer">
+        select count(*) from healthcode
+        where type = 3
+        <if test="conditionVo.startTime!=null and conditionVo.startTime!='' and conditionVo.endTime!=null and conditionVo.endTime!=''">
+            and dtime between #{conditionVo.startTime} and #{conditionVo.endTime}
+        </if>
+    </select>
 </mapper>

--
Gitblit v1.9.3