| | |
| | | order by a.click_date asc |
| | | </select> |
| | | |
| | | <!--查询警情当前时间段内每天的数据--> |
| | | <!-- <select id="selectTimeAlarmData" resultType="java.lang.Integer">--> |
| | | <!-- select a.days, ifnull(count,0) count from--> |
| | | <!-- (--> |
| | | <!-- SELECT @date := DATE_ADD( @date, INTERVAL + 1 DAY ) days FROM--> |
| | | <!-- (--> |
| | | <!-- SELECT @date := DATE_ADD( #{conditionVo.startTime}, INTERVAL - 1 DAY ) FROM sys_date--> |
| | | <!-- ) time--> |
| | | <!-- WHERE to_days( @date ) < to_days( #{conditionVo.endTime} )--> |
| | | <!-- ) a--> |
| | | <!-- left join--> |
| | | <!-- (--> |
| | | <!-- select DATE_FORMAT(alarmTime,'%Y-%m-%d') as datetime, count(*) as count from sys_alarm--> |
| | | <!-- where waringType = '紧急求救'--> |
| | | <!-- group by DATE_FORMAT(alarmTime,'%Y-%m-%d')--> |
| | | <!-- ) b--> |
| | | <!-- on--> |
| | | <!-- a.days = b.datetime--> |
| | | <!-- </select>--> |
| | | |
| | | <!-- <!–查询本日,本周,本月 主动报警的数量–>--> |
| | | <!-- <select id="selectAlarmSum" resultType="java.util.HashMap">--> |
| | |
| | | <select id="selectEq" resultType="java.util.HashMap"> |
| | | SELECT COUNT(deviceNumber) as cou,deviceNumber FROM `sys_alarm` WHERE alarmTime like concat(concat('%', #{time}), '%') and waringType NOT IN("系统测试","主机重新上电") group by deviceNumber |
| | | </select> |
| | | |
| | | <select id="selAlarmTimeCount" resultType="java.lang.Integer"> |
| | | select count(*) from sys_alarm |
| | | where waringType = '紧急求救' |
| | | <if test="conditionVo.startTime!=null and conditionVo.startTime!='' and conditionVo.endTime!=null and conditionVo.endTime!=''"> |
| | | and alarmTime between #{conditionVo.startTime} and #{conditionVo.endTime} |
| | | </if> |
| | | </select> |
| | | </mapper> |