| 
						
						
							
								
							
						
						
					 | 
					@ -314,6 +314,7 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        INNER JOIN customer_agency ca ON cg.pid = ca.id | 
					 | 
					 | 
					        INNER JOIN customer_agency ca ON cg.pid = ca.id | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        WHERE cg.del_flag = '0' | 
					 | 
					 | 
					        WHERE cg.del_flag = '0' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        AND ca.del_flag = '0' | 
					 | 
					 | 
					        AND ca.del_flag = '0' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        AND cg.SYNC_FLAG='1' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        AND cg.id IN | 
					 | 
					 | 
					        AND cg.id IN | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        <foreach item="id" collection="gridIdList" open="(" separator="," close=")"> | 
					 | 
					 | 
					        <foreach item="id" collection="gridIdList" open="(" separator="," close=")"> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            #{id} | 
					 | 
					 | 
					            #{id} | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -428,6 +429,7 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        ) agency ON grid.PID = agency.ID | 
					 | 
					 | 
					        ) agency ON grid.PID = agency.ID | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					       WHERE | 
					 | 
					 | 
					       WHERE | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					           grid.del_flag = 0 | 
					 | 
					 | 
					           grid.del_flag = 0 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					           and grid.SYNC_FLAG='1' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            <if test='areaCode != "" and areaCode != null'> | 
					 | 
					 | 
					            <if test='areaCode != "" and areaCode != null'> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					               AND grid.area_code LIKE CONCAT(#{areaCode},'%') | 
					 | 
					 | 
					               AND grid.area_code LIKE CONCAT(#{areaCode},'%') | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            </if> | 
					 | 
					 | 
					            </if> | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -467,6 +469,7 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                ) agency ON a.PID = agency.ID | 
					 | 
					 | 
					                ) agency ON a.PID = agency.ID | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                WHERE | 
					 | 
					 | 
					                WHERE | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    a.del_flag = 0 | 
					 | 
					 | 
					                    a.del_flag = 0 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    and a.SYNC_FLAG='1' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    AND a.customer_id = #{customerId} | 
					 | 
					 | 
					                    AND a.customer_id = #{customerId} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            ) AS c | 
					 | 
					 | 
					            ) AS c | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					         ORDER BY  CONVERT ( gridName USING gbk ) ASC | 
					 | 
					 | 
					         ORDER BY  CONVERT ( gridName USING gbk ) ASC | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |