springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActActivityDAO.java
@@ -311,14 +311,14 @@ * @param communityId * @return */ PartyActivityStatics selectActivityStatics(Long communityId); PartyActivityStatics selectActivityStatics(@Param("communityIds") List<Long> communityIds); /** * 党员活动饼状图 * @param communityId * @return */ List<PartyActivityTypeChart> selectActivityChart(Long communityId); List<PartyActivityTypeChart> selectActivityChart(@Param("communityIds") List<Long> communityIds); /** * 党员活动柱状图 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActActivityServiceImpl.java
@@ -1250,8 +1250,14 @@ @Override public R partyMemberCount(Long communityId, String year) { PartyActivityStatics partyActivityStatics=this.comActActivityDAO.selectActivityStatics(communityId); List<PartyActivityTypeChart> partyActivityTypeChart=this.comActActivityDAO.selectActivityChart(communityId); List<Long> communityIds = comActDAO.selectIds(communityId); if (CollUtil.isEmpty(communityIds)){ communityIds = new ArrayList<>(); communityIds.add(communityId); } PartyActivityStatics partyActivityStatics=this.comActActivityDAO.selectActivityStatics(communityIds); List<PartyActivityTypeChart> partyActivityTypeChart=this.comActActivityDAO.selectActivityChart(communityIds); if(partyActivityStatics.getActivityCount()!=null&&partyActivityStatics.getActivityCount()>0){ if(!CollectionUtils.isEmpty(partyActivityTypeChart)){ partyActivityTypeChart.forEach(partyActivityTypeChart1 -> { springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActActivityMapper.xml
@@ -256,12 +256,33 @@ </select> <select id="selectActivityStatics" resultType="com.panzhihua.common.model.vos.community.PartyActivityStatics"> select (select count(*) from com_act_activity where type = 3 and community_id = #{communityId}) activityCount, (select count(*) from com_pb_member where community_id = #{communityId} and audit_result=1 ) memberCount select (select count(*) from com_act_activity where type = 3 <if test="communityIds != null and communityIds.size() != 0"> and community_id in <foreach collection="communityIds" item="item" open="(" separator="," close=")"> #{item} </foreach> </if> ) activityCount, (select count(*) from com_pb_member where audit_result=1 <if test="communityIds != null and communityIds.size() != 0"> and community_id in <foreach collection="communityIds" item="item" open="(" separator="," close=")"> #{item} </foreach> </if> ) memberCount </select> <select id="selectActivityChart" resultType="com.panzhihua.common.model.vos.community.PartyActivityTypeChart"> select count(*) as count,activity_type as name from com_act_activity where type = 3 and community_id =#{communityId} GROUP BY activity_type select count(*) as count,activity_type as name from com_act_activity where type = 3 <if test="communityIds != null and communityIds.size() != 0"> and community_id in <foreach collection="communityIds" item="item" open="(" separator="," close=")"> #{item} </foreach> </if> GROUP BY activity_type </select> <select id="selectActivityLine" resultType="integer">