Browse Source

我参与的议题

dev_shibei_match
zxc 5 years ago
parent
commit
1d9068a573
  1. 7
      epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java

7
epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java

@ -563,13 +563,14 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl<IssueVoteSt
if (CollectionUtils.isEmpty(myPartIssuesResult)){ if (CollectionUtils.isEmpty(myPartIssuesResult)){
return new ArrayList<>(); return new ArrayList<>();
} }
List<String> orgIds = myPartIssuesResult.stream().map(m -> m.getGridId()).collect(Collectors.toList()); List<MyPartIssuesResultDTO> collect = myPartIssuesResult.stream().sorted(Comparator.comparing(MyPartIssuesResultDTO::getShiftIssueTime).reversed()).distinct().collect(Collectors.toList());
List<String> orgIds = collect.stream().map(m -> m.getGridId()).collect(Collectors.toList());
Result<List<AllGridsByUserIdResultDTO>> listResult = govOrgOpenFeignClient.getGridListByGridIds(orgIds); Result<List<AllGridsByUserIdResultDTO>> listResult = govOrgOpenFeignClient.getGridListByGridIds(orgIds);
if (!listResult.success()){ if (!listResult.success()){
throw new RenException("查询议题来源网格名称失败......"); throw new RenException("查询议题来源网格名称失败......");
} }
myPartIssuesResult.forEach(m -> listResult.getData().stream().filter(l -> m.getGridId().equals(l.getGridId())).forEach(l -> m.setTopicReleaseGridName(l.getGridName()))); collect.forEach(m -> listResult.getData().stream().filter(l -> m.getGridId().equals(l.getGridId())).forEach(l -> m.setTopicReleaseGridName(l.getGridName())));
return myPartIssuesResult; return collect;
} }
} }
Loading…
Cancel
Save