|  | @ -299,8 +299,11 @@ | 
			
		
	
		
		
			
				
					|  |  |                     </otherwise> |  |  |                     </otherwise> | 
			
		
	
		
		
			
				
					|  |  |                 </choose> |  |  |                 </choose> | 
			
		
	
		
		
			
				
					|  |  |             </if> |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |             <if test="status!= null and status != ''"> |  |  |             <if test="status!= null and status == 'pending'"> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |                 AND sdd1.EVENT_STATUS_CODE = #{status} |  |  |                 AND sdd1.EVENT_STATUS_CODE  in('pending','0') | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             <if test="status!= null and status == 'closed'"> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                 AND sdd1.EVENT_STATUS_CODE  in('closed','10','5') | 
			
		
	
		
		
			
				
					|  |  |             </if> |  |  |             </if> | 
			
		
	
		
		
			
				
					|  |  |             union |  |  |             union | 
			
		
	
		
		
			
				
					|  |  |             select sca.AREA_CODE,sdd2.* from screen_difficulty_data sdd2 |  |  |             select sca.AREA_CODE,sdd2.* from screen_difficulty_data sdd2 | 
			
		
	
	
		
		
			
				
					|  | @ -322,8 +325,11 @@ | 
			
		
	
		
		
			
				
					|  |  |                     </otherwise> |  |  |                     </otherwise> | 
			
		
	
		
		
			
				
					|  |  |                 </choose> |  |  |                 </choose> | 
			
		
	
		
		
			
				
					|  |  |             </if> |  |  |             </if> | 
			
		
	
		
		
			
				
					
					|  |  |             <if test="status!= null and status != ''"> |  |  |             <if test="status!= null and status == 'pending'"> | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  |                 AND sdd2.EVENT_STATUS_CODE = #{status} |  |  |                 AND sdd2.EVENT_STATUS_CODE  in('pending','0') | 
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					|  |  |  |  |  |             </if> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |             <if test="status!= null and status == 'closed'"> | 
			
		
	
		
		
			
				
					|  |  |  |  |  |                 AND sdd2.EVENT_STATUS_CODE  in('closed','10','5') | 
			
		
	
		
		
			
				
					|  |  |             </if> |  |  |             </if> | 
			
		
	
		
		
			
				
					|  |  |         ) diff |  |  |         ) diff | 
			
		
	
		
		
			
				
					|  |  |         ORDER BY |  |  |         ORDER BY | 
			
		
	
	
		
		
			
				
					|  | 
 |