| 
						
						
							
								
							
						
						
					 | 
					@ -36,25 +36,29 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        and ro.ORG_ID = #{orgId} | 
					 | 
					 | 
					        and ro.ORG_ID = #{orgId} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        <if test='eventType == "undisposed" '> | 
					 | 
					 | 
					        <if test='eventType == "undisposed" '> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            AND ro.ORG_READ = 'un_read' | 
					 | 
					 | 
					            AND ro.ORG_READ = 'un_read' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            ORDER BY re.CREATED_TIME | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        </if> | 
					 | 
					 | 
					        </if> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        <if test='eventType == "processed" '> | 
					 | 
					 | 
					        <if test='eventType == "processed" '> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            AND ro.ORG_READ = 'read' | 
					 | 
					 | 
					            AND ro.ORG_READ = 'read' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            AND re.`STATUS` = 'processing' | 
					 | 
					 | 
					            AND re.`STATUS` = 'processing' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            ORDER BY re.LATEST_OPERATED_TIME DESC | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        </if> | 
					 | 
					 | 
					        </if> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        <if test='eventType == "transferred" '> | 
					 | 
					 | 
					        <if test='eventType == "transferred" '> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            AND ro.ORG_READ = 'read' | 
					 | 
					 | 
					            AND ro.ORG_READ = 'read' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            AND re.`STATUS` = 'closed_case' | 
					 | 
					 | 
					            AND re.`STATUS` = 'closed_case' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            ORDER BY re.CLOSE_CASE_TIME DESC | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        </if> | 
					 | 
					 | 
					        </if> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        )t | 
					 | 
					 | 
					        )t | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        LEFT JOIN resi_event_attachment rea | 
					 | 
					 | 
					        LEFT JOIN resi_event_attachment rea | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        ON (rea.RESI_EVENT_ID = t.eventId | 
					 | 
					 | 
					        ON (rea.RESI_EVENT_ID = t.eventId) | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                AND rea.DEL_FLAG = '0' | 
					 | 
					 | 
					        where  rea.DEL_FLAG = '0' | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                AND rea.ATTACHMENT_TYPE = 'image' | 
					 | 
					 | 
					        AND rea.ATTACHMENT_TYPE = 'image' | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                AND (rea.SORT = 3 OR rea.SORT = 1 OR rea.SORT = 2)) | 
					 | 
					 | 
					        <if test='eventType == "undisposed" '> | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        order by rea.sort asc | 
					 | 
					 | 
					            ORDER BY t.eventTime,rea.sort asc | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        </if> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        <if test='eventType == "processed" '> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            ORDER BY t.eventTime DESC,rea.sort asc | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        </if> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        <if test='eventType == "transferred" '> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            ORDER BY t.eventTime DESC,rea.sort asc | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        </if> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    </select> | 
					 | 
					 | 
					    </select> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |