| 
					
				 | 
			
			
				@@ -22,7 +22,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result column="is_lock" property="isLock"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </resultMap> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    <select id="list" resultMap="AlarmStatisticVoResult"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <select id="list" parameterType="com.ozs.service.entity.vo.AlarmStatisticResVo" resultMap="AlarmStatisticVoResult"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         SELECT 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         a.alarm_id , 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         a.camera_code , 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -42,9 +42,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         a.remark, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         a.is_lock 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         FROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        msg_alarm AS a left join 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        msg_alarm AS a inner join 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         base_camera_management AS b on a.camera_code=b.camera_code left join 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        msg_web_push m on a.alarm_id = m.alarm_id left join 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         base_railway_management c on b.railway_code=c.railway_code 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <where> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -63,8 +62,22 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="alarmType != null and alarmType != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 and UPPER(a.alarm_type) like UPPER(CONCAT('%',#{alarmType},'%')) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="userId != null and userId != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                and UPPER(m.receive_by) like UPPER(CONCAT('%',#{userId},'%')) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="!dsFlay"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                and 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <trim prefix="(" prefixOverrides="or" suffix=")"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <if test="dsUserId != null and dsUserId != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        or a.create_by=#{dsUserId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <if test="dsDeptId != null and dsDeptId != 0"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        or b.dept_id=#{dsDeptId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <if test="dsDeptIds != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        or b.dept_id in 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        <foreach item="item" collection="dsDeptIds" separator="," open="(" close=")" index=""> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            #{item} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        </foreach> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         group by a.alarm_id order by a.alarm_time desc 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -90,7 +103,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result column="remark" property="remark"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result column="isLock" property="isLock"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </resultMap> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    <select id="listDto" resultMap="AlarmStatisticDtoResult"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <select id="listDto" parameterType="com.ozs.service.entity.vo.AlarmStatisticResVo" resultMap="AlarmStatisticDtoResult"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         SELECT 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         a.alarm_id AS alarmId, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         a.camera_code AS cameraCode, 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -110,9 +123,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         a.remark AS remark, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         a.is_lock AS isLock 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         FROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        msg_alarm AS a left join 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        msg_alarm AS a inner join 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         base_camera_management AS b on a.camera_code=b.camera_code left join 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        msg_web_push m on a.alarm_id = m.alarm_id left join 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         base_railway_management c on b.railway_code=c.railway_code 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <where> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -131,8 +143,22 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="alarmType != null and alarmType != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 and UPPER(a.alarm_type) like UPPER(CONCAT('%',#{alarmType},'%')) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="userId != null and userId != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                and UPPER(m.receive_by) like UPPER(CONCAT('%',#{userId},'%')) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="!dsFlay"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                and 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <trim prefix="(" prefixOverrides="or" suffix=")"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <if test="dsUserId != null and dsUserId != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        or a.create_by=#{dsUserId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <if test="dsDeptId != null and dsDeptId != 0"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        or b.dept_id=#{dsDeptId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <if test="dsDeptIds != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        or b.dept_id in 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        <foreach item="item" collection="dsDeptIds" separator="," open="(" close=")" index=""> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            #{item} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        </foreach> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         group by a.alarm_id order by a.alarm_time desc 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -144,7 +170,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result column="frequency" property="frequency"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <result column="alarm_type" property="alarmType"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </resultMap> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    <select id="listDtoMonth" resultMap="AlarmStatisticMonthDtoResult"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <select id="listDtoMonth" parameterType="com.ozs.service.entity.vo.AlarmStatisticResVo" resultMap="AlarmStatisticMonthDtoResult"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         SELECT p.monthsta as monthsta,sum(p.fre) as frequency,p.monthstaString as monthstaString 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         from 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         (SELECT 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -152,9 +178,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         MONTH(a.alarm_time) as monthsta, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         count(DISTINCT a.alarm_id) as fre 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         FROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        msg_alarm AS a left join 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        msg_alarm AS a inner join 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         base_camera_management AS b on a.camera_code=b.camera_code left join 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        msg_web_push m on a.alarm_id = m.alarm_id left join 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         base_railway_management c on b.railway_code=c.railway_code 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <where> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -173,14 +198,28 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="alarmType != null and alarmType != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 and UPPER(a.alarm_type) like UPPER(CONCAT('%',#{alarmType},'%')) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="userId != null and userId != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                and UPPER(m.receive_by) like UPPER(CONCAT('%',#{userId},'%')) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="!dsFlay"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                and 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <trim prefix="(" prefixOverrides="or" suffix=")"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <if test="dsUserId != null and dsUserId != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        or a.create_by=#{dsUserId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <if test="dsDeptId != null and dsDeptId != 0"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        or b.dept_id=#{dsDeptId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <if test="dsDeptIds != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        or b.dept_id in 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        <foreach item="item" collection="dsDeptIds" separator="," open="(" close=")" index=""> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            #{item} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        </foreach> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         group by a.alarm_id) AS p group by p.monthsta order by p.monthsta 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     </select> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-    <select id="listDtoDay" resultMap="AlarmStatisticMonthDtoResult"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    <select id="listDtoDay" parameterType="com.ozs.service.entity.vo.AlarmStatisticResVo" resultMap="AlarmStatisticMonthDtoResult"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         SELECT p.daysta as monthsta,sum(p.fre) as frequency,p.daystaString as monthstaString 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         from 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         (SELECT 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -188,9 +227,8 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         DAY(a.alarm_time) as daysta, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         count(DISTINCT a.alarm_id) as fre 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         FROM 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        msg_alarm AS a left join 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        msg_alarm AS a inner join 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         base_camera_management AS b on a.camera_code=b.camera_code left join 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-        msg_web_push m on a.alarm_id = m.alarm_id left join 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         base_railway_management c on b.railway_code=c.railway_code 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <where> 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -209,8 +247,22 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             <if test="alarmType != null and alarmType != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 and UPPER(a.alarm_type) like UPPER(CONCAT('%',#{alarmType},'%')) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="userId != null and userId != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                and UPPER(m.receive_by) like UPPER(CONCAT('%',#{userId},'%')) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="!dsFlay"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                and 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                <trim prefix="(" prefixOverrides="or" suffix=")"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <if test="dsUserId != null and dsUserId != ''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        or a.create_by=#{dsUserId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <if test="dsDeptId != null and dsDeptId != 0"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        or b.dept_id=#{dsDeptId} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    <if test="dsDeptIds != null"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        or b.dept_id in 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        <foreach item="item" collection="dsDeptIds" separator="," open="(" close=")" index=""> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            #{item} 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        </foreach> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                </trim> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         </where> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         group by a.alarm_id) AS p group by p.daysta order by p.daysta 
			 |