| 
						
						
							
								
							
						
						
					 | 
					@ -22,7 +22,7 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        <result property="updatedTime" column="UPDATED_TIME"/> | 
					 | 
					 | 
					        <result property="updatedTime" column="UPDATED_TIME"/> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    </resultMap> | 
					 | 
					 | 
					    </resultMap> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    <!--  各社区登录总次数  --> | 
					 | 
					 | 
					    <!--  账号登录情况:各社区登录总次数  --> | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					    <select id="pageCommunityCount" parameterType="map" resultType="com.epmet.dto.result.yt.CommunityLoginResultDTO"> | 
					 | 
					 | 
					    <select id="pageCommunityCount" parameterType="map" resultType="com.epmet.dto.result.yt.CommunityLoginResultDTO"> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        SELECT | 
					 | 
					 | 
					        SELECT | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            ca.id AS agencyId, | 
					 | 
					 | 
					            ca.id AS agencyId, | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -31,11 +31,13 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            ca.ORGANIZATION_NAME AS agencyName, | 
					 | 
					 | 
					            ca.ORGANIZATION_NAME AS agencyName, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            ca.`LEVEL` AS agencyLevel, | 
					 | 
					 | 
					            ca.`LEVEL` AS agencyLevel, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            count( l.id ) AS count | 
					 | 
					 | 
					            count( l.id ) AS count | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        FROM | 
					 | 
					 | 
					        FROM customer_agency ca | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        customer_agency ca | 
					 | 
					 | 
					        left JOIN staff_login_log l | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        left JOIN staff_login_log l ON ( ca.ID =l.AGENCY_ID and l.DEL_FLAG = '0') | 
					 | 
					 | 
					            ON ( ca.ID =l.AGENCY_ID and l.DEL_FLAG = '0') | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        LEFT JOIN customer_agency s ON ( ca.PID = s.ID ) | 
					 | 
					 | 
					        LEFT JOIN customer_agency s | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        LEFT JOIN customer_agency d ON ( s.PID = d.ID ) | 
					 | 
					 | 
					            ON ( ca.PID = s.ID ) | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        LEFT JOIN customer_agency d | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            ON ( s.PID = d.ID ) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        WHERE | 
					 | 
					 | 
					        WHERE | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            ca.DEL_FLAG = '0' | 
					 | 
					 | 
					            ca.DEL_FLAG = '0' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            AND (ca.id = #{orgId} or ca.pids like concat('%',#{orgId},'%') ) | 
					 | 
					 | 
					            AND (ca.id = #{orgId} or ca.pids like concat('%',#{orgId},'%') ) | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -46,8 +48,7 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            <if test='null != endDate'> | 
					 | 
					 | 
					            <if test='null != endDate'> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                and l.LOGIN_TIME <= #{endDate} | 
					 | 
					 | 
					                and l.LOGIN_TIME <= #{endDate} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            </if> | 
					 | 
					 | 
					            </if> | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        GROUP BY | 
					 | 
					 | 
					        GROUP BY ca.id | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					        ca.id | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        order by count(l.id) desc | 
					 | 
					 | 
					        order by count(l.id) desc | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    </select> | 
					 | 
					 | 
					    </select> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    <!--社区活跃列表--> | 
					 | 
					 | 
					    <!--社区活跃列表--> | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -91,7 +92,7 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        COUNT(DISTINCT(l.id)) DESC; | 
					 | 
					 | 
					        COUNT(DISTINCT(l.id)) DESC; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    </select> | 
					 | 
					 | 
					    </select> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    <!--   柱状图:下级组织账号登录次数汇总 --> | 
					 | 
					 | 
					    <!--   账号登录情况:柱状图:下级组织账号登录次数汇总 --> | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					    <select id="querySubCount" parameterType="map" resultType="com.epmet.dto.result.yt.CommunityLoginResultDTO"> | 
					 | 
					 | 
					    <select id="querySubCount" parameterType="map" resultType="com.epmet.dto.result.yt.CommunityLoginResultDTO"> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        select | 
					 | 
					 | 
					        select | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            ca.ID AS agencyId, | 
					 | 
					 | 
					            ca.ID AS agencyId, | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -113,6 +114,7 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        order by count(l.ID) desc | 
					 | 
					 | 
					        order by count(l.ID) desc | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    </select> | 
					 | 
					 | 
					    </select> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    <!--    账号登录情况:查看区县--> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    <select id="pageDistrictCount" parameterType="map" resultType="com.epmet.dto.result.yt.CommunityLoginResultDTO"> | 
					 | 
					 | 
					    <select id="pageDistrictCount" parameterType="map" resultType="com.epmet.dto.result.yt.CommunityLoginResultDTO"> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        SELECT | 
					 | 
					 | 
					        SELECT | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            ca.id AS agencyId, | 
					 | 
					 | 
					            ca.id AS agencyId, | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -120,9 +122,9 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            ca.LEVEL AS agencyLevel, | 
					 | 
					 | 
					            ca.LEVEL AS agencyLevel, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            count(l.id) AS count | 
					 | 
					 | 
					            count(l.id) AS count | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        FROM customer_agency ca | 
					 | 
					 | 
					        FROM customer_agency ca | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        left join staff_login_log l ON ( ca.ID =l.AGENCY_ID and l.DEL_FLAG = '0') | 
					 | 
					 | 
					        left join staff_login_log l | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        WHERE | 
					 | 
					 | 
					            ON ( ca.ID =l.AGENCY_ID and l.DEL_FLAG = '0') | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        ca.DEL_FLAG = '0' | 
					 | 
					 | 
					        WHERE ca.DEL_FLAG = '0' | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					            and (ca.id=#{orgId} or ca.pids like concat('%',#{orgId},'%') ) | 
					 | 
					 | 
					            and (ca.id=#{orgId} or ca.pids like concat('%',#{orgId},'%') ) | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            AND ca.LEVEL = 'district' | 
					 | 
					 | 
					            AND ca.LEVEL = 'district' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            <if test='null != startDate'> | 
					 | 
					 | 
					            <if test='null != startDate'> | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -131,12 +133,11 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            <if test='null != endDate'> | 
					 | 
					 | 
					            <if test='null != endDate'> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                and l.LOGIN_TIME <= #{endDate} | 
					 | 
					 | 
					                and l.LOGIN_TIME <= #{endDate} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            </if> | 
					 | 
					 | 
					            </if> | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        GROUP BY | 
					 | 
					 | 
					        GROUP BY ca.id | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					        ca.id | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        order by count(l.id) desc | 
					 | 
					 | 
					        order by count(l.id) desc | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    </select> | 
					 | 
					 | 
					    </select> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    <!--    查看街镇--> | 
					 | 
					 | 
					    <!--    账号登录情况:查看街镇--> | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					    <select id="pageStreetCount" parameterType="map" resultType="com.epmet.dto.result.yt.CommunityLoginResultDTO"> | 
					 | 
					 | 
					    <select id="pageStreetCount" parameterType="map" resultType="com.epmet.dto.result.yt.CommunityLoginResultDTO"> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        SELECT | 
					 | 
					 | 
					        SELECT | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            ca.id AS agencyId, | 
					 | 
					 | 
					            ca.id AS agencyId, | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -144,7 +145,8 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            ca.LEVEL AS agencyLevel, | 
					 | 
					 | 
					            ca.LEVEL AS agencyLevel, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            count(l.id) AS count | 
					 | 
					 | 
					            count(l.id) AS count | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        FROM customer_agency ca | 
					 | 
					 | 
					        FROM customer_agency ca | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        left join staff_login_log l ON ( ca.ID =l.AGENCY_ID and l.DEL_FLAG = '0') | 
					 | 
					 | 
					        left join staff_login_log l | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            ON ( ca.ID =l.AGENCY_ID and l.DEL_FLAG = '0') | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        WHERE | 
					 | 
					 | 
					        WHERE | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            ca.DEL_FLAG = '0' | 
					 | 
					 | 
					            ca.DEL_FLAG = '0' | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            and (ca.id = #{orgId} or ca.pids like concat('%',#{orgId},'%') ) | 
					 | 
					 | 
					            and (ca.id = #{orgId} or ca.pids like concat('%',#{orgId},'%') ) | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -155,8 +157,7 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            <if test='null != endDate'> | 
					 | 
					 | 
					            <if test='null != endDate'> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					                and l.LOGIN_TIME <= #{endDate} | 
					 | 
					 | 
					                and l.LOGIN_TIME <= #{endDate} | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					            </if> | 
					 | 
					 | 
					            </if> | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        GROUP BY | 
					 | 
					 | 
					        GROUP BY  ca.id | 
				
			
			
				
				
			
		
	
		
		
			
				
					 | 
					 | 
					        ca.id | 
					 | 
					 | 
					 | 
				
			
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					        order by count(l.id) desc | 
					 | 
					 | 
					        order by count(l.id) desc | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    </select> | 
					 | 
					 | 
					    </select> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |