From df9293f77927ee7a5ec4389a1143c6653c64aa66 Mon Sep 17 00:00:00 2001
From: xiebin <123456>
Date: Mon, 16 Jan 2023 16:09:23 +0800
Subject: [PATCH] 配置文件修改
---
blade-service/blade-jfpts/src/main/java/org/springblade/jfpt/alarm/mapper/AlarmMapper.xml | 194 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 193 insertions(+), 1 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 48a94f0..18afadc 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
@@ -239,6 +239,197 @@
a.alarmTime DESC
</select>
+ <select id="selectazPage" resultMap="alarmResultMap">
+ SELECT
+ *
+ FROM
+ sys_alarm
+ WHERE
+ 1 = 1
+ <if test="alarm.district!=null">
+ and district like concat('%',#{alarm.district},'%')
+ </if>
+ <if test="alarm.province!=null">
+ and province like concat('%',#{alarm.province},'%')
+ </if>
+ <if test="alarm.city!=null">
+ and city like concat('%',#{alarm.city},'%')
+ </if>
+ <if test="alarm.alarmPeople!=null">
+ and alarmPeople like concat('%',#{alarm.alarmPeople},'%')
+ </if>
+ <if test="alarm.jtype!=null">
+ and jtype = #{alarm.jtype}
+ </if>
+ <if test="alarm.rname!=null">
+ and rname like concat('%',#{alarm.rname},'%')
+ </if>
+ <if test="alarm.deviceNumber!=null">
+ and deviceNumber like concat('%',#{alarm.deviceNumber},'%')
+ </if>
+ AND waringType IN ( "安装任务" )
+ ORDER BY
+ jtype ASC,
+ alarmTime DESC
+ </select>
+
+ <select id="getChartData" resultType="java.util.Map">
+ SELECT
+ COUNT( * ) AS value,
+ "未安装" as name
+ FROM
+ sys_alarm
+ WHERE
+ 1 = 1
+
+ <if test="beginTime!=null and beginTime!=''">
+ and alarmTime>=#{beginTime}
+ </if>
+ <if test="endTime!=null and endTime!=''">
+ and alarmTime<=#{endTime}
+ </if>
+
+ AND jtype = 0
+ AND waringType IN ( "安装任务" ) UNION ALL
+ SELECT
+ COUNT( * ) AS value,
+ "已安装" as name
+ FROM
+ sys_alarm
+ WHERE
+ 1 = 1
+
+ <if test="beginTime!=null and beginTime!=''">
+ and alarmTime>=#{beginTime}
+ </if>
+ <if test="endTime!=null and endTime!=''">
+ and alarmTime<=#{endTime}
+ </if>
+
+ AND jtype = 2
+ AND waringType IN ( "安装任务" )
+ </select>
+ <select id="getChartDataAlarm" resultType="java.util.Map">
+ SELECT
+ COUNT( * ) AS
+ value
+ ,
+ "未处理" AS name
+ FROM
+ sys_alarm
+ WHERE
+ 1 = 1
+
+ <if test="beginTime!=null and beginTime!=''">
+ and alarmTime>=#{beginTime}
+ </if>
+ <if test="endTime!=null and endTime!=''">
+ and alarmTime<=#{endTime}
+ </if>
+
+ AND jtype = 0
+ AND waringType IN ( "紧急求救" ) UNION ALL
+ SELECT
+ COUNT( * ) AS
+ value
+ ,
+ "处理中" AS name
+ FROM
+ sys_alarm
+ WHERE
+ 1 = 1
+
+ <if test="beginTime!=null and beginTime!=''">
+ and alarmTime>=#{beginTime}
+ </if>
+ <if test="endTime!=null and endTime!=''">
+ and alarmTime<=#{endTime}
+ </if>
+
+ AND jtype = 1
+ AND waringType IN ( "紧急求救" )
+ UNION ALL
+ SELECT
+ COUNT( * ) AS
+ value
+ ,
+ "已处理" AS name
+ FROM
+ sys_alarm
+ WHERE
+ 1 = 1
+
+ <if test="beginTime!=null and beginTime!=''">
+ and alarmTime>=#{beginTime}
+ </if>
+ <if test="endTime!=null and endTime!=''">
+ and alarmTime<=#{endTime}
+ </if>
+
+ AND jtype = 2
+ AND waringType IN ( "紧急求救" )
+ </select>
+ <select id="getChartDataAlarmBs" resultType="java.util.Map">
+ SELECT
+ COUNT( * ) AS
+ value
+ ,
+ "一般警情" AS name
+ FROM
+ sys_alarm
+ WHERE
+ 1 = 1
+
+ <if test="beginTime!=null and beginTime!=''">
+ and alarmTime>=#{beginTime}
+ </if>
+ <if test="endTime!=null and endTime!=''">
+ and alarmTime<=#{endTime}
+ </if>
+
+ AND alarmbs = 0
+ AND waringType IN ( "紧急求救" ) UNION ALL
+ SELECT
+ COUNT( * ) AS
+ value
+ ,
+ "误报警情" AS name
+ FROM
+ sys_alarm
+ WHERE
+ 1 = 1
+
+ <if test="beginTime!=null and beginTime!=''">
+ and alarmTime>=#{beginTime}
+ </if>
+ <if test="endTime!=null and endTime!=''">
+ and alarmTime<=#{endTime}
+ </if>
+
+ AND alarmbs = 1
+ AND waringType IN ( "紧急求救" )
+ UNION ALL
+ SELECT
+ COUNT( * ) AS
+ value
+ ,
+ "严重警情" AS name
+ FROM
+ sys_alarm
+ WHERE
+ 1 = 1
+
+ <if test="beginTime!=null and beginTime!=''">
+ and alarmTime>=#{beginTime}
+ </if>
+ <if test="endTime!=null and endTime!=''">
+ and alarmTime<=#{endTime}
+ </if>
+
+ AND alarmbs = 2
+ AND waringType IN ( "紧急求救" )
+ </select>
+
<select id="listAll" resultMap="alarmResultMap">
select a.id,a.alarmType,a.alarmPeople,a.alarmTime,a.galarmPeople,a.sex,a.phoneNumber,a.place,a.content,a.waringType,
a.deviceNumber,a.region,e.district, a.alarmId,a.LEVEL,e.jd,e.wd,a.jtype,a.rname,a.jjTime,e.province,e.city,a.cid,a.vaddress
@@ -624,7 +815,8 @@
WHERE
<if test="alarm.securityArr!=null and alarm.securityArr!=''">
- securityId = "" or securityId IS NULL
+ (securityId = "" or securityId IS NULL)
+ AND jtype != 2
AND securityArr LIKE concat('%',#{alarm.securityArr},'%')
</if>
--
Gitblit v1.9.3