|
@@ -69,6 +69,52 @@
|
|
|
) c on b.camera_code = c.camera_code
|
|
|
</select>
|
|
|
|
|
|
+ <select id="messageMoreCount" parameterType="com.ozs.service.entity.vo.MsgAlarmVo" resultType="java.lang.Integer">
|
|
|
+ select count(b.*) from (
|
|
|
+ select alarm_id from msg_web_push
|
|
|
+ <where>
|
|
|
+ <if test="status != null and status != ''">
|
|
|
+ and status = #{status}
|
|
|
+ </if>
|
|
|
+ <if test="userIds != null and userIds != ''">
|
|
|
+ and receive_by in
|
|
|
+ <foreach item="item" collection="userIds" index="index" separator="," open="(" close=")">
|
|
|
+ #{item}
|
|
|
+ </foreach>
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ ) a left join (
|
|
|
+ select * from msg_alarm
|
|
|
+ <where>
|
|
|
+ <if test="alarmType != null and alarmType != ''">
|
|
|
+ and alarm_type = #{alarmType}
|
|
|
+ </if>
|
|
|
+ <if test="beginAlarmTime != null and beginAlarmTime != ''">
|
|
|
+ and alarm_time >= #{beginAlarmTime}
|
|
|
+ </if>
|
|
|
+ <if test="endAlarmTime != null and endAlarmTime != ''">
|
|
|
+ and alarm_time <= #{endAlarmTime}
|
|
|
+ </if>
|
|
|
+ <if test="isLock != null and isLock != ''">
|
|
|
+ and is_lock = #{isLock}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ ) b on a.alarm_id = b.alarm_id left join (
|
|
|
+ select * from base_camera_management
|
|
|
+ <where>
|
|
|
+ <if test="railwayCode != null and railwayCode != ''">
|
|
|
+ and railway_code = #{railwayCode}
|
|
|
+ </if>
|
|
|
+ <if test="beginMile != null and beginMile != ''">
|
|
|
+ and begin_mile >= #{beginMile}
|
|
|
+ </if>
|
|
|
+ <if test="endMile != null and endMile != ''">
|
|
|
+ and end_mile <= #{endMile}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ ) c on b.camera_code = c.camera_code
|
|
|
+ </select>
|
|
|
+
|
|
|
<select id="messageMoreNum" parameterType="com.ozs.service.entity.vo.MsgAlarmVo" resultType="java.util.Map">
|
|
|
select count(id) count, SUM(CASE status WHEN '1' THEN 1 ELSE 0 end) AS 'noCount' from msg_web_push
|
|
|
<where>
|