|
|
@ -293,16 +293,37 @@ public class ResiGroupServiceImpl implements ResiGroupService { |
|
|
|
resultDTO.setOrgName(orgInfo.getOrgName()); |
|
|
|
resultDTO.setOrgType(orgInfo.getOrgType()); |
|
|
|
if(!CollectionUtils.isEmpty(actCategoryDictDTOList)){ |
|
|
|
|
|
|
|
List<GroupActRankDetailDTO> detailList=new ArrayList<>(); |
|
|
|
List<GroupActRankDetailDTO> detailRecords=dataStatsService.selectGroupActRankDetail(formDTO.getCustomerId(),dateId,orgInfo.getOrgId(),actCategoryDictDTOList); |
|
|
|
Map<String, GroupActRankDetailDTO> map = detailRecords.stream().collect(Collectors.toMap(GroupActRankDetailDTO::getCategoryCode, a -> a, (k1, k2) -> k1)); |
|
|
|
|
|
|
|
for(ActCategoryDictDTO actCategoryDictDTO:actCategoryDictDTOList){ |
|
|
|
GroupActRankDetailDTO temp=new GroupActRankDetailDTO(); |
|
|
|
temp.setCategoryCode(actCategoryDictDTO.getCategoryCode()); |
|
|
|
temp.setCategoryName(actCategoryDictDTO.getCategoryName()); |
|
|
|
temp.setOrganizeName("组织总次数"); |
|
|
|
temp.setParticipateUserName("参加总人数"); |
|
|
|
if(map.containsKey(actCategoryDictDTO.getCategoryCode())){ |
|
|
|
temp.setOrganizeTotal(map.get(actCategoryDictDTO.getCategoryCode()).getOrganizeTotal()); |
|
|
|
temp.setParticipateUserTotal(map.get(actCategoryDictDTO.getCategoryCode()).getParticipateUserTotal()); |
|
|
|
}else{ |
|
|
|
temp.setOrganizeTotal(NumConstant.ZERO); |
|
|
|
temp.setParticipateUserTotal(NumConstant.ZERO); |
|
|
|
} |
|
|
|
detailList.add(temp); |
|
|
|
} |
|
|
|
resultDTO.setCategoryList(detailList); |
|
|
|
|
|
|
|
int organizeTotal = NumConstant.ZERO; |
|
|
|
int participateUserTotal = NumConstant.ZERO; |
|
|
|
List<GroupActRankDetailDTO> detailList=dataStatsService.selectGroupActRankDetail(formDTO.getCustomerId(),dateId,orgInfo.getOrgId(),actCategoryDictDTOList); |
|
|
|
for(GroupActRankDetailDTO deatil:detailList){ |
|
|
|
organizeTotal+=deatil.getOrganizeTotal(); |
|
|
|
participateUserTotal+=deatil.getParticipateUserTotal(); |
|
|
|
} |
|
|
|
resultDTO.setOrganizeTotal(organizeTotal); |
|
|
|
resultDTO.setParticipateUserTotal(participateUserTotal); |
|
|
|
resultDTO.setCategoryList(detailList); |
|
|
|
|
|
|
|
} |
|
|
|
resultDTOList.add(resultDTO); |
|
|
|
} |
|
|
|