| 
					
				 | 
			
			
				@@ -488,7 +488,7 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         <include refid="deviceInnerJoins"/> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         left join( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             select a1.scene_id, a1.device_id from sms_alarm_details a1 where a1.`status` = 1 and a1.state = 1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-            <if test="sceneTypeName != null and sceneTypeName !=''"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            <if test="(sceneTypeName != null and sceneTypeName !='') or flag == 1"> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 and a1.alarm_type = '参数报警' 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             </if> 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             group by a1.scene_id, a1.device_id 
			 |