| | |
| | | @ApiModelProperty("一键服务") |
| | | private Integer oneButton; |
| | | @ApiModelProperty("社区工作者") |
| | | private Integer socialWorker; |
| | | private Integer socialWorker = 0; |
| | | @ApiModelProperty("养老认证") |
| | | private Integer pensionAuth; |
| | | @ApiModelProperty("逝世申报") |
| | |
| | | * @param communityId |
| | | * @return |
| | | */ |
| | | BigScreenServiceUser bigScreenServiceUser(@Param("communityId")Long communityId); |
| | | List<BigScreenServiceUser> bigScreenServiceUser(@Param("communityId")Long communityId); |
| | | } |
| | |
| | | limit 10 |
| | | </select> |
| | | <select id="selectTypePercent" resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT t1.filed, t1.num, ROUND( t1.num / t2.sum * 100, 2 ) AS percent, |
| | | SELECT t1.filed, t1.num, ROUND( t1.num / t2.sum * 100, 2 ) AS percent |
| | | FROM |
| | | (SELECT IF(`type` = 1,'议事','投票') AS filed, COUNT(id) AS num FROM com_act_discuss |
| | | WHERE community_id = #{communityId} AND is_del = 2 GROUP BY filed) t1, |
| | |
| | | </select> |
| | | |
| | | <select id="bigScreenServiceData" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenServiceData"> |
| | | select (select count(*) from com_act_work_guide ) guide,(select count(*) from com_act_announcement where community_id = #{communityId}) announcement,(select count(*) from com_elder_auth_elderlies where community_id = #{communityId}) eldersAuth,(select count(*) from com_convenient_merchants where community_id = #{communityId} and is_del =0) convenient, |
| | | (select count(*) from renting_hourse_register where community_id = #{communityId}) rentingHouse,(select count(*) from com_property_alarm where community_id = #{communityId}) oneButton,(select count(*) from com_act_social_worker where community_id = #{communityId}) socialWorker,(select count(*) from com_pension_auth_pensioners where community_id = #{communityId} ) pensionAuth,(select count(*) from com_pb_dyn where community_id = #{communityId} and type = 2) partyDyn,(select count(*) from com_property where community_id = #{communityId} ) property |
| | | select (select count(*) from com_act_work_guide ) guide, |
| | | (select count(*) from com_act_announcement where community_id = #{communityId}) announcement, |
| | | (select count(*) from com_elder_auth_elderlies where community_id = #{communityId}) eldersAuth, |
| | | (select count(*) from com_convenient_merchants where community_id = #{communityId} and is_del =0) convenient, |
| | | (select count(*) from renting_hourse_register where community_id = #{communityId}) rentingHouse, |
| | | (select count(*) from com_property_alarm where community_id = #{communityId}) oneButton, |
| | | (select count(*) from com_pension_auth_pensioners where community_id = #{communityId} ) pensionAuth, |
| | | (select count(*) from com_pb_dyn where community_id = #{communityId} and type = 2) partyDyn, |
| | | (select count(*) from com_property where community_id = #{communityId} ) property |
| | | </select> |
| | | |
| | | <select id="bigScreenServiceUser" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenServiceUser"> |
| | | select t.name,t1.num from com_mng_village t left join (select count(*) num,village_id from com_mng_population where act_id = #{communityId} GROUP BY village_id) t1 on t.village_id = t1.village_id where t.community_id = #{communityId} |
| | | select t.name AS villageName, IF(t1.num IS NULL,0,t1.num) |
| | | from com_mng_village t left join ( |
| | | select count(*) num,village_id |
| | | from com_mng_population |
| | | where act_id = #{communityId} GROUP BY village_id |
| | | ) t1 on t.village_id = t1.village_id where t.community_id = #{communityId} |
| | | </select> |
| | | </mapper> |
| | |
| | | </select> |
| | | <select id="getEventTotalPolylineDate" |
| | | resultType="com.panzhihua.common.model.vos.community.StatisticsCommVO"> |
| | | SELECT SUM(num) AS num FROM ( |
| | | SELECT COUNT(e.id) AS num |
| | | FROM `event` AS e |
| | | LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id |
| | |
| | | UNION ALL SELECT |
| | | COUNT(id) AS num |
| | | FROM com_act_easy_photo WHERE community_id = #{communityId} AND `status` IN (1,2,4) AND del_tag = 0 AND classify_id IN (1,3,4,5,6,7,8) AND DATE_FORMAT( create_at, '%Y%m' ) <= #{date} |
| | | ) temp |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | </select> |
| | | <select id="getScreenPopularMerchants" |
| | | resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO"> |
| | | SELECT * FROM ( |
| | | SELECT id, `name`, consultation_volume, view_num |
| | | FROM com_convenient_merchants |
| | | WHERE community_id = #{pagePopularMerchantDTO.communityId} AND is_del = 0 ORDER BY (consultation_volume + consultation_volume) DESC LIMIT 100 |
| | | ) temp |
| | | </select> |
| | | <update id="deleteMerchantById"> |
| | | UPDATE com_convenient_merchants SET is_del = 1, updated_by = #{operator} WHERE id = #{merchantId} |