| | |
| | | <result column="name" property="name"/> |
| | | <result column="cid" property="cid"/> |
| | | <result column="vaddress" property="vaddress"/> |
| | | <result column="aaddress" property="aaddress"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="selectAlarmPage" resultMap="alarmResultMap"> |
| | | 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.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,a.cid, |
| | | e.serialNumber,e.oneContacts,e.ThreeContacts,e.twoContacts,e.onePhone,e.twoPhone,e.ThreePhone, |
| | | e.stype, |
| | |
| | | |
| | | |
| | | <select id="selectListSe" resultMap="alarmResultMap"> |
| | | |
| | | SELECT |
| | | a.id, |
| | | a.alarmType, |
| | |
| | | ) b |
| | | on |
| | | a.click_date = b.datetime |
| | | 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">--> |
| | |
| | | <update id="updateVaddress"> |
| | | update sys_alarm SET vaddress=#{vaddress} where id=#{jid} |
| | | </update> |
| | | |
| | | |
| | | <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> |
| | | |
| | | <!--查询当前时间段内一键求助报警的数据集合--> |
| | | <select id="selectAlarmList" resultType="org.springblade.jfpt.alarm.entity.Alarm"> |
| | | SELECT waringType,alarmTime,alarmId,alarmPeople,jtype,czTime FROM `sys_alarm` |
| | | where waringType='紧急求救' |
| | | and alarmTime between #{conditionVo.startTime} and #{conditionVo.endTime} |
| | | </select> |
| | | </mapper> |