| | |
| | | |
| | | |
| | | <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.deviceNumber,a.region,a.district, a.alarmId,a.LEVEL,e.jd,e.wd,a.jtype,a.rname,a.jjTime,a.province,a.city,a.cid, |
| | | 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,a.district, |
| | | a.alarmId,a.LEVEL,e.jd,e.wd,a.jtype,a.rname,a.jjTime,a.province,a.city,a.cid, |
| | | e.serialNumber, |
| | | e.stype, |
| | | e.channelNumber from sys_alarm a |
| | | LEFT JOIN sys_equipment e on e.deviceNumber=a.deviceNumber |
| | | where 1=1 |
| | | where 1=1 |
| | | <if test="alarm.jtype!=null"> |
| | | and a.jtype like concat('%',#{alarm.jtype},'%') |
| | | </if> |
| | |
| | | e.stype, |
| | | e.channelNumber |
| | | FROM |
| | | sys_alarm a LEFT JOIN sys_equipment e on e.deviceNumber=a.deviceNumber LEFT JOIN jfpth.blade_region on jfpth.blade_region.`code`=a.district where 1=1 |
| | | sys_alarm a LEFT JOIN sys_equipment e on e.deviceNumber=a.deviceNumber LEFT JOIN jfpth.blade_region on |
| | | jfpth.blade_region.`code`=a.district where 1=1 |
| | | <if test="jtype!=null and jtype!=''"> |
| | | and a.jtype=#{jtype} |
| | | </if> |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <!--实时提醒--> |
| | | <!--实时提醒--> |
| | | <select id="selecttx" resultMap="alarmResultMap"> |
| | | SELECT |
| | | a.id, |
| | |
| | | e.stype, |
| | | e.channelNumber |
| | | FROM |
| | | sys_alarm a LEFT JOIN sys_district d on d.addvcds=a.district LEFT JOIN sys_equipment e on e.deviceNumber=a.deviceNumber where 1=1 |
| | | sys_alarm a LEFT JOIN sys_district d on d.addvcds=a.district LEFT JOIN sys_equipment e on |
| | | e.deviceNumber=a.deviceNumber where 1=1 |
| | | <if test="id!=null and id!=''"> |
| | | and a.id >#{id} |
| | | </if> |
| | |
| | | |
| | | <!--查询本日,本周,本月 主动报警的数量--> |
| | | <select id="selectAlarmSum" resultType="java.util.HashMap"> |
| | | select sa.alarmType name,IFNULL(sb.count, 0) value from (select alarmType from sys_alarm GROUP BY alarmType) sa |
| | | select sa.alarmType name,IFNULL(sb.count, 0) value from (select alarmType from sys_alarm GROUP BY alarmType) sa |
| | | left join |
| | | ( select alarmType,count(*) count from sys_alarm |
| | | where 1=1 |
| | | <if test="conditionVo.status==0"> |
| | | and to_days(alarmTime) = to_days(now()) |
| | | </if> |
| | | <if test="conditionVo.status==1"> |
| | | and YEARWEEK(date_format(alarmTime,'%Y-%m-%d'),1) = YEARWEEK(now(),1) |
| | | </if> |
| | | <if test="conditionVo.status==2"> |
| | | and date_format(alarmTime,'%Y%m') = date_format(now(),'%Y%m') |
| | | </if> |
| | | group by alarmType |
| | | where 1=1 |
| | | <if test="conditionVo.status==0"> |
| | | and to_days(alarmTime) = to_days(now()) |
| | | </if> |
| | | <if test="conditionVo.status==1"> |
| | | and YEARWEEK(date_format(alarmTime,'%Y-%m-%d'),1) = YEARWEEK(now(),1) |
| | | </if> |
| | | <if test="conditionVo.status==2"> |
| | | and date_format(alarmTime,'%Y%m') = date_format(now(),'%Y%m') |
| | | </if> |
| | | group by alarmType |
| | | ) sb |
| | | on |
| | | sa.alarmType = sb.alarmType |
| | | </select> |
| | | |
| | | <select id="queryPolice" resultType="java.util.HashMap"> |
| | | SELECT * FROM jfpth.blade_user WHERE is_deleted != '1' and role_id ="1370562810882502657"</select> |
| | | </mapper> |