springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/civil/CivilConvenienceStatisticsVO.java
New file @@ -0,0 +1,34 @@ package com.panzhihua.common.model.vos.community.screen.civil; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data @ApiModel("民生统计便民服务返回参数") public class CivilConvenienceStatisticsVO { @ApiModelProperty("办事指南") private Integer guideNum; @ApiModelProperty("疫情防控") private Integer situationNum; @ApiModelProperty("房屋租赁") private Integer leaseNum; @ApiModelProperty("报事报修") private Integer repairNum; @ApiModelProperty("养老认证") private Integer pensionNum; @ApiModelProperty("高龄认证") private Integer eldersNum; @ApiModelProperty("低保认证") private Integer subsistenceNum; @ApiModelProperty("高龄补贴") private Integer allowanceNum; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/civil/CivilGovernmentStatisticsVO.java
New file @@ -0,0 +1,34 @@ package com.panzhihua.common.model.vos.community.screen.civil; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data @ApiModel("民生统计社区治理返回参数") public class CivilGovernmentStatisticsVO { @ApiModelProperty("通知公告") private Integer noticeNum; @ApiModelProperty("议事投票") private Integer discussNum; @ApiModelProperty("随手拍") private Integer easyNum; @ApiModelProperty("邻里圈") private Integer neighborNum; @ApiModelProperty("居民活动") private Integer activityNum; @ApiModelProperty("社区动态") private Integer dynNum; @ApiModelProperty("爱心义仓") private Integer loveNum; @ApiModelProperty("居民留言板") private Integer messageNum; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/civil/CivilGridStatisticsVO.java
New file @@ -0,0 +1,34 @@ package com.panzhihua.common.model.vos.community.screen.civil; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data @ApiModel("民生统计社区治理返回参数") public class CivilGridStatisticsVO { @ApiModelProperty("今日突发事件") private Integer tfTodayNum; @ApiModelProperty("今日治安防控") private Integer zaTodayNum; @ApiModelProperty("今日民生服务") private Integer msTodayNum; @ApiModelProperty("今日矛盾劝解") private Integer mdTodayNum; @ApiModelProperty("今日特殊人群服务") private Integer tsTodayNum; @ApiModelProperty("累计事件") private Integer eventNum; @ApiModelProperty("电子巡查统计") private Integer xcNum; @ApiModelProperty("安全巡查") private Integer securityNum; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/civil/CivilPartyStatisticsVO.java
New file @@ -0,0 +1,34 @@ package com.panzhihua.common.model.vos.community.screen.civil; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; @Data @ApiModel("民生统计党建返回参数") public class CivilPartyStatisticsVO { @ApiModelProperty("社区两委") private Integer committeeNum; @ApiModelProperty("党建动态") private Integer dynNum; @ApiModelProperty("党建活动") private Integer activityNum; @ApiModelProperty("微心愿") private Integer wishNum; @ApiModelProperty("双报道党员") private Integer partyNum; @ApiModelProperty("党组织") private Integer organizationNum; @ApiModelProperty("志愿者团队") private Integer volunteerNum; @ApiModelProperty("问卷调查") private Integer questionnaireNum; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/screen/civil/CivilStatisticsVO.java
@@ -29,4 +29,16 @@ @ApiModelProperty("环比上月增长率") private BigDecimal rate; @ApiModelProperty("党建引领数据") private CivilPartyStatisticsVO civilPartyStatisticsVO; @ApiModelProperty("社区治理数据") private CivilGovernmentStatisticsVO civilGovernmentStatisticsVO; @ApiModelProperty("网格管理数据") private CivilGridStatisticsVO civilGridStatisticsVO; @ApiModelProperty("便民服务数据") private CivilConvenienceStatisticsVO civilConvenienceStatisticsVO; } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComMngPopulationDAO.java
@@ -7,6 +7,7 @@ import com.panzhihua.common.model.dtos.community.CascadeHouseDTO; import com.panzhihua.common.model.dtos.property.CommonPage; import com.panzhihua.common.model.vos.community.*; import com.panzhihua.common.model.vos.community.screen.civil.*; import com.panzhihua.service_community.model.dos.ComMngPopulationCommunityTagsDO; import org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.Mapper; @@ -25,8 +26,6 @@ import com.panzhihua.common.model.dtos.grid.admin.PageComMngVillagePopulationDTO; import com.panzhihua.common.model.dtos.user.PageInputUserDTO; import com.panzhihua.common.model.vos.area.AreaAddressVO; import com.panzhihua.common.model.vos.community.screen.civil.CivilPopulationStatisticsVO; import com.panzhihua.common.model.vos.community.screen.civil.CivilVillageStatisticsVO; import com.panzhihua.common.model.vos.community.screen.event.*; import com.panzhihua.common.model.vos.community.screen.index.*; import com.panzhihua.common.model.vos.grid.EventGridDataVO; @@ -615,4 +614,12 @@ * @param newUnitNo 新单元号 */ void updatePopulationUnit(@Param("villageId") Long villageId, @Param("floor") String floor,@Param("oldUnitNo") String oldUnitNo,@Param("newUnitNo") String newUnitNo); CivilPartyStatisticsVO getCivilParty(@Param("communityId") Long communityId); CivilGovernmentStatisticsVO getCivilGovernment(@Param("communityId") Long communityId); CivilGridStatisticsVO getCivilGrid(@Param("communityId") Long communityId); CivilConvenienceStatisticsVO getCivilConvenience(@Param("communityId") Long communityId); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
@@ -9,6 +9,7 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper; import com.baomidou.mybatisplus.core.conditions.segments.MergeSegments; import com.panzhihua.common.model.vos.community.screen.civil.*; import com.panzhihua.common.utlis.*; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Value; @@ -41,9 +42,6 @@ import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.*; import com.panzhihua.common.model.vos.community.bigscreen.BigScreenStatisticPartyBuild; import com.panzhihua.common.model.vos.community.screen.civil.CivilPopulationStatisticsVO; import com.panzhihua.common.model.vos.community.screen.civil.CivilStatisticsVO; import com.panzhihua.common.model.vos.community.screen.civil.CivilVillageStatisticsVO; import com.panzhihua.common.model.vos.community.screen.event.*; import com.panzhihua.common.model.vos.community.screen.event.EventTransferRecordVO; import com.panzhihua.common.model.vos.community.screen.index.*; @@ -7129,6 +7127,23 @@ List<CivilVillageStatisticsVO> villageStatisticsList = this.baseMapper.getCivilScreenVillageList(communityId); civilStatisticsVO.setVillageStatisticsList(villageStatisticsList); //查询党建引领数据 CivilPartyStatisticsVO civilParty = this.baseMapper.getCivilParty(communityId); if(civilParty != null){ civilStatisticsVO.setCivilPartyStatisticsVO(civilParty); } //查询社区治理数据 CivilGovernmentStatisticsVO civilGovernment = this.baseMapper.getCivilGovernment(communityId); if(civilGovernment != null){ civilStatisticsVO.setCivilGovernmentStatisticsVO(civilGovernment); } //查询网格管理数据 CivilGridStatisticsVO civilGrid = this.baseMapper.getCivilGrid(communityId); if(civilGrid != null){ civilStatisticsVO.setCivilGridStatisticsVO(civilGrid); } //查询便民服务数据 return R.ok(civilStatisticsVO); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComMngPopulationDOMapper.xml
@@ -637,4 +637,177 @@ <update id="updatePopulationUnit"> update com_mng_population set unit_no = #{newUnitNo} where village_id = #{villageId} and floor = #{floor} and unit_no = #{oldUnitNo} </update> <select id="getCivilParty" resultType="com.panzhihua.common.model.vos.community.screen.civil.CivilPartyStatisticsVO"> SELECT count( id ) as committeeNum, (select count(id) from com_pb_dyn where community_id = #{communityId} and `type` = 1) as dynNum, (select count(id) from com_pb_activity where community_id = #{communityId}) as activityNum, (select count(id) from com_act_micro_wish where community_id = #{communityId}) as wishNum, (select count(id) from com_pb_member where community_id = #{communityId} and audit_result = 1) as partyNum, (select count(id) from com_pb_org where community_id = #{communityId} and parent_id = 0) as organizationNum, (select count(id) from com_mng_volunteer_mng where community_id = #{communityId} and state = 2) as volunteerNum, (select count(id) from com_act_questnaire where community_id = #{communityId}) as questionnaireNum FROM com_pb_member_role WHERE community_id = #{communityId} </select> <select id="getCivilGovernment" resultType="com.panzhihua.common.model.vos.community.screen.civil.CivilGovernmentStatisticsVO"> SELECT count( id ) as noticeNum, (select count(id) from com_act_discuss where community_id = #{communityId} and is_del = 2) as discussNum, (select count(id) from com_act_easy_photo where community_id = #{communityId} and del_tag = 0) as easyNum, (select count(id) from com_act_neighbor_circle where community_id = #{communityId} and is_del = 2) as neighborNum, (select count(id) from com_act_activity where community_id = #{communityId}) as activityNum, (select count(id) from com_act_dyn where community_id = #{communityId}) as dynNum, (select count(id) from com_act_warehouse_donates where community_id = #{communityId}) as loveNum, (select count(id) from com_act_message where community_id = #{communityId}) as messageNum FROM com_act_announcement WHERE community_id = #{communityId} </select> <select id="getCivilGrid" resultType="com.panzhihua.common.model.vos.community.screen.civil.CivilGridStatisticsVO"> SELECT count( e.id ) AS tfTodayNum, ( SELECT count( e1.id ) FROM `event` AS e1 LEFT JOIN event_grid_data AS egd1 ON egd1.id = e1.grid_id WHERE egd1.grid_community_id = #{communityId} AND e1.event_status = 2 AND e1.event_type = 1 AND e1.event_category = 1 AND e1.create_at BETWEEN DATE_FORMAT( NOW(), '%Y-%m-%d 00:00:00' ) AND DATE_FORMAT( NOW(), '%Y-%m-%d 23:59:59' )) AS zaTodayNum, ( SELECT count( e2.id ) FROM `event` AS e2 LEFT JOIN event_grid_data AS egd2 ON egd2.id = e2.grid_id WHERE egd2.grid_community_id = #{communityId} AND e2.event_status = 2 AND e2.event_type = 2 AND e2.event_category = 1 AND e2.create_at BETWEEN DATE_FORMAT( NOW(), '%Y-%m-%d 00:00:00' ) AND DATE_FORMAT( NOW(), '%Y-%m-%d 23:59:59' )) AS msTodayNum, ( SELECT count( e3.id ) FROM `event` AS e3 LEFT JOIN event_grid_data AS egd3 ON egd3.id = e3.grid_id WHERE egd3.grid_community_id = #{communityId} AND e3.event_status = 2 AND e3.event_type = 3 AND e3.event_category = 1 AND e3.create_at BETWEEN DATE_FORMAT( NOW(), '%Y-%m-%d 00:00:00' ) AND DATE_FORMAT( NOW(), '%Y-%m-%d 23:59:59' )) AS mdTodayNum, ( SELECT count( e4.id ) FROM `event` AS e4 LEFT JOIN event_grid_data AS egd4 ON egd4.id = e4.grid_id WHERE egd4.grid_community_id = #{communityId} AND e4.event_status = 2 AND e4.event_type = 6 AND e4.event_category = 1 AND e4.create_at BETWEEN DATE_FORMAT( NOW(), '%Y-%m-%d 00:00:00' ) AND DATE_FORMAT( NOW(), '%Y-%m-%d 23:59:59' )) AS tsTodayNum, ( SELECT count( e5.id ) FROM `event` AS e5 LEFT JOIN event_grid_data AS egd5 ON egd5.id = e5.grid_id WHERE egd5.grid_community_id = #{communityId} AND e5.event_status = 2 AND e5.event_category = 1 AND e5.create_at BETWEEN DATE_FORMAT( NOW(), '%Y-%m-%d 00:00:00' ) AND DATE_FORMAT( NOW(), '%Y-%m-%d 23:59:59' )) AS eventNum, ( SELECT count( user_id ) FROM sys_user AS su INNER JOIN event_grid_member_relation egmr ON egmr.grid_member_id = su.user_id WHERE egmr.grid_community_id = #{communityId} ) AS xcNum, ( SELECT count( id ) FROM com_sw_patrol_record WHERE community_id = #{communityId} ) AS securityNum FROM `event` AS e LEFT JOIN event_grid_data AS egd ON egd.id = e.grid_id WHERE egd.grid_community_id = #{communityId} AND e.event_status = 2 AND e.event_type = 5 AND e.event_category = 1 AND e.create_at BETWEEN DATE_FORMAT( NOW(), '%Y-%m-%d 00:00:00' ) AND DATE_FORMAT( NOW(), '%Y-%m-%d 23:59:59') </select> <select id="getCivilConvenience" resultType="com.panzhihua.common.model.vos.community.screen.civil.CivilConvenienceStatisticsVO"> SELECT count( id ) AS guideNum, ( SELECT count( carr.id ) FROM com_act_reserve_record AS carr LEFT JOIN com_act_reserve AS car ON car.id = carr.reserve_id WHERE car.title IN ( '返攀登记', '居家隔离', '11月24日之前居家隔离', '2021-11-4之前来攀登记' ) AND carr.community_id = #{communityId} ) AS situationNum, ( SELECT count( id ) FROM renting_hourse_register WHERE community_id = #{communityId} ) AS leaseNum, ( SELECT count( cpr.id ) FROM com_property_repair AS cpr LEFT JOIN com_property AS cp ON cp.id = cpr.property_id WHERE cp.community_id = #{communityId} ) AS repairNum, ( SELECT count( id ) FROM com_pension_auth_records WHERE community_id = #{communityId} ) AS pensionNum, ( SELECT count( id ) FROM com_elder_auth_records WHERE community_id = #{communityId} ) AS eldersNum, ( SELECT count( cmpct.id ) FROM com_mng_population_community_tags AS cmpct INNER JOIN com_mng_population AS cmp ON cmp.id = cmpct.population_id WHERE cmpct.label LIKE '%低保户%' AND cmpct.community_id = #{communityId} ) AS subsistenceNum, ( SELECT count( cmpct.id ) FROM com_mng_population_community_tags AS cmpct INNER JOIN com_mng_population AS cmp ON cmp.id = cmpct.population_id WHERE cmpct.community_id = #{communityId} AND cmp.death = 0 AND cmpct.label LIKE '%高龄老人%' ) AS allowanceNum FROM com_act_work_guide </select> </mapper>