党支部数量
This commit is contained in:
@ -47,7 +47,10 @@ public class EventPartyBranchServiceImpl extends ServiceImpl<EventPartyBranchMap
|
|||||||
List<EventPartyBranch> list = this.list(queryMember);
|
List<EventPartyBranch> list = this.list(queryMember);
|
||||||
//查询党员总数量
|
//查询党员总数量
|
||||||
int memberCount = list.size();
|
int memberCount = list.size();
|
||||||
int branchCount = (int) list.stream().map(EventPartyBranch::getBelongBranchName).distinct().count();
|
|
||||||
|
|
||||||
|
Map<String, List<EventPartyBranch>> listMap = list.stream().collect(Collectors.groupingBy(EventPartyBranch::getBranchCode));
|
||||||
|
int branchCount = listMap.keySet().stream().mapToInt(k -> (int) listMap.get(k).stream().map(EventPartyBranch::getBelongBranchName).distinct().count()).sum();
|
||||||
|
|
||||||
map.put("branch", branchCount);
|
map.put("branch", branchCount);
|
||||||
map.put("member", memberCount);
|
map.put("member", memberCount);
|
||||||
|
Reference in New Issue
Block a user