Browse Source

Merge remote-tracking branch 'origin/dev_ic_data' into develop

master
yinzuomei 4 years ago
parent
commit
2e7bdb3d38
  1. 23
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java

23
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java

@ -767,10 +767,31 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl<IcUserDemandRecD
if(MapUtils.isNotEmpty(map)){
for(CategoryAnalysisDTO result:list){
if (map.containsKey(result.getCategoryCode()) && null != map.get(result.getCategoryCode())) {
result.setDetail(map.get(result.getCategoryCode()).getDetail());
//如果当前分类下有上报的需求,将原来的0改为实际的需求数量
CategoryAnalysisDTO tempDto=map.get(result.getCategoryCode());
result.setTotal(tempDto.getTotal());
//当前分类有居民的明细:未完成多少个,xxx个志愿者完成xxx个需求
if(CollectionUtils.isNotEmpty(tempDto.getDetail())){
List<CategoryAnalysisDetail> resDetailList=tempDto.getDetail();
Map<String, CategoryAnalysisDetail> detailMap = resDetailList.stream().collect(Collectors.toMap(CategoryAnalysisDetail::getLegendCode, dto -> dto));
//遍历之前构造好的图例
for(CategoryAnalysisDetail resultDetail:result.getDetail()){
if(detailMap.containsKey(resultDetail.getLegendCode())&&null!=detailMap.get(resultDetail.getLegendCode())){
resultDetail.setTotalService(detailMap.get(resultDetail.getLegendCode()).getTotalService());
resultDetail.setServiceDemandTotal(detailMap.get(resultDetail.getLegendCode()).getServiceDemandTotal());
}
}
}
}
}
}
}
//返回结果,也不知道对不对

Loading…
Cancel
Save