| 
						
						
							
								
							
						
						
					 | 
					@ -196,7 +196,8 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            `code` AS 'code', | 
					 | 
					 | 
					            `code` AS 'code', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            grid_type AS 'gridType', | 
					 | 
					 | 
					            grid_type AS 'gridType', | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            contacts AS 'contacts', | 
					 | 
					 | 
					            contacts AS 'contacts', | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            mobile AS 'mobile' | 
					 | 
					 | 
					            mobile AS 'mobile', | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            sort AS gridSort | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        FROM | 
					 | 
					 | 
					        FROM | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            customer_grid | 
					 | 
					 | 
					            customer_grid | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        WHERE | 
					 | 
					 | 
					        WHERE | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -256,6 +257,9 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            <if test="centerAddress != null and centerAddress !=''"> | 
					 | 
					 | 
					            <if test="centerAddress != null and centerAddress !=''"> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                CENTER_ADDRESS= #{centerAddress}, | 
					 | 
					 | 
					                CENTER_ADDRESS= #{centerAddress}, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            </if> | 
					 | 
					 | 
					            </if> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            <if test="sort != null and sort != ''"> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                sort = #{sort}, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            </if> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            UPDATED_TIME=NOW() | 
					 | 
					 | 
					            UPDATED_TIME=NOW() | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        where | 
					 | 
					 | 
					        where | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            id = #{id} | 
					 | 
					 | 
					            id = #{id} | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -314,7 +318,7 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            DEL_FLAG = '0' | 
					 | 
					 | 
					            DEL_FLAG = '0' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            AND ABANDON_FLAG='0' | 
					 | 
					 | 
					            AND ABANDON_FLAG='0' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            AND PID = #{agencyId} | 
					 | 
					 | 
					            AND PID = #{agencyId} | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					            ORDER BY CREATED_TIME DESC | 
					 | 
					 | 
					            ORDER BY sort,grid_name,CREATED_TIME DESC | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            <if test="null != pageSize and pageSize > 0"> | 
					 | 
					 | 
					            <if test="null != pageSize and pageSize > 0"> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                LIMIT #{pageSize} | 
					 | 
					 | 
					                LIMIT #{pageSize} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            </if> | 
					 | 
					 | 
					            </if> | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -417,6 +421,8 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        WHERE del_flag = '0' | 
					 | 
					 | 
					        WHERE del_flag = '0' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					         and ABANDON_FLAG='0' | 
					 | 
					 | 
					         and ABANDON_FLAG='0' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					         AND pid = #{agencyId} | 
					 | 
					 | 
					         AND pid = #{agencyId} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        order by | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            sort,grid_name | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    </select> | 
					 | 
					 | 
					    </select> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    <select id="selectAgencyGridMsgList" resultType="com.epmet.dto.result.AgencyGridList"> | 
					 | 
					 | 
					    <select id="selectAgencyGridMsgList" resultType="com.epmet.dto.result.AgencyGridList"> | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -440,6 +446,8 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        AND ca.del_flag = '0' | 
					 | 
					 | 
					        AND ca.del_flag = '0' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        and cg.ABANDON_FLAG='0' | 
					 | 
					 | 
					        and cg.ABANDON_FLAG='0' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        AND cg.pid = #{agencyId} | 
					 | 
					 | 
					        AND cg.pid = #{agencyId} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        order by | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            cg.sort,cg.grid_name | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    </select> | 
					 | 
					 | 
					    </select> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    <!-- 单客户-根据城市地区码前四位匹配到城市下所有网格 --> | 
					 | 
					 | 
					    <!-- 单客户-根据城市地区码前四位匹配到城市下所有网格 --> | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -474,8 +482,10 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            </if> | 
					 | 
					 | 
					            </if> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            AND grid.customer_id = #{customerId} | 
					 | 
					 | 
					            AND grid.customer_id = #{customerId} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					       ORDER BY | 
					 | 
					 | 
					       ORDER BY | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					           grid.customer_id, | 
					 | 
					 | 
					           grid.sort, | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					           CONVERT ( gridName USING gbk ) ASC | 
					 | 
					 | 
					           CONVERT ( gridName USING gbk ) ASC, | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					           grid.customer_id | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					       LIMIT #{pageNo}, #{pageSize} | 
					 | 
					 | 
					       LIMIT #{pageNo}, #{pageSize} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    </select> | 
					 | 
					 | 
					    </select> | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -488,7 +498,9 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                SELECT | 
					 | 
					 | 
					                SELECT | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    a.id AS grid_id, | 
					 | 
					 | 
					                    a.id AS grid_id, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    a.customer_id, | 
					 | 
					 | 
					                    a.customer_id, | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    concat( agency.fullname, '-', a.grid_name ) AS gridName | 
					 | 
					 | 
					                    concat( agency.fullname, '-', a.grid_name ) AS gridName, | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    a.sort as sort, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					                    agency.fullname as fullName | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                FROM | 
					 | 
					 | 
					                FROM | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    CUSTOMER_GRID a | 
					 | 
					 | 
					                    CUSTOMER_GRID a | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                LEFT JOIN ( | 
					 | 
					 | 
					                LEFT JOIN ( | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -512,7 +524,7 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    and a.ABANDON_FLAG='0' | 
					 | 
					 | 
					                    and a.ABANDON_FLAG='0' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                    AND a.customer_id = #{customerId} | 
					 | 
					 | 
					                    AND a.customer_id = #{customerId} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            ) AS c | 
					 | 
					 | 
					            ) AS c | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					         ORDER BY  CONVERT ( gridName USING gbk ) ASC | 
					 | 
					 | 
					         ORDER BY fullName,c.sort,CONVERT ( gridName USING gbk ) ASC | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        LIMIT #{pageNo}, #{pageSize} | 
					 | 
					 | 
					        LIMIT #{pageNo}, #{pageSize} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    </select> | 
					 | 
					 | 
					    </select> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |