| | |
| | | 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); |
| | | } |
| | |
| | | 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; |
| | | } |
| | | |
| | | } |