Browse Source

公众参与NPE 修改

master
jianjun 4 years ago
parent
commit
276622a5e4
  1. 1
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java
  2. 21
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenUserJoinServiceImpl.java

1
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java

@ -196,7 +196,6 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService {
Map<String, GridUserCountResultDTO> userCountMap = userCountList.stream().collect(Collectors.toMap(GridUserCountResultDTO::getOrgId, o -> o));
Set<String> agencyIdSet = new HashSet<>();
if (!CollectionUtils.isEmpty(issueTotal)) {
log.error("抽取【公众参与-人均议题】,获取注册用户数为空,customerId:{}", formDTO.getCustomerId());
issueTotal.forEach(issue -> {
String agencyId = issue.getAgencyId();
agencyIdSet.add(agencyId);

21
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenUserJoinServiceImpl.java

@ -85,12 +85,19 @@ public class ScreenUserJoinServiceImpl extends BaseServiceImpl<ScreenUserJoinDao
for (int j = NumConstant.ZERO; j < lastMonthJoinList.size(); j++) {
if (list.get(i).getOrgId().equals(lastMonthJoinList.get(j).getOrgId())) {
ScreenUserJoinEntity entity = ConvertUtils.sourceToTarget(list.get(i), ScreenUserJoinEntity.class);
entity.setJoinTotalUpRate(this.calculateGrowthRateNumber(lastMonthJoinList.get(i).getJoinTotal(), list.get(j).getJoinTotal()));
entity.setJoinTotalUpFlag(this.calculateGrowthRateFlag(lastMonthJoinList.get(i).getJoinTotal(), list.get(j).getJoinTotal()));
entity.setAvgIssueUpRate(this.calculateGrowthRateNumber(lastMonthJoinList.get(i).getAvgIssue(), list.get(j).getAvgIssue()));
entity.setAvgIssueUpFlag(this.calculateGrowthRateFlag(lastMonthJoinList.get(i).getAvgIssue(), list.get(j).getAvgIssue()));
entity.setAgvgJoinUpRate(this.calculateGrowthRateNumber(lastMonthJoinList.get(i).getAvgJoin(), list.get(j).getAvgJoin()));
entity.setAgvgJoinUpFlag(this.calculateGrowthRateFlag(lastMonthJoinList.get(i).getAvgJoin(), list.get(j).getAvgJoin()));
ScreenUserJoinEntity lastJoinEntity = lastMonthJoinList.get(i);
if (lastJoinEntity == null){
lastJoinEntity = new ScreenUserJoinEntity();
lastJoinEntity.setJoinTotal(NumConstant.ZERO);
lastJoinEntity.setAvgIssue(NumConstant.ZERO_DECIMAL);
lastJoinEntity.setAvgJoin(NumConstant.ZERO_DECIMAL);
}
entity.setJoinTotalUpRate(this.calculateGrowthRateNumber(lastJoinEntity.getJoinTotal(), list.get(j).getJoinTotal()));
entity.setJoinTotalUpFlag(this.calculateGrowthRateFlag(lastJoinEntity.getJoinTotal(), list.get(j).getJoinTotal()));
entity.setAvgIssueUpRate(this.calculateGrowthRateNumber(lastJoinEntity.getAvgIssue(), list.get(j).getAvgIssue()));
entity.setAvgIssueUpFlag(this.calculateGrowthRateFlag(lastJoinEntity.getAvgIssue(), list.get(j).getAvgIssue()));
entity.setAgvgJoinUpRate(this.calculateGrowthRateNumber(lastJoinEntity.getAvgJoin(), list.get(j).getAvgJoin()));
entity.setAgvgJoinUpFlag(this.calculateGrowthRateFlag(lastJoinEntity.getAvgJoin(), list.get(j).getAvgJoin()));
curMonthJoinEntityList.add(entity);
}
}
@ -191,4 +198,4 @@ public class ScreenUserJoinServiceImpl extends BaseServiceImpl<ScreenUserJoinDao
return CompareConstant.EQ_STR;
}
}
}
}

Loading…
Cancel
Save