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