| | |
| | | SELECT |
| | | * |
| | | FROM |
| | | sys_alarm |
| | | sys_alarm |
| | | WHERE |
| | | 1 = 1 |
| | | <if test="alarm.district!=null"> |
| | | and district like concat('%',#{alarm.district},'%') |
| | | </if> |
| | | <if test="alarm.province!=null"> |
| | | and province like concat('%',#{alarm.province},'%') |
| | | </if> |
| | | <if test="alarm.city!=null"> |
| | | and city like concat('%',#{alarm.city},'%') |
| | | </if> |
| | | <if test="alarm.alarmPeople!=null"> |
| | | and alarmPeople like concat('%',#{alarm.alarmPeople},'%') |
| | | </if> |
| | | <if test="alarm.jtype!=null"> |
| | | and jtype = #{alarm.jtype} |
| | | </if> |
| | | AND waringType IN ( "安装任务" ) |
| | | 1 = 1 |
| | | <if test="alarm.district!=null"> |
| | | and district like concat('%',#{alarm.district},'%') |
| | | </if> |
| | | <if test="alarm.province!=null"> |
| | | and province like concat('%',#{alarm.province},'%') |
| | | </if> |
| | | <if test="alarm.city!=null"> |
| | | and city like concat('%',#{alarm.city},'%') |
| | | </if> |
| | | <if test="alarm.alarmPeople!=null"> |
| | | and alarmPeople like concat('%',#{alarm.alarmPeople},'%') |
| | | </if> |
| | | <if test="alarm.jtype!=null"> |
| | | and jtype = #{alarm.jtype} |
| | | </if> |
| | | <if test="alarm.rname!=null"> |
| | | and rname like concat('%',#{alarm.rname},'%') |
| | | </if> |
| | | <if test="alarm.deviceNumber!=null"> |
| | | and deviceNumber like concat('%',#{alarm.deviceNumber},'%') |
| | | </if> |
| | | AND waringType IN ( "安装任务" ) |
| | | ORDER BY |
| | | jtype ASC, |
| | | alarmTime DESC |
| | | jtype ASC, |
| | | alarmTime DESC |
| | | </select> |
| | | |
| | | <select id="getChartData" resultType="java.util.Map"> |
| | | SELECT |
| | | COUNT( * ) AS value, |
| | | "未安装" as name |
| | | COUNT( * ) AS value, |
| | | "未安装" as name |
| | | FROM |
| | | sys_alarm |
| | | sys_alarm |
| | | WHERE |
| | | 1 = 1 |
| | | 1 = 1 |
| | | |
| | | <if test="beginTime!=null and beginTime!=''"> |
| | | and alarmTime>=#{beginTime} |
| | |
| | | and alarmTime<=#{endTime} |
| | | </if> |
| | | |
| | | AND jtype = 0 |
| | | AND waringType IN ( "安装任务" ) UNION ALL |
| | | AND jtype = 0 |
| | | AND waringType IN ( "安装任务" ) UNION ALL |
| | | SELECT |
| | | COUNT( * ) AS value, |
| | | "已安装" as name |
| | | COUNT( * ) AS value, |
| | | "已安装" as name |
| | | FROM |
| | | sys_alarm |
| | | sys_alarm |
| | | WHERE |
| | | 1 = 1 |
| | | 1 = 1 |
| | | |
| | | <if test="beginTime!=null and beginTime!=''"> |
| | | and alarmTime>=#{beginTime} |
| | |
| | | and alarmTime<=#{endTime} |
| | | </if> |
| | | |
| | | AND jtype = 2 |
| | | AND waringType IN ( "安装任务" ) |
| | | AND jtype = 2 |
| | | AND waringType IN ( "安装任务" ) |
| | | </select> |
| | | <select id="getChartDataAlarm" resultType="java.util.Map"> |
| | | SELECT |
| | | COUNT( * ) AS |
| | | COUNT( * ) AS |
| | | value |
| | | , |
| | | "未处理" AS name |
| | | , |
| | | "未处理" AS name |
| | | FROM |
| | | sys_alarm |
| | | sys_alarm |
| | | WHERE |
| | | 1 = 1 |
| | | 1 = 1 |
| | | |
| | | <if test="beginTime!=null and beginTime!=''"> |
| | | and alarmTime>=#{beginTime} |
| | |
| | | and alarmTime<=#{endTime} |
| | | </if> |
| | | |
| | | AND jtype = 0 |
| | | AND waringType IN ( "紧急求救" ) UNION ALL |
| | | AND jtype = 0 |
| | | AND waringType IN ( "紧急求救" ) UNION ALL |
| | | SELECT |
| | | COUNT( * ) AS |
| | | COUNT( * ) AS |
| | | value |
| | | , |
| | | "处理中" AS name |
| | | , |
| | | "处理中" AS name |
| | | FROM |
| | | sys_alarm |
| | | sys_alarm |
| | | WHERE |
| | | 1 = 1 |
| | | 1 = 1 |
| | | |
| | | <if test="beginTime!=null and beginTime!=''"> |
| | | and alarmTime>=#{beginTime} |
| | |
| | | and alarmTime<=#{endTime} |
| | | </if> |
| | | |
| | | AND jtype = 1 |
| | | AND waringType IN ( "紧急求救" ) |
| | | UNION ALL |
| | | AND jtype = 1 |
| | | AND waringType IN ( "紧急求救" ) |
| | | UNION ALL |
| | | SELECT |
| | | COUNT( * ) AS |
| | | COUNT( * ) AS |
| | | value |
| | | , |
| | | "已处理" AS name |
| | | , |
| | | "已处理" AS name |
| | | FROM |
| | | sys_alarm |
| | | sys_alarm |
| | | WHERE |
| | | 1 = 1 |
| | | 1 = 1 |
| | | |
| | | <if test="beginTime!=null and beginTime!=''"> |
| | | and alarmTime>=#{beginTime} |
| | |
| | | and alarmTime<=#{endTime} |
| | | </if> |
| | | |
| | | AND jtype = 2 |
| | | AND waringType IN ( "紧急求救" ) |
| | | AND jtype = 2 |
| | | AND waringType IN ( "紧急求救" ) |
| | | </select> |
| | | <select id="getChartDataAlarmBs" resultType="java.util.Map"> |
| | | SELECT |
| | | COUNT( * ) AS |
| | | COUNT( * ) AS |
| | | value |
| | | , |
| | | "一般警情" AS name |
| | | , |
| | | "一般警情" AS name |
| | | FROM |
| | | sys_alarm |
| | | sys_alarm |
| | | WHERE |
| | | 1 = 1 |
| | | 1 = 1 |
| | | |
| | | <if test="beginTime!=null and beginTime!=''"> |
| | | and alarmTime>=#{beginTime} |
| | |
| | | and alarmTime<=#{endTime} |
| | | </if> |
| | | |
| | | AND alarmbs = 0 |
| | | AND waringType IN ( "紧急求救" ) UNION ALL |
| | | AND alarmbs = 0 |
| | | AND waringType IN ( "紧急求救" ) UNION ALL |
| | | SELECT |
| | | COUNT( * ) AS |
| | | COUNT( * ) AS |
| | | value |
| | | , |
| | | "误报警情" AS name |
| | | , |
| | | "误报警情" AS name |
| | | FROM |
| | | sys_alarm |
| | | sys_alarm |
| | | WHERE |
| | | 1 = 1 |
| | | 1 = 1 |
| | | |
| | | <if test="beginTime!=null and beginTime!=''"> |
| | | and alarmTime>=#{beginTime} |
| | |
| | | and alarmTime<=#{endTime} |
| | | </if> |
| | | |
| | | AND alarmbs = 1 |
| | | AND waringType IN ( "紧急求救" ) |
| | | UNION ALL |
| | | AND alarmbs = 1 |
| | | AND waringType IN ( "紧急求救" ) |
| | | UNION ALL |
| | | SELECT |
| | | COUNT( * ) AS |
| | | COUNT( * ) AS |
| | | value |
| | | , |
| | | "严重警情" AS name |
| | | , |
| | | "严重警情" AS name |
| | | FROM |
| | | sys_alarm |
| | | sys_alarm |
| | | WHERE |
| | | 1 = 1 |
| | | 1 = 1 |
| | | |
| | | <if test="beginTime!=null and beginTime!=''"> |
| | | and alarmTime>=#{beginTime} |
| | |
| | | and alarmTime<=#{endTime} |
| | | </if> |
| | | |
| | | AND alarmbs = 2 |
| | | AND waringType IN ( "紧急求救" ) |
| | | AND alarmbs = 2 |
| | | AND waringType IN ( "紧急求救" ) |
| | | </select> |
| | | |
| | | <select id="listAll" resultMap="alarmResultMap"> |