|  |  | @ -130,7 +130,10 @@ | 
			
		
	
		
			
				
					|  |  |  |         LEFT JOIN ic_building_unit d on a.BUILDING_UNIT_ID = d.ID and d.DEL_FLAG = '0' | 
			
		
	
		
			
				
					|  |  |  |         <where> | 
			
		
	
		
			
				
					|  |  |  |             <if test="pids != null and pids != ''"> | 
			
		
	
		
			
				
					|  |  |  |                 AND CONCAT(c.AGENCY_PIDS,':',c.AGENCY_ID) like CONCAT(#{pids},'%') | 
			
		
	
		
			
				
					|  |  |  |                 case c.AGENCY_PIDS | 
			
		
	
		
			
				
					|  |  |  |                     when '' then CONCAT(c.AGENCY_ID) like CONCAT(#{pids}, '%') | 
			
		
	
		
			
				
					|  |  |  |                     else CONCAT(c.AGENCY_PIDS, ':', c.AGENCY_ID) like CONCAT(#{pids}, '%') | 
			
		
	
		
			
				
					|  |  |  |                 end | 
			
		
	
		
			
				
					|  |  |  |             </if> | 
			
		
	
		
			
				
					|  |  |  |             <if test="buildingId != null and buildingId.trim() != ''"> | 
			
		
	
		
			
				
					|  |  |  |                 AND a.BUILDING_ID = #{buildingId} | 
			
		
	
	
		
			
				
					|  |  | 
 |