springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/BigScreenStatisticPartyBuild.java
@@ -21,5 +21,10 @@ private Integer activityCount; @ApiModelProperty(value = "党建宣传数") private Integer dynCount;// 党建动态 @ApiModelProperty(value = "社区党委") private Integer committeeCount; @ApiModelProperty("覆盖率") private Integer coverPercent=0; @ApiModelProperty("单位党组织") private Integer orgPartyCount=0; } springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/bigscreen/IndexReserveSub.java
@@ -10,8 +10,10 @@ @Data @ApiModel("返攀登记居家隔离数据标题数量") public class IndexReserveSub { @ApiModelProperty("标题") private String sub; @ApiModelProperty("标题值") private Integer key; @ApiModelProperty("数量") private Integer num; @ApiModelProperty("总数") private Integer allCount; } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/BigScreenApi.java
@@ -85,4 +85,14 @@ bigscreenPartyactivity(@RequestBody BigScreenStatisticPartyActivityDTO bigScreenStatisticPartyActivityDTO) { return bigScreenService.bigscreenPartyactivity(bigScreenStatisticPartyActivityDTO); } /** * 党员活动折线图 * @param communityId * @return */ @GetMapping("/partyActivityLine") public R partyActivityLine(@RequestParam("communityId")Long communityId){ return null; } } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/BigScreenDAO.java
@@ -60,7 +60,7 @@ @Select("<script> " + " SELECT " + " SUM(CASE TYPE WHEN 1 THEN total ELSE 0 END) as 'orgCount', " + " SUM(CASE TYPE WHEN 2 THEN total ELSE 0 END) as 'memberCount', " + " SUM(CASE TYPE WHEN 3 THEN total ELSE 0 END) as 'activityCount', " + " SUM(CASE TYPE WHEN 4 THEN total ELSE 0 END) as 'dynCount' " + " FROM ( " + " SUM(CASE TYPE WHEN 4 THEN total ELSE 0 END) as 'dynCount',SUM(CASE TYPE WHEN 5 THEN total ELSE 0 END) as 'committeeCount' " + " FROM ( " + " SELECT 1 AS TYPE , COUNT(id) total " + " FROM com_pb_org org " + " WHERE org.community_id = #{communityId} AND STATUS=1 " + " UNION ALL " + " SELECT 2 AS TYPE , COUNT(id) total " + " FROM com_pb_member " @@ -68,7 +68,9 @@ + " SELECT 3 AS TYPE , COUNT(id) total " + " FROM com_pb_activity " + " WHERE community_id = #{communityId} AND STATUS IN (2,3,4,5) " + " UNION ALL " + " SELECT 4 AS TYPE , COUNT(id) total " + " FROM com_pb_dyn " + " WHERE community_id = #{communityId} AND TYPE = 1 " + ") t" + "</script>") + " WHERE community_id = #{communityId} AND TYPE = 1 UNION ALL " + "select 5 AS TYPE,count(id) total from com_pb_member_role " + "where community_id =#{communityId}" + ") t" + "</script>") BigScreenStatisticPartyBuild partybuild(@Param("communityId") Long communityId); @Select("<script> " + " SELECT pm.id, pm.member_id, pm.user_id, pm.name, " + " case " springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActReserveMapper.java
@@ -5,6 +5,8 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.panzhihua.common.model.dtos.community.reserve.ComActReserveMakeStatisticsDTO; import com.panzhihua.common.model.dtos.community.reserve.PageReserveAdminDTO; import com.panzhihua.common.model.vos.community.bigscreen.IndexReserve; import com.panzhihua.common.model.vos.community.bigscreen.IndexReserveSub; import com.panzhihua.common.model.vos.community.reserve.ComActReserveListAdminVO; import com.panzhihua.common.model.vos.community.reserve.ComActReserveMakeLeftStatisticsAdminVO; import com.panzhihua.common.model.vos.community.reserve.ComActReserveMakeRightStatisticsAdminVO; @@ -94,4 +96,31 @@ */ List<ComActReserveIndexVo> getReserveIndexList(@Param("communityId") Long communityId); /** * 首页大屏返攀登记数据统计总数 * @param communityId * @return */ Integer indexBackReserve(@Param("communityId") Long communityId); /** * 首页大屏居家隔离数据统计总数 * @param communityId * @return */ Integer indexHomeQuarantine(@Param("communityId") Long communityId); /** * 首页大屏返攀登记数据统计选项 * @param communityId * @return */ List<IndexReserveSub> indexBackReserveSub(@Param("communityId") Long communityId); /** * 首页大屏居家隔离数据统计选项 * @param communityId * @return */ List<IndexReserveSub> IndexHomeQuarantineSub(@Param("communityId") Long communityId); } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
@@ -127,6 +127,8 @@ private ComEldersAuthStatisticsMapper comEldersAuthStatisticsMapper; @Resource private ComPensionAuthStatisticsDAO comPensionAuthStatisticsDAO; @Resource private ComActReserveMapper comActReserveMapper; @Value("${domain.aesKey:}") private String aesKey; @@ -7798,6 +7800,16 @@ indexInfo.setIndexDynamic(indexDynamic); //返攀登记居家隔离数据统计 IndexReserve indexReserve=new IndexReserve(); IndexBackReserve indexBackReserve=new IndexBackReserve(); indexBackReserve.setCount(comActReserveMapper.indexBackReserve(communityId)); indexBackReserve.setIndexReserveSubList(comActReserveMapper.indexBackReserveSub(communityId)); IndexHomeQuarantine indexHomeQuarantine=new IndexHomeQuarantine(); indexHomeQuarantine.setCount(comActReserveMapper.indexHomeQuarantine(communityId)); indexHomeQuarantine.setIndexReserveSubList(comActReserveMapper.IndexHomeQuarantineSub(communityId)); indexReserve.setIndexBackReserve(indexBackReserve); indexReserve.setIndexHomeQuarantine(indexHomeQuarantine); indexInfo.setIndexReserve(indexReserve); return null; } springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActReserveMapper.xml
@@ -192,4 +192,34 @@ select id,title,type,img_type,img_url,adver_position_top,adver_position_application from com_act_reserve where `status` = 2 and is_del = 2 and community_id = #{communityId} </select> <select id="indexBackReserve" resultType="Integer"> select count(*) from com_act_reserve t LEFT JOIN com_act_reserve_record t3 on t.id=t3.reserve_id where t.community_id = #{communityId} and t.title like '%返攀登记%' </select> <select id="indexHomeQuarantine" resultType="Integer"> select count(*) from com_act_reserve t LEFT JOIN com_act_reserve_record t3 on t.id=t3.reserve_id where t.community_id = #{communityId} and t.title like '%居家隔离%' </select> <select id="indexBackReserveSub" resultType="com.panzhihua.common.model.vos.community.bigscreen.IndexReserveSub"> select a.*,IFNULL(b.num,0) num from (select count(t2.id) as allCount,t1.key from com_act_reserve t LEFT JOIN com_act_reserve_sub t1 on t.id = t1.reserve_id LEFT JOIN com_act_reserve_answer_content t2 on t1.id = t2.reserve_sub_id where t.community_id = #{communityId} and t.title like '%返攀登记%' and t1.`key` in (1,2,3,17,18,19) group by t1.key) a LEFT JOIN (select count(t2.id) as num,t1.key from com_act_reserve t LEFT JOIN com_act_reserve_sub t1 on t.id = t1.reserve_id LEFT JOIN com_act_reserve_answer_content t2 on t1.id = t2.reserve_sub_id where t.community_id = #{communityId} and t.title like '%返攀登记%' and t1.`key` in (1,2,3,17,18,19) and t2.answer_content = '是' group by t1.key) b on a.key = b.key </select> <select id="IndexHomeQuarantineSub" resultType="com.panzhihua.common.model.vos.community.bigscreen.IndexReserveSub"> select a.*,IFNULL(b.num,0) num from (select count(t2.id) as allCount,t1.key from com_act_reserve t LEFT JOIN com_act_reserve_sub t1 on t.id = t1.reserve_id LEFT JOIN com_act_reserve_answer_content t2 on t1.id = t2.reserve_sub_id where t.community_id = #{communityId} and t.title like '%居家隔离%' and t1.`key` in (12,14,16) group by t1.key) a LEFT JOIN (select count(t2.id) as num,t1.key from com_act_reserve t LEFT JOIN com_act_reserve_sub t1 on t.id = t1.reserve_id LEFT JOIN com_act_reserve_answer_content t2 on t1.id = t2.reserve_sub_id where t.community_id = #{communityId} and t.title like '%居家隔离%' and t1.`key` in (12,14,16) and t2.answer_content = '是' group by t1.key) b on a.key = b.key </select> </mapper>