Browse Source

支部建设接口v3

dev_shibei_match
yinzuomei 4 years ago
parent
commit
dc7c29270d
  1. 4
      epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/result/GroupActRankDetailDTO.java
  2. 25
      epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/impl/ResiGroupServiceImpl.java

4
epmet-module/data-aggregator/data-aggregator-client/src/main/java/com/epmet/dataaggre/dto/resigroup/result/GroupActRankDetailDTO.java

@ -18,6 +18,6 @@ public class GroupActRankDetailDTO implements Serializable {
private String categoryName;
private Integer organizeTotal;
private Integer participateUserTotal;
private String organizeName="组织总次数";
private String participateUserName="参加总人数";
private String organizeName;
private String participateUserName;
}

25
epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/resigroup/impl/ResiGroupServiceImpl.java

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

Loading…
Cancel
Save