<select id="selectCountData" resultType="java.util.Map" parameterType="RcdataEnclosedCommunity">
select d.dept_id, d.dept_name,
(select COALESCE(sum(a.building_num),0) from rcdata_enclosed_community a where a.del_flag='0' and a.dept_id=d.dept_id and a.status='1') loudongcount,
(select COALESCE(sum(a.unit_num),0) from rcdata_enclosed_community a where a.del_flag='0' and a.dept_id=d.dept_id and a.status='1') danyuancount,
(select COALESCE(sum(a.house_num),0) from rcdata_enclosed_community a where a.del_flag='0' and a.dept_id=d.dept_id and a.status='1') hushucount,
(select COALESCE(sum(a.person_num),0) from rcdata_enclosed_community a where a.del_flag='0' and a.dept_id=d.dept_id and a.status='1') renkoucount
from sys_dept d where d.type=3 and d.del_flag='0'
</select>