|
|
|
@ -66,6 +66,9 @@ |
|
|
|
WHERE |
|
|
|
d.DEL_FLAG = '0' |
|
|
|
and d.type_key='grid_party' |
|
|
|
and d.id not in ('1191534129122230274','1191534416067149825','1191535301279203329','1191535501527859202', |
|
|
|
'1191535697380884481','1192004624745586689','1230704850994528257', |
|
|
|
'1201319745506598913','1201687651826360321','1201689212329746433') |
|
|
|
) t |
|
|
|
GROUP BY |
|
|
|
t.orgId |
|
|
|
@ -142,6 +145,9 @@ |
|
|
|
co.DEL_FLAG = '0' |
|
|
|
and gr.DEL_FLAG = '0' |
|
|
|
and co.type_key='community_party' |
|
|
|
and co.id not in ('1191534129122230274','1191534416067149825','1191535301279203329','1191535501527859202', |
|
|
|
'1191535697380884481','1192004624745586689','1230704850994528257', |
|
|
|
'1201319745506598913','1201687651826360321','1201689212329746433') |
|
|
|
) t |
|
|
|
GROUP BY |
|
|
|
t.orgId |
|
|
|
@ -220,6 +226,9 @@ |
|
|
|
and co.DEL_FLAG = '0' |
|
|
|
and gr.DEL_FLAG = '0' |
|
|
|
and st.type_key='street_party' |
|
|
|
and st.id not in ('1191534129122230274','1191534416067149825','1191535301279203329','1191535501527859202', |
|
|
|
'1191535697380884481','1192004624745586689','1230704850994528257', |
|
|
|
'1201319745506598913','1201687651826360321','1201689212329746433') |
|
|
|
) t |
|
|
|
GROUP BY |
|
|
|
t.orgId |
|
|
|
@ -375,6 +384,9 @@ |
|
|
|
and ei.DEL_FLAG=0 |
|
|
|
and ei.ITEM_STATE=0 |
|
|
|
and i.DEL_FLAG=0 |
|
|
|
and d.id not in ('1191534129122230274','1191534416067149825','1191535301279203329','1191535501527859202', |
|
|
|
'1191535697380884481','1192004624745586689','1230704850994528257', |
|
|
|
'1201319745506598913','1201687651826360321','1201689212329746433') |
|
|
|
order by ei.CREATED_TIME desc,i.id |
|
|
|
</select> |
|
|
|
<select id="partylinkmassesdata" resultType="com.elink.esua.epdc.dto.screen.result.PartylinkmassesdataResultDTO"> |
|
|
|
@ -398,6 +410,9 @@ |
|
|
|
where eg.DEL_FLAG=0 and eg.STATE=10 |
|
|
|
group by eg.GRID_ID)dg on dg.GRID_ID=gr.id |
|
|
|
where gr.del_flag=0 and gr.type_key='grid_party' |
|
|
|
and gr.id not in ('1191534129122230274','1191534416067149825','1191535301279203329','1191535501527859202', |
|
|
|
'1191535697380884481','1192004624745586689','1230704850994528257', |
|
|
|
'1201319745506598913','1201687651826360321','1201689212329746433') |
|
|
|
|
|
|
|
union all |
|
|
|
|
|
|
|
@ -424,6 +439,89 @@ |
|
|
|
where gr.del_flag=0 |
|
|
|
and co.del_flag=0 |
|
|
|
and co.type_key='community_party' |
|
|
|
and co.id not in ('1191534129122230274','1191534416067149825','1191535301279203329','1191535501527859202', |
|
|
|
'1191535697380884481','1192004624745586689','1230704850994528257', |
|
|
|
'1201319745506598913','1201687651826360321','1201689212329746433') |
|
|
|
group by co.id |
|
|
|
|
|
|
|
union all |
|
|
|
|
|
|
|
select st.id as orgId, |
|
|
|
st.name as orgName, |
|
|
|
st.pid as parentId, |
|
|
|
'department' as orgType, |
|
|
|
sum(IFNULL(dg.createGroupTotal,0)) AS createGroupTotal, |
|
|
|
sum(IFNULL(dg.groupUserTotal,0)) AS groupUserTotal |
|
|
|
from esua_epdc_admin.sys_dept st |
|
|
|
left join esua_epdc_admin.sys_dept co on st.id=co.pid |
|
|
|
left join esua_epdc_admin.sys_dept gr on co.id=gr.pid |
|
|
|
left join |
|
|
|
(select eg.GRID_ID, |
|
|
|
count(eg.id) as createGroupTotal, |
|
|
|
sum(group_user.userCount) as groupUserTotal |
|
|
|
from esua_epdc_group.epdc_group eg |
|
|
|
left join (select GROUP_ID, |
|
|
|
count(STATE = 10 OR NULL) AS userCount |
|
|
|
from esua_epdc_group.epdc_user_group eu |
|
|
|
where eu.DEL_FLAG=0 |
|
|
|
group by GROUP_ID)group_user on group_user.GROUP_ID = eg.id |
|
|
|
where eg.DEL_FLAG=0 and eg.STATE=10 |
|
|
|
group by eg.GRID_ID)dg on dg.GRID_ID=gr.id |
|
|
|
where gr.del_flag=0 |
|
|
|
and co.del_flag=0 |
|
|
|
and st.del_flag=0 |
|
|
|
and st.type_key='street_party'select gr.id as orgId, |
|
|
|
gr.name as orgName, |
|
|
|
gr.pid as parentId, |
|
|
|
'grid' as orgType, |
|
|
|
IFNULL(dg.createGroupTotal,0) AS createGroupTotal, |
|
|
|
IFNULL(dg.groupUserTotal,0) AS groupUserTotal |
|
|
|
from esua_epdc_admin.sys_dept gr |
|
|
|
left join |
|
|
|
(select eg.GRID_ID, |
|
|
|
count(eg.id) as createGroupTotal, |
|
|
|
sum(group_user.userCount) as groupUserTotal |
|
|
|
from esua_epdc_group.epdc_group eg |
|
|
|
left join (select GROUP_ID, |
|
|
|
count(STATE = 10 OR NULL) AS userCount |
|
|
|
from esua_epdc_group.epdc_user_group eu |
|
|
|
where eu.DEL_FLAG=0 |
|
|
|
group by GROUP_ID)group_user on group_user.GROUP_ID = eg.id |
|
|
|
where eg.DEL_FLAG=0 and eg.STATE=10 |
|
|
|
group by eg.GRID_ID)dg on dg.GRID_ID=gr.id |
|
|
|
where gr.del_flag=0 and gr.type_key='grid_party' |
|
|
|
and gr.id not in ('1191534129122230274','1191534416067149825','1191535301279203329','1191535501527859202', |
|
|
|
'1191535697380884481','1192004624745586689','1230704850994528257', |
|
|
|
'1201319745506598913','1201687651826360321','1201689212329746433') |
|
|
|
|
|
|
|
union all |
|
|
|
|
|
|
|
select co.id as orgId, |
|
|
|
co.name as orgName, |
|
|
|
co.pid as parentId, |
|
|
|
'department' as orgType, |
|
|
|
sum(IFNULL(dg.createGroupTotal,0)) AS createGroupTotal, |
|
|
|
sum(IFNULL(dg.groupUserTotal,0)) AS groupUserTotal |
|
|
|
from esua_epdc_admin.sys_dept co |
|
|
|
left join esua_epdc_admin.sys_dept gr on co.id=gr.pid |
|
|
|
left join |
|
|
|
(select eg.GRID_ID, |
|
|
|
count(eg.id) as createGroupTotal, |
|
|
|
sum(group_user.userCount) as groupUserTotal |
|
|
|
from esua_epdc_group.epdc_group eg |
|
|
|
left join (select GROUP_ID, |
|
|
|
count(STATE = 10 OR NULL) AS userCount |
|
|
|
from esua_epdc_group.epdc_user_group eu |
|
|
|
where eu.DEL_FLAG=0 |
|
|
|
group by GROUP_ID)group_user on group_user.GROUP_ID = eg.id |
|
|
|
where eg.DEL_FLAG=0 and eg.STATE=10 |
|
|
|
group by eg.GRID_ID)dg on dg.GRID_ID=gr.id |
|
|
|
where gr.del_flag=0 |
|
|
|
and co.del_flag=0 |
|
|
|
and co.type_key='community_party' |
|
|
|
and co.id not in ('1191534129122230274','1191534416067149825','1191535301279203329','1191535501527859202', |
|
|
|
'1191535697380884481','1192004624745586689','1230704850994528257', |
|
|
|
'1201319745506598913','1201687651826360321','1201689212329746433') |
|
|
|
group by co.id |
|
|
|
|
|
|
|
union all |
|
|
|
@ -453,6 +551,44 @@ |
|
|
|
and co.del_flag=0 |
|
|
|
and st.del_flag=0 |
|
|
|
and st.type_key='street_party' |
|
|
|
and st.id not in ('1191534129122230274','1191534416067149825','1191535301279203329','1191535501527859202', |
|
|
|
'1191535697380884481','1192004624745586689','1230704850994528257', |
|
|
|
'1201319745506598913','1201687651826360321','1201689212329746433') |
|
|
|
group by st.id |
|
|
|
|
|
|
|
union all |
|
|
|
|
|
|
|
select city.id as orgId, |
|
|
|
city.name as orgName, |
|
|
|
city.pid as parentId, |
|
|
|
'department' as orgType, |
|
|
|
sum(IFNULL(dg.createGroupTotal,0)) AS createGroupTotal, |
|
|
|
sum(IFNULL(dg.groupUserTotal,0)) AS groupUserTotal |
|
|
|
from esua_epdc_admin.sys_dept city |
|
|
|
left join esua_epdc_admin.sys_dept st on city.id=st.pid |
|
|
|
left join esua_epdc_admin.sys_dept co on st.id=co.pid |
|
|
|
left join esua_epdc_admin.sys_dept gr on co.id=gr.pid |
|
|
|
left join |
|
|
|
(select eg.GRID_ID, |
|
|
|
count(eg.id) as createGroupTotal, |
|
|
|
sum(group_user.userCount) as groupUserTotal |
|
|
|
from esua_epdc_group.epdc_group eg |
|
|
|
left join (select GROUP_ID, |
|
|
|
count(STATE = 10 OR NULL) AS userCount |
|
|
|
from esua_epdc_group.epdc_user_group eu |
|
|
|
where eu.DEL_FLAG=0 |
|
|
|
group by GROUP_ID)group_user on group_user.GROUP_ID = eg.id |
|
|
|
where eg.DEL_FLAG=0 and eg.STATE=10 |
|
|
|
group by eg.GRID_ID)dg on dg.GRID_ID=gr.id |
|
|
|
where gr.del_flag=0 |
|
|
|
and co.del_flag=0 |
|
|
|
and st.del_flag=0 |
|
|
|
and city.del_flag=0 |
|
|
|
and city.type_key='district_party' and city.party_code='shibei' |
|
|
|
group by city.id |
|
|
|
and st.id not in ('1191534129122230274','1191534416067149825','1191535301279203329','1191535501527859202', |
|
|
|
'1191535697380884481','1192004624745586689','1230704850994528257', |
|
|
|
'1201319745506598913','1201687651826360321','1201689212329746433') |
|
|
|
group by st.id |
|
|
|
|
|
|
|
union all |
|
|
|
@ -559,9 +695,12 @@ |
|
|
|
group by total.GRID_ID)t on gr.id=t.GRID_ID |
|
|
|
where gr.del_flag=0 |
|
|
|
and gr.type_key='grid_party' |
|
|
|
and gr.id not in ('1191534129122230274','1191534416067149825','1191535301279203329','1191535501527859202', |
|
|
|
'1191535697380884481','1192004624745586689','1230704850994528257', |
|
|
|
'1201319745506598913','1201687651826360321','1201689212329746433') |
|
|
|
|
|
|
|
|
|
|
|
UNION ALL |
|
|
|
UNION ALL |
|
|
|
|
|
|
|
SELECT co.id as orgId, |
|
|
|
co.name as orgName, |
|
|
|
@ -637,9 +776,12 @@ |
|
|
|
where gr.del_flag=0 |
|
|
|
and co.del_flag=0 |
|
|
|
and co.type_key='community_party' |
|
|
|
and co.id not in ('1191534129122230274','1191534416067149825','1191535301279203329','1191535501527859202', |
|
|
|
'1191535697380884481','1192004624745586689','1230704850994528257', |
|
|
|
'1201319745506598913','1201687651826360321','1201689212329746433') |
|
|
|
GROUP BY co.id |
|
|
|
|
|
|
|
union all |
|
|
|
union all |
|
|
|
|
|
|
|
SELECT st.id as orgId, |
|
|
|
st.name as orgName, |
|
|
|
@ -717,9 +859,12 @@ |
|
|
|
and co.del_flag=0 |
|
|
|
and st.del_flag=0 |
|
|
|
and st.type_key='street_party' |
|
|
|
and st.id not in ('1191534129122230274','1191534416067149825','1191535301279203329','1191535501527859202', |
|
|
|
'1191535697380884481','1192004624745586689','1230704850994528257', |
|
|
|
'1201319745506598913','1201687651826360321','1201689212329746433') |
|
|
|
GROUP BY st.id |
|
|
|
|
|
|
|
union all |
|
|
|
union all |
|
|
|
|
|
|
|
SELECT city.id as orgId, |
|
|
|
city.name as orgName, |
|
|
|
@ -893,8 +1038,11 @@ |
|
|
|
group by total.GRID_ID)t on gr.id=t.GRID_ID |
|
|
|
where gr.del_flag=0 |
|
|
|
and gr.type_key='grid_party' |
|
|
|
and gr.id not in ('1191534129122230274','1191534416067149825','1191535301279203329','1191535501527859202', |
|
|
|
'1191535697380884481','1192004624745586689','1230704850994528257', |
|
|
|
'1201319745506598913','1201687651826360321','1201689212329746433') |
|
|
|
|
|
|
|
UNION ALL |
|
|
|
UNION ALL |
|
|
|
|
|
|
|
SELECT co.id as orgId, |
|
|
|
co.name as orgName, |
|
|
|
@ -989,9 +1137,12 @@ |
|
|
|
where gr.del_flag=0 |
|
|
|
and co.del_flag=0 |
|
|
|
and co.type_key='community_party' |
|
|
|
and co.id not in ('1191534129122230274','1191534416067149825','1191535301279203329','1191535501527859202', |
|
|
|
'1191535697380884481','1192004624745586689','1230704850994528257', |
|
|
|
'1201319745506598913','1201687651826360321','1201689212329746433') |
|
|
|
GROUP BY co.id |
|
|
|
|
|
|
|
union all |
|
|
|
union all |
|
|
|
|
|
|
|
SELECT st.id as orgId, |
|
|
|
st.name as orgName, |
|
|
|
@ -1088,9 +1239,12 @@ |
|
|
|
and co.del_flag=0 |
|
|
|
and st.del_flag=0 |
|
|
|
and st.type_key='street_party' |
|
|
|
and st.id not in ('1191534129122230274','1191534416067149825','1191535301279203329','1191535501527859202', |
|
|
|
'1191535697380884481','1192004624745586689','1230704850994528257', |
|
|
|
'1201319745506598913','1201687651826360321','1201689212329746433') |
|
|
|
GROUP BY st.id |
|
|
|
|
|
|
|
union all |
|
|
|
union all |
|
|
|
|
|
|
|
SELECT city.id as orgId, |
|
|
|
city.name as orgName, |
|
|
|
@ -1218,6 +1372,9 @@ |
|
|
|
WHERE d.DEL_FLAG=0 |
|
|
|
and ed.DEL_FLAG=0 |
|
|
|
and d.type_key='grid_party' |
|
|
|
and d.id not in ('1191534129122230274','1191534416067149825','1191535301279203329','1191535501527859202', |
|
|
|
'1191535697380884481','1192004624745586689','1230704850994528257', |
|
|
|
'1201319745506598913','1201687651826360321','1201689212329746433') |
|
|
|
group by ed.DEPT_ID,ed.DAILY_TYPE,ed.MEET_TYPE |
|
|
|
|
|
|
|
union all -- 社区 |
|
|
|
@ -1262,6 +1419,9 @@ union all -- 社区 |
|
|
|
and co.DEL_FLAG=0 |
|
|
|
and ed.DEL_FLAG=0 |
|
|
|
and co.type_key='community_party' |
|
|
|
and co.id not in ('1191534129122230274','1191534416067149825','1191535301279203329','1191535501527859202', |
|
|
|
'1191535697380884481','1192004624745586689','1230704850994528257', |
|
|
|
'1201319745506598913','1201687651826360321','1201689212329746433') |
|
|
|
group by co.id,ed.DAILY_TYPE,ed.MEET_TYPE |
|
|
|
|
|
|
|
union all |
|
|
|
@ -1291,6 +1451,9 @@ union all -- 社区 |
|
|
|
WHERE d.DEL_FLAG=0 |
|
|
|
and ed.DEL_FLAG=0 |
|
|
|
and d.type_key='community_party' |
|
|
|
and d.id not in ('1191534129122230274','1191534416067149825','1191535301279203329','1191535501527859202', |
|
|
|
'1191535697380884481','1192004624745586689','1230704850994528257', |
|
|
|
'1201319745506598913','1201687651826360321','1201689212329746433') |
|
|
|
group by ed.DEPT_ID,ed.DAILY_TYPE,ed.MEET_TYPE)community |
|
|
|
group by community.orgId,community.DAILY_TYPE,community.meetCategoryId |
|
|
|
|
|
|
|
@ -1338,6 +1501,9 @@ union all -- 街道 |
|
|
|
and ed.DEL_FLAG=0 |
|
|
|
and st.DEL_FLAG=0 |
|
|
|
and st.type_key='street_party' |
|
|
|
and st.id not in ('1191534129122230274','1191534416067149825','1191535301279203329','1191535501527859202', |
|
|
|
'1191535697380884481','1192004624745586689','1230704850994528257', |
|
|
|
'1201319745506598913','1201687651826360321','1201689212329746433') |
|
|
|
group by st.id,ed.DAILY_TYPE,ed.MEET_TYPE |
|
|
|
|
|
|
|
union all |
|
|
|
@ -1368,6 +1534,9 @@ union all -- 街道 |
|
|
|
WHERE d.DEL_FLAG=0 |
|
|
|
and ed.DEL_FLAG=0 |
|
|
|
and d.type_key='street_party' |
|
|
|
and d.id not in ('1191534129122230274','1191534416067149825','1191535301279203329','1191535501527859202', |
|
|
|
'1191535697380884481','1192004624745586689','1230704850994528257', |
|
|
|
'1201319745506598913','1201687651826360321','1201689212329746433') |
|
|
|
group by ed.DEPT_ID,ed.DAILY_TYPE,ed.MEET_TYPE)street |
|
|
|
group by street.orgId,street.DAILY_TYPE,street.meetCategoryId |
|
|
|
|
|
|
|
|