| | |
| | | |
| | | |
| | | <update id="updateJtype"> |
| | | update sys_alarm SET jtype=#{jtype},bz=#{bz},securityArr =#{securityArr} where id=#{id} |
| | | update sys_alarm SET jtype=#{jtype},bz=#{bz} |
| | | |
| | | <if test="securityArr!=null and id!=''"> |
| | | ,securityArr =#{securityArr} |
| | | </if> |
| | | |
| | | where id=#{id} |
| | | </update> |
| | | |
| | | <update id="updatePoliceStatus"> |
| | |
| | | AND role_id = "1370562810882502657" |
| | | </select> |
| | | |
| | | <select id="getAlarm" resultType="java.util.HashMap"> |
| | | SELECT |
| | | a.id, |
| | | a.alarmType, |
| | | a.alarmPeople, |
| | | a.alarmTime, |
| | | a.galarmPeople, |
| | | a.sex, |
| | | a.phoneNumber, |
| | | 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, |
| | | a.cid, |
| | | e.serialNumber, |
| | | e.oneContacts, |
| | | e.ThreeContacts, |
| | | e.twoContacts, |
| | | e.onePhone, |
| | | e.twoPhone, |
| | | e.ThreePhone, |
| | | e.stype, |
| | | e.oneId, |
| | | e.twoId, |
| | | e.threeId, |
| | | e.deptId, |
| | | e.street AS place, |
| | | e.channelNumber |
| | | FROM |
| | | sys_alarm a |
| | | LEFT JOIN sys_equipment e ON e.deviceNumber = a.deviceNumber |
| | | WHERE |
| | | securityId IS NULL |
| | | AND securityArr LIKE concat('%',#{alarm.securityArr},'%') |
| | | |
| | | </select> |
| | | |
| | | <select id="getAlarming" resultType="java.util.HashMap"> |
| | | SELECT |
| | | a.id, |
| | | a.alarmType, |
| | | a.alarmPeople, |
| | | a.alarmTime, |
| | | a.galarmPeople, |
| | | a.sex, |
| | | a.phoneNumber, |
| | | 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, |
| | | a.cid, |
| | | e.serialNumber, |
| | | e.oneContacts, |
| | | e.ThreeContacts, |
| | | e.twoContacts, |
| | | e.onePhone, |
| | | e.twoPhone, |
| | | e.ThreePhone, |
| | | e.stype, |
| | | e.oneId, |
| | | e.twoId, |
| | | e.threeId, |
| | | e.deptId, |
| | | e.street AS place, |
| | | e.channelNumber |
| | | FROM |
| | | sys_alarm a |
| | | LEFT JOIN sys_equipment e ON e.deviceNumber = a.deviceNumber |
| | | WHERE |
| | | securityId =#{alarm.securityId} |
| | | |
| | | </select> |
| | | |
| | | <update id="setAlarm"> |
| | | update sys_alarm SET securityId=#{alarm.securityId} where id=#{alarm.id} |
| | | </update> |
| | | |
| | | <update id="updateVaddress"> |
| | | update sys_alarm SET vaddress=#{vaddress},uids=#{uids} where id=#{jid} |
| | | </update> |
| | |
| | | from sys_alarm a |
| | | LEFT JOIN sys_equipment e on e.deviceNumber=a.deviceNumber |
| | | where 1=1 |
| | | <include refid="alarmCondition"></include> |
| | | <include refid="alarmCondition"></include> |
| | | and a.waringType IN("紧急求救") |
| | | ORDER BY |
| | | a.jtype ASC, |
| | |
| | | <!--获取实时警情图表统计数据--> |
| | | <select id="getAlarmPie" resultType="org.springblade.common.entity.ReportReturnData"> |
| | | select if(1=1,"紧急求救",0) type,ifnull(count(*),0) count from sys_alarm |
| | | where waringType="紧急求救" |
| | | where waringType="紧急求救" |
| | | <include refid="alarmConditionPie"></include> |
| | | </select> |
| | | |