Browse Source

Merge remote-tracking branch 'origin/dev' into dev

master
jianjun 4 years ago
parent
commit
4b9ff3177d
  1. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PublicPartExtractServiceImpl.java
  2. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java

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

@ -103,12 +103,12 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService {
//获取议题月份增量
List<FactIssueGridMonthlyEntity> issueTotal = factIssueGridMonthlyService.getIssueIncCountAndTotalByMonthId(formDTO.getCustomerId(), formDTO.getMonthId());
if (CollectionUtils.isEmpty(issueTotal)) {
log.error("抽取【公众参与-人均议题】,获取议题增量为空,customerId:{}", formDTO.getCustomerId());
log.error("抽取【公众参与-人均议题】,获取议题增量为空,customerId:{},monthId:{}", formDTO.getCustomerId(),formDTO.getMonthId());
return;
}
List<GridUserCountResultDTO> userCountList = factRegUserGridMonthlyService.selectGridUserCount(formDTO.getCustomerId(), formDTO.getMonthId());
if (CollectionUtils.isEmpty(userCountList)) {
log.error("抽取【公众参与-人均议题】,获取注册用户数为空,customerId:{}", formDTO.getCustomerId());
log.error("抽取【公众参与-人均议题】,获取注册用户数为空,customerId:{},monthId:{}", formDTO.getCustomerId(),formDTO.getMonthId());
return;
}
Map<String, GridUserCountResultDTO> userCountMap = userCountList.stream().collect(Collectors.toMap(GridUserCountResultDTO::getOrgId, o -> o));
@ -143,7 +143,7 @@ public class PublicPartExtractServiceImpl implements PublicPartExtractService {
//获取每个网格的应表决人数
List<GridGroupUserCountResultDTO> memberCountList = factOriginGroupMainDailyService.selectDistinctGroupMemberCount(formDTO.getCustomerId(), ProjectConstant.AGENCY_ID);
if (CollectionUtils.isEmpty(memberCountList)) {
log.warn("抽取【公众参与-人均议题】,获取应表决人数为空,customerId:{}", formDTO.getCustomerId());
log.warn("抽取【公众参与-人均议题】,获取应表决人数为空,customerId:{},monthId:{}", formDTO.getCustomerId(),formDTO.getMonthId());
return;
}
gridMemberCount = memberCountList.stream().collect(Collectors.toMap(GridGroupUserCountResultDTO::getOrgId, o -> o.getMemberCount()));

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java

@ -893,8 +893,9 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
subAvgResultDTOS.forEach(sub -> {
finalScore.set(finalScore.get().add(sub.getScore()));
});
BigDecimal divide = finalScore.get().divide(new BigDecimal(subAvgResultDTOS.size()));
BigDecimal divide = finalScore.get().divide(new BigDecimal(subAvgResultDTOS.size()),NumConstant.SIX,BigDecimal.ROUND_HALF_UP);
subAvgScores.forEach(s -> {
// 孔村单独处理
if (s.getAgencyId().equals("1234085031077498881")){
s.setScore(divide);
}

Loading…
Cancel
Save