|
|
@ -10,9 +10,9 @@ |
|
|
|
total.orgName, |
|
|
|
total.parentId, |
|
|
|
'grid' as orgType, |
|
|
|
SUM( total.USER_TOTAL) AS USER_TOTAL, |
|
|
|
SUM( total.RESIDENTS_TOTAL ) AS RESIDENTS_TOTAL, |
|
|
|
SUM( total.PARTY_TOTAL ) AS PARTY_TOTAL, |
|
|
|
SUM( total.USER_TOTAL) AS registerUserCount, |
|
|
|
SUM( total.RESIDENTS_TOTAL ) AS resiTotal, |
|
|
|
SUM( total.PARTY_TOTAL ) AS partyMemberCount, |
|
|
|
SUM( total.ageLevel1 ) AS ageLevel1, |
|
|
|
SUM( total.ageLevel2 ) AS ageLevel2, |
|
|
|
SUM( total.ageLevel3 ) AS ageLevel3, |
|
|
@ -88,9 +88,9 @@ |
|
|
|
total.orgName, |
|
|
|
total.parentId, |
|
|
|
'department' as orgType, |
|
|
|
SUM( total.USER_TOTAL) AS USER_TOTAL, |
|
|
|
SUM( total.RESIDENTS_TOTAL ) AS RESIDENTS_TOTAL, |
|
|
|
SUM( total.PARTY_TOTAL ) AS PARTY_TOTAL, |
|
|
|
SUM( total.USER_TOTAL) AS registerUserCount, |
|
|
|
SUM( total.RESIDENTS_TOTAL ) AS resiTotal, |
|
|
|
SUM( total.PARTY_TOTAL ) AS partyMemberCount, |
|
|
|
SUM( total.ageLevel1 ) AS ageLevel1, |
|
|
|
SUM( total.ageLevel2 ) AS ageLevel2, |
|
|
|
SUM( total.ageLevel3 ) AS ageLevel3, |
|
|
@ -168,9 +168,9 @@ |
|
|
|
total.orgName, |
|
|
|
total.parentId, |
|
|
|
'department' as orgType, |
|
|
|
SUM( total.USER_TOTAL) AS USER_TOTAL, |
|
|
|
SUM( total.RESIDENTS_TOTAL ) AS RESIDENTS_TOTAL, |
|
|
|
SUM( total.PARTY_TOTAL ) AS PARTY_TOTAL, |
|
|
|
SUM( total.USER_TOTAL) AS registerUserCount, |
|
|
|
SUM( total.RESIDENTS_TOTAL ) AS resiTotal, |
|
|
|
SUM( total.PARTY_TOTAL ) AS partyMemberCount, |
|
|
|
SUM( total.ageLevel1 ) AS ageLevel1, |
|
|
|
SUM( total.ageLevel2 ) AS ageLevel2, |
|
|
|
SUM( total.ageLevel3 ) AS ageLevel3, |
|
|
@ -251,9 +251,9 @@ |
|
|
|
total.orgName, |
|
|
|
total.parentId, |
|
|
|
'department' as orgType, |
|
|
|
SUM( total.USER_TOTAL) AS USER_TOTAL, |
|
|
|
SUM( total.RESIDENTS_TOTAL ) AS RESIDENTS_TOTAL, |
|
|
|
SUM( total.PARTY_TOTAL ) AS PARTY_TOTAL, |
|
|
|
SUM( total.USER_TOTAL) AS registerUserCount, |
|
|
|
SUM( total.RESIDENTS_TOTAL ) AS resiTotal, |
|
|
|
SUM( total.PARTY_TOTAL ) AS partyMemberCount, |
|
|
|
SUM( total.ageLevel1 ) AS ageLevel1, |
|
|
|
SUM( total.ageLevel2 ) AS ageLevel2, |
|
|
|
SUM( total.ageLevel3 ) AS ageLevel3, |
|
|
@ -536,8 +536,8 @@ |
|
|
|
IFNULL(format(round(publishTopicTotal/topicTotal,4)*100,2),0.00) as topicRatio, -- 话题占比(党员/用户) |
|
|
|
IFNULL(format(round(publishShiftProjectTotal/shiftProjectTotal,4)*100,2),0.00) as shiftProjectRatio, -- 议题转项目占比(党员/用户) |
|
|
|
IFNULL(format(round(publishResolvedProjectTotal/resolvedProjectTotal,4)*100,2),0.00) as resolvedProjectRatio, -- 解决项目占比(党员/用户) |
|
|
|
IFNULL(format(round(publishIssueSum/issueSum,4)*100,2),0.00) as publishIssueRatio -- 党员发布议题占比(党员/用户) |
|
|
|
|
|
|
|
IFNULL(format(round(publishIssueSum/issueSum,4)*100,2),0.00) as publishIssueRatio, -- 党员发布议题占比(党员/用户) |
|
|
|
DATE_FORMAT(now(),'%Y-%m-%d') as dataEndTime |
|
|
|
FROM esua_epdc_admin.sys_dept gr |
|
|
|
left join |
|
|
|
(select total.GRID_ID, |
|
|
@ -643,7 +643,8 @@ UNION ALL |
|
|
|
IFNULL(format(round(publishTopicTotal/topicTotal,4)*100,2),0.00) as topicRatio, -- 话题占比(党员/用户) |
|
|
|
IFNULL(format(round(publishShiftProjectTotal/shiftProjectTotal,4)*100,2),0.00) as shiftProjectRatio, -- 议题转项目占比(党员/用户) |
|
|
|
IFNULL(format(round(publishResolvedProjectTotal/resolvedProjectTotal,4)*100,2),0.00) as resolvedProjectRatio, -- 解决项目占比(党员/用户) |
|
|
|
IFNULL(format(round(publishIssueSum/issueSum,4)*100,2),0.00) as publishIssueRatio -- 党员发布议题占比(党员/用户) |
|
|
|
IFNULL(format(round(publishIssueSum/issueSum,4)*100,2),0.00) as publishIssueRatio, -- 党员发布议题占比(党员/用户) |
|
|
|
DATE_FORMAT(now(),'%Y-%m-%d') as dataEndTime |
|
|
|
FROM esua_epdc_admin.sys_dept co |
|
|
|
LEFT JOIN esua_epdc_admin.sys_dept gr on co.id=gr.pid |
|
|
|
left join |
|
|
@ -751,7 +752,8 @@ union all |
|
|
|
IFNULL(format(round(publishTopicTotal/topicTotal,4)*100,2),0.00) as topicRatio, -- 话题占比(党员/用户) |
|
|
|
IFNULL(format(round(publishShiftProjectTotal/shiftProjectTotal,4)*100,2),0.00) as shiftProjectRatio, -- 议题转项目占比(党员/用户) |
|
|
|
IFNULL(format(round(publishResolvedProjectTotal/resolvedProjectTotal,4)*100,2),0.00) as resolvedProjectRatio, -- 解决项目占比(党员/用户) |
|
|
|
IFNULL(format(round(publishIssueSum/issueSum,4)*100,2),0.00) as publishIssueRatio -- 党员发布议题占比(党员/用户) |
|
|
|
IFNULL(format(round(publishIssueSum/issueSum,4)*100,2),0.00) as publishIssueRatio, -- 党员发布议题占比(党员/用户) |
|
|
|
DATE_FORMAT(now(),'%Y-%m-%d') as dataEndTime |
|
|
|
FROM esua_epdc_admin.sys_dept st |
|
|
|
left join esua_epdc_admin.sys_dept co on co.pid=st.id |
|
|
|
LEFT JOIN esua_epdc_admin.sys_dept gr on co.id=gr.pid |
|
|
@ -861,7 +863,8 @@ union all |
|
|
|
IFNULL(format(round(publishTopicTotal/topicTotal,4)*100,2),0.00) as topicRatio, -- 话题占比(党员/用户) |
|
|
|
IFNULL(format(round(publishShiftProjectTotal/shiftProjectTotal,4)*100,2),0.00) as shiftProjectRatio, -- 议题转项目占比(党员/用户) |
|
|
|
IFNULL(format(round(publishResolvedProjectTotal/resolvedProjectTotal,4)*100,2),0.00) as resolvedProjectRatio, -- 解决项目占比(党员/用户) |
|
|
|
IFNULL(format(round(publishIssueSum/issueSum,4)*100,2),0.00) as publishIssueRatio -- 党员发布议题占比(党员/用户) |
|
|
|
IFNULL(format(round(publishIssueSum/issueSum,4)*100,2),0.00) as publishIssueRatio, -- 党员发布议题占比(党员/用户) |
|
|
|
DATE_FORMAT(now(),'%Y-%m-%d') as dataEndTime |
|
|
|
FROM esua_epdc_admin.sys_dept city |
|
|
|
left join esua_epdc_admin.sys_dept st on st.pid=city.id |
|
|
|
left join esua_epdc_admin.sys_dept co on co.pid=st.id |
|
|
@ -1362,6 +1365,7 @@ union all |
|
|
|
select d.id as orgId, |
|
|
|
d.name as orgName, |
|
|
|
d.pid as parentId, |
|
|
|
'grid' as orgType, |
|
|
|
date_format( now( ), '%Y' ) as yearId, |
|
|
|
date_format( now( ), '%Y-%m' ) as monthId, |
|
|
|
(CASE WHEN ed.DAILY_TYPE='10' THEN 'party' |
|
|
@ -1395,6 +1399,7 @@ union all -- 社区 |
|
|
|
select community.orgId, |
|
|
|
community.orgName, |
|
|
|
community.parentId, |
|
|
|
'department' as orgType, |
|
|
|
community.yearId, |
|
|
|
community.monthId, |
|
|
|
community.type, |
|
|
@ -1475,6 +1480,7 @@ union all -- 街道 |
|
|
|
select street.orgId, |
|
|
|
street.orgName, |
|
|
|
street.parentId, |
|
|
|
'department' as orgType, |
|
|
|
street.yearId, |
|
|
|
street.monthId, |
|
|
|
street.type, |
|
|
@ -1558,6 +1564,7 @@ union all -- 市北区 |
|
|
|
select city.orgId, |
|
|
|
city.orgName, |
|
|
|
city.parentId, |
|
|
|
'department' as orgType, |
|
|
|
city.yearId, |
|
|
|
city.monthId, |
|
|
|
city.type, |
|
|
@ -1693,6 +1700,7 @@ union all -- 市北区 |
|
|
|
'1201689212329746433') |
|
|
|
</select> |
|
|
|
<select id="publicpartitotaldata" resultType="com.elink.esua.epdc.dto.screen.result.PublicpartitotaldataResultDTO"> |
|
|
|
|
|
|
|
SELECT gr.id as orgId, |
|
|
|
gr.name as orgName, |
|
|
|
gr.pid as parentId, |
|
|
@ -1761,13 +1769,13 @@ union all -- 市北区 |
|
|
|
count( behavior.GROUP_JOIN_FLAG = 1 OR NULL ) AS groupJoinFlag, |
|
|
|
count( behavior.GROUP_COMMENT_FLAG = 1 OR NULL ) AS groupCommentFlag, |
|
|
|
count( behavior.GROUP_CREATE_FLAG = 1 OR NULL ) groupCreateFlag |
|
|
|
FROM epdc_user_behavior_log behavior |
|
|
|
LEFT JOIN meta_epdc_user USER ON USER.ID = behavior.USER_ID AND USER.DEL_FLAG = '0' |
|
|
|
WHERE behavior.USER_ID in ( select meu.ID from meta_epdc_user meu ) |
|
|
|
FROM esua_epdc_analysis.epdc_user_behavior_log behavior |
|
|
|
LEFT JOIN esua_epdc_user.epdc_user USER ON USER.ID = behavior.USER_ID AND USER.DEL_FLAG = '0' |
|
|
|
WHERE behavior.USER_ID in ( select meu.ID from esua_epdc_user.epdc_user meu ) |
|
|
|
GROUP BY USER_ID, USER.DEPT_ID |
|
|
|
) behaviorCount |
|
|
|
GROUP BY behaviorCount.DEPT_ID) be |
|
|
|
left join meta_sys_dept d1 on d1.ID = be.DEPT_ID |
|
|
|
left join esua_epdc_admin.sys_dept d1 on d1.ID = be.DEPT_ID |
|
|
|
where d1.DEL_FLAG=0 |
|
|
|
group by d1.ID |
|
|
|
|
|
|
@ -1886,13 +1894,13 @@ UNION ALL |
|
|
|
count( behavior.GROUP_JOIN_FLAG = 1 OR NULL ) AS groupJoinFlag, |
|
|
|
count( behavior.GROUP_COMMENT_FLAG = 1 OR NULL ) AS groupCommentFlag, |
|
|
|
count( behavior.GROUP_CREATE_FLAG = 1 OR NULL ) groupCreateFlag |
|
|
|
FROM epdc_user_behavior_log behavior |
|
|
|
LEFT JOIN meta_epdc_user USER ON USER.ID = behavior.USER_ID AND USER.DEL_FLAG = '0' |
|
|
|
WHERE behavior.USER_ID in ( select meu.ID from meta_epdc_user meu ) |
|
|
|
FROM esua_epdc_analysis.epdc_user_behavior_log behavior |
|
|
|
LEFT JOIN esua_epdc_user.epdc_user USER ON USER.ID = behavior.USER_ID AND USER.DEL_FLAG = '0' |
|
|
|
WHERE behavior.USER_ID in ( select meu.ID from esua_epdc_user.epdc_user meu ) |
|
|
|
GROUP BY USER_ID, USER.DEPT_ID |
|
|
|
) behaviorCount |
|
|
|
GROUP BY behaviorCount.DEPT_ID) be |
|
|
|
left join meta_sys_dept d1 on d1.ID = be.DEPT_ID |
|
|
|
left join esua_epdc_admin.sys_dept d1 on d1.ID = be.DEPT_ID |
|
|
|
where d1.DEL_FLAG=0 |
|
|
|
group by d1.ID |
|
|
|
|
|
|
@ -2013,13 +2021,13 @@ union all |
|
|
|
count( behavior.GROUP_JOIN_FLAG = 1 OR NULL ) AS groupJoinFlag, |
|
|
|
count( behavior.GROUP_COMMENT_FLAG = 1 OR NULL ) AS groupCommentFlag, |
|
|
|
count( behavior.GROUP_CREATE_FLAG = 1 OR NULL ) groupCreateFlag |
|
|
|
FROM epdc_user_behavior_log behavior |
|
|
|
LEFT JOIN meta_epdc_user USER ON USER.ID = behavior.USER_ID AND USER.DEL_FLAG = '0' |
|
|
|
WHERE behavior.USER_ID in ( select meu.ID from meta_epdc_user meu ) |
|
|
|
FROM esua_epdc_analysis.epdc_user_behavior_log behavior |
|
|
|
LEFT JOIN esua_epdc_user.epdc_user USER ON USER.ID = behavior.USER_ID AND USER.DEL_FLAG = '0' |
|
|
|
WHERE behavior.USER_ID in ( select meu.ID from esua_epdc_user.epdc_user meu ) |
|
|
|
GROUP BY USER_ID, USER.DEPT_ID |
|
|
|
) behaviorCount |
|
|
|
GROUP BY behaviorCount.DEPT_ID) be |
|
|
|
left join meta_sys_dept d1 on d1.ID = be.DEPT_ID |
|
|
|
left join esua_epdc_admin.sys_dept d1 on d1.ID = be.DEPT_ID |
|
|
|
where d1.DEL_FLAG=0 |
|
|
|
group by d1.ID |
|
|
|
|
|
|
@ -2142,13 +2150,13 @@ union all |
|
|
|
count( behavior.GROUP_JOIN_FLAG = 1 OR NULL ) AS groupJoinFlag, |
|
|
|
count( behavior.GROUP_COMMENT_FLAG = 1 OR NULL ) AS groupCommentFlag, |
|
|
|
count( behavior.GROUP_CREATE_FLAG = 1 OR NULL ) groupCreateFlag |
|
|
|
FROM epdc_user_behavior_log behavior |
|
|
|
LEFT JOIN meta_epdc_user USER ON USER.ID = behavior.USER_ID AND USER.DEL_FLAG = '0' |
|
|
|
WHERE behavior.USER_ID in ( select meu.ID from meta_epdc_user meu ) |
|
|
|
FROM esua_epdc_analysis.epdc_user_behavior_log behavior |
|
|
|
LEFT JOIN esua_epdc_user.epdc_user USER ON USER.ID = behavior.USER_ID AND USER.DEL_FLAG = '0' |
|
|
|
WHERE behavior.USER_ID in ( select meu.ID from esua_epdc_user.epdc_user meu ) |
|
|
|
GROUP BY USER_ID, USER.DEPT_ID |
|
|
|
) behaviorCount |
|
|
|
GROUP BY behaviorCount.DEPT_ID) be |
|
|
|
left join meta_sys_dept d1 on d1.ID = be.DEPT_ID |
|
|
|
left join esua_epdc_admin.sys_dept d1 on d1.ID = be.DEPT_ID |
|
|
|
where d1.DEL_FLAG=0 |
|
|
|
group by d1.ID |
|
|
|
|
|
|
@ -2194,5 +2202,6 @@ union all |
|
|
|
and city.DEL_FLAG=0 |
|
|
|
and city.type_key='district_party' and city.party_code='shibei' |
|
|
|
GROUP BY city.id |
|
|
|
|
|
|
|
</select> |
|
|
|
</mapper> |
|
|
|