Browse Source

代码微调

master
jianjun 4 years ago
parent
commit
18c8d2aa7d
  1. 14
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalGridIndexServiceImpl.java

14
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalGridIndexServiceImpl.java

@ -243,7 +243,7 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
}
//网格总议题数目,网格人均议题数目
List<GridIssueCountResultDTO> gridIssueTotalList = issueExtractService.selectIssueTotal(customerId, monthId);
//网格总项目数
//网格总项目数 从议题根据状态获取
List<GridProjectCountResultDTO> gridProjectTotalList = issueExtractService.selectGridProjectCount(customerId, monthId, ExtractConstant.SHIFT_PROJECT);
//网格议题转项目率
List<GridIssueCountResultDTO> gridIssueCountList = issueExtractService.selectIssueTotalTwoMonth(customerId, monthId, DateUtils.minusMonthId(monthId));
@ -277,15 +277,11 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
List<TransferRightRatioResultDTO> transferRightRatioResultDTOS = projectMainService.selectTransferRightRatio(customerId, monthId);
List<TransferRightRatioResultDTO> transferRightRatioResultDTOS1 = projectLogService.selectNotReturn(customerId, monthId);
if (!CollectionUtils.isEmpty(transferRightRatioResultDTOS1)){
transferRightRatioResultDTOS.forEach(r -> {
transferRightRatioResultDTOS1.forEach(t -> {
r.setStatus(r.getProjectId().equals(t.getProjectId()) ? true : false);
});
});
transferRightRatioResultDTOS.forEach(r -> transferRightRatioResultDTOS1.forEach(t -> {
r.setStatus(r.getProjectId().equals(t.getProjectId()));
}));
}else {
transferRightRatioResultDTOS.forEach(r -> {
r.setStatus(false);
});
transferRightRatioResultDTOS.forEach(r -> r.setStatus(false));
}
Map<String, List<TransferRightRatioResultDTO>> groupByGridProject = transferRightRatioResultDTOS.stream().collect(Collectors.groupingBy(TransferRightRatioResultDTO::getGridId));
Map<String,BigDecimal> notReturnMap = new HashMap<>(16);

Loading…
Cancel
Save