101captain
2022-07-08 49eaaadd7fa643c9101d2b63a9b84ebdda83e02a
Merge remote-tracking branch 'origin/huacheng_test' into huacheng_test
2个文件已修改
27 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleDOMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleDOMapper.xml
@@ -296,7 +296,6 @@
        having serviceTimes<>'' and serviceTime<>''
        order by serviceTime
    </select>
    <select id="institutionalPartyMemberServiceAnalysis"
            resultType="com.panzhihua.common.model.vos.neighbor.PartyMemberAnalysisVO">
        SELECT count(caa.sponsor_id) as serviceTimes,sum(caa.duration) as serviceTime,caa.check_unit_id as unitId
@@ -327,15 +326,12 @@
        left join com_pb_check_unit as cpcu on ca.community_id=cpcu.community_id
        where canc.solve_id&lt;>''
        <if test="beginTime != null">
            and caa.create_at between #{beginTime} and #{endTime}
            and canc.create_at between #{beginTime} and #{endTime}
        </if>
        <if test="belongTo != null and belongTo != ''">
            and belong_to=#{belongTo}
        </if>
        GROUP BY (canc.solve_id)
        having serviceTimes&lt;>'' and serviceTime&lt;>'' and memberName&lt;>''
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -3382,8 +3382,8 @@
            vo.setActiveUserYMonth(activeUserYMonth);
            if (type.equals(BYSTREET) || type.equals(ALLCOMMUNITY) || type.equals(ALLSTREET)){
                //获取其他用户
                vo.setOtherUser(indexDataKanbanVO.getAllUser()-vo.getAllUser());
                vo.setOtherUserRate(getRate(indexDataKanbanVO.getAllUser(),vo.getAllUser()));
                vo.setOtherUser(indexDataKanbanVO.getAllUser()-countUser(vo.getUserProportionTotal()));
                vo.setOtherUserRate(getRate(indexDataKanbanVO.getAllUser(),vo.getOtherUser()));
            }
        return R.ok(vo);
    }
@@ -3459,4 +3459,21 @@
        return count;
    }
    /**
     * 计算当前统计范围内的所有用户数
     * */
    public Integer countUser(List<UserProportion> list){
        Integer count=0;
        if (list.size()>0){
            for (UserProportion proportion : list) {
                if (org.apache.commons.lang3.ObjectUtils.isNotEmpty(proportion)){
                    if (org.apache.commons.lang3.ObjectUtils.isNotEmpty(proportion.getUser())){
                        count+=proportion.getUser();
                    }
                }
            }
        }
        return count;
    }
}