| | |
| | | <sql id="getAlarmListSqlParam"> |
| | | 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,e.district,a.vaddress,a.aaddress, |
| | | a.alarmId,a.LEVEL,e.jd,e.wd,a.jtype,a.rname,a.jjTime,e.province,e.city,a.cid, |
| | | a.alarmId,a.LEVEL,a.jd,a.wd,a.jtype,a.rname,a.jjTime,e.province,e.city,a.cid, |
| | | a.securityArr,a.securityId, |
| | | e.serialNumber,e.oneContacts,e.ThreeContacts,e.twoContacts,e.onePhone,e.twoPhone,e.ThreePhone, |
| | | e.stype, |
| | |
| | | or securityId = "" or securityId IS NULL |
| | | and securityArr LIKE concat('%',#{alarm.securityId},'%')) |
| | | |
| | | union |
| | | UNION ALL |
| | | (select ifnull(count(*),0) number from sys_alarm |
| | | where securityId = "" or securityId IS NULL |
| | | and securityArr LIKE concat('%',#{alarm.securityId},'%')) |
| | | |
| | | union |
| | | UNION ALL |
| | | (select ifnull(count(*),0) number from sys_alarm |
| | | where securityId =#{alarm.securityId} and jtype = 2) |
| | | |
| | | union |
| | | UNION ALL |
| | | (select ifnull(count(*),0) number from sys_alarm |
| | | where securityId =#{alarm.securityId} and jtype = 1) |
| | | </select> |