From 36afc3a1f1437b8a3283dc0bf6475e96fded05a7 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Mon, 12 Apr 2021 22:35:36 +0800
Subject: [PATCH] 新增主动报警alarm,健康码,体温,包裹,违禁品导出数据接口
---
blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/alarm/mapper/AlarmMapper.xml | 98 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 98 insertions(+), 0 deletions(-)
diff --git a/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/alarm/mapper/AlarmMapper.xml b/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/alarm/mapper/AlarmMapper.xml
index ea1393a..3b4c5c6 100644
--- a/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/alarm/mapper/AlarmMapper.xml
+++ b/blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/alarm/mapper/AlarmMapper.xml
@@ -556,4 +556,102 @@
</select>
+ <!--查询符合条件的数据并导出-->
+ <select id="exportAlarm" resultType="org.springblade.jfpt.alarm.vo.AlarmExcel">
+ select
+ a.id,a.alarmType,a.alarmPeople,a.alarmTime,a.galarmPeople,a.sex,a.phoneNumber,a.place,a.content,a.waringType,a.bz,
+ a.deviceNumber,a.region,a.district,a.vaddress,a.aaddress,
+ a.alarmId,a.LEVEL,e.jd,e.wd,a.jtype,a.rname,a.jjTime,a.province,a.city,
+ e.serialNumber,e.oneContacts,e.ThreeContacts,e.twoContacts,e.onePhone,e.twoPhone,e.ThreePhone
+ from sys_alarm a
+ LEFT JOIN sys_equipment e on e.deviceNumber=a.deviceNumber
+ where 1=1
+ <if test="alarm.jtype!=null">
+ and a.jtype like concat('%',#{alarm.jtype},'%')
+ </if>
+ <if test="alarm.deviceNumber!=null">
+ and a.deviceNumber like concat('%',#{alarm.deviceNumber},'%')
+ </if>
+ <if test="alarm.galarmPeople!=null">
+ and a.galarmPeople like concat('%',#{alarm.galarmPeople},'%')
+ </if>
+ <if test="alarm.district!=null">
+ and a.district like concat('%',#{alarm.district},'%')
+ </if>
+ <if test="alarm.province!=null">
+ and a.province like concat('%',#{alarm.province},'%')
+ </if>
+ <if test="alarm.city!=null">
+ and a.city like concat('%',#{alarm.city},'%')
+ </if>
+ <if test="alarm.level!=null">
+ and a.level like concat('%',#{alarm.level},'%')
+ </if>
+ <if test="alarm.waringType!=null">
+ and a.waringType like concat('%',#{alarm.waringType},'%')
+ </if>
+ <if test="alarm.beginTime!=null and alarm.beginTime!=''">
+ and a.alarmTime>=#{alarm.beginTime}
+ </if>
+ <if test="alarm.endTime!=null and alarm.endTime!=''">
+ and a.alarmTime<=#{alarm.endTime}
+ </if>
+ <if test="alarm.timeDesc!=null and alarm.timeDesc!=''">
+ <if test="alarm.timeDesc=='30分钟以上'">
+ and czTime-alarmTime>1800
+ </if>
+ <if test="alarm.timeDesc=='10-30分钟'">
+ and czTime-alarmTime>600 and czTime-alarmTime <1800
+ </if>
+ <if test="alarm.timeDesc=='5-10分钟'">
+ and czTime-alarmTime>300 and czTime-alarmTime <600
+ </if>
+ <if test="alarm.timeDesc=='小于5分钟'">
+ and czTime-alarmTime>0 and czTime-alarmTime <300
+ </if>
+ <if test="alarm.timeDesc=='0-2'">
+ and hour(alarmTime)>=0 and hour(alarmTime) <2
+ </if>
+ <if test="alarm.timeDesc=='2-4'">
+ and hour(alarmTime)>=2 and hour(alarmTime) <4
+ </if>
+ <if test="alarm.timeDesc=='4-6'">
+ and hour(alarmTime)>=4 and hour(alarmTime) <6
+ </if>
+ <if test="alarm.timeDesc=='6-8'">
+ and hour(alarmTime)>=6 and hour(alarmTime) <8
+ </if>
+ <if test="alarm.timeDesc=='8-10'">
+ and hour(alarmTime)>=8 and hour(alarmTime) <10
+ </if>
+ <if test="alarm.timeDesc=='10-12'">
+ and hour(alarmTime)>=10 and hour(alarmTime) <12
+ </if>
+ <if test="alarm.timeDesc=='12-14'">
+ and hour(alarmTime)>=12 and hour(alarmTime) <14
+ </if>
+ <if test="alarm.timeDesc=='14-16'">
+ and hour(alarmTime)>=14 and hour(alarmTime) <16
+ </if>
+ <if test="alarm.timeDesc=='16-18'">
+ and hour(alarmTime)>=16 and hour(alarmTime) <18
+ </if>
+ <if test="alarm.timeDesc=='18-20'">
+ and hour(alarmTime)>=18 and hour(alarmTime) <20
+ </if>
+ <if test="alarm.timeDesc=='20-22'">
+ and hour(alarmTime)>=20 and hour(alarmTime) <22
+ </if>
+ <if test="alarm.timeDesc=='22-24'">
+ and hour(alarmTime)>=22 and hour(alarmTime) <24
+ </if>
+ </if>
+
+ and a.waringType IN("紧急求救")
+
+ ORDER BY
+ a.jtype ASC,
+ a.alarmTime DESC
+ </select>
+
</mapper>
--
Gitblit v1.9.3