|
@ -1425,13 +1425,12 @@ select gr.id as orgId, |
|
|
st.name as orgName, |
|
|
st.name as orgName, |
|
|
st.pid as parentId, |
|
|
st.pid as parentId, |
|
|
'agency' as orgType, |
|
|
'agency' as orgType, |
|
|
(IFNULL(dg.createGroupTotal,0)) AS createGroupTotal, |
|
|
(IFNULL(sum(dg.createGroupTotal),0)) AS createGroupTotal, |
|
|
(IFNULL(dg.groupUserTotal,0)) AS groupUserTotal, |
|
|
(IFNULL(sum(dg.groupUserTotal),0)) AS groupUserTotal, |
|
|
DATE_FORMAT(date_add( now( ), INTERVAL - 1 day),'%Y%m%d') as dataEndTime, |
|
|
DATE_FORMAT(date_add( now( ), INTERVAL - 1 day),'%Y%m%d') as dataEndTime, |
|
|
st.area_code AS areaCode |
|
|
st.area_code AS areaCode |
|
|
from esua_epdc_admin.sys_dept st |
|
|
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 co on st.id=co.pid |
|
|
left join esua_epdc_admin.sys_dept gr on co.id=gr.pid |
|
|
|
|
|
left join |
|
|
left join |
|
|
(select eg.DEPT_ID as GRID_ID, |
|
|
(select eg.DEPT_ID as GRID_ID, |
|
|
count(eg.id) as createGroupTotal, |
|
|
count(eg.id) as createGroupTotal, |
|
@ -1444,11 +1443,11 @@ select gr.id as orgId, |
|
|
group by PARTY_GROUP_ID)group_user on group_user.PARTY_GROUP_ID = eg.id |
|
|
group by PARTY_GROUP_ID)group_user on group_user.PARTY_GROUP_ID = eg.id |
|
|
where eg.DEL_FLAG=0 and eg.STATE=0 |
|
|
where eg.DEL_FLAG=0 and eg.STATE=0 |
|
|
group by eg.DEPT_ID)dg on dg.GRID_ID=co.id |
|
|
group by eg.DEPT_ID)dg on dg.GRID_ID=co.id |
|
|
where gr.del_flag=0 |
|
|
where co.del_flag=0 |
|
|
and co.del_flag=0 |
|
|
|
|
|
and st.del_flag=0 |
|
|
and st.del_flag=0 |
|
|
and st.type_key='street_party' |
|
|
and st.type_key='street_party' |
|
|
group by st.id |
|
|
GROUP BY st.ID |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
union all |
|
|
union all |
|
|
|
|
|
|
|
|