| | |
| | | (SELECT COUNT(community_id) FROM com_act WHERE street_id = #{streetId}) AS communityNum, |
| | | (SELECT COUNT(id) FROM (SELECT id FROM com_act_social_org t |
| | | LEFT JOIN com_act t1 ON t.affiliated_unit = t1.community_id |
| | | WHERE t.build_type = 1 AND t.is_society = 1 AND t.affiliated_unit_type = 2 AND t.`status` = 1 AND t1.street_id = #{streetId} |
| | | WHERE t.is_society = 1 AND t.affiliated_unit_type = 2 AND t.`status` = 1 AND t1.street_id = #{streetId} |
| | | UNION ALL |
| | | SELECT id FROM com_act_social_org |
| | | WHERE build_type = 1 AND is_society = 1 AND affiliated_unit_type = 1 AND `status` = 1 AND affiliated_unit = #{streetId}) temp) AS socialOrgNum, |
| | | WHERE is_society = 1 AND affiliated_unit_type = 1 AND `status` = 1 AND affiliated_unit = #{streetId}) temp) AS socialOrgNum, |
| | | (SELECT COUNT(id) FROM com_act_enterprise WHERE street_id = #{streetId}) AS enterpriseNum, |
| | | (SELECT COUNT(id) FROM com_act_social_worker WHERE community_id = ${communityId} OR street_id = #{streetId}) AS socialWorkerNum, |
| | | (SELECT COUNT(id) FROM com_act_social_project WHERE responsibility_type = 3 AND responsibility_id IN (SELECT id FROM com_act_social_org WHERE community_id = ${communityId} AND is_society = 1)) AS acceptProjectTotal, |