Browse Source

话题数据

master
zxc 5 years ago
parent
commit
63eeb606a4
  1. 2
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java

2
epmet-module/data-report/data-report-server/src/main/java/com/epmet/service/topic/impl/TopicServiceImpl.java

@ -160,7 +160,7 @@ public class TopicServiceImpl implements TopicService {
TopicShiftedCountResultDTO shiftedCount = topicDao.getShiftedCount(agencyId);
Integer collect = topicSummaryInfo.stream().collect(Collectors.summingInt(TopicSummaryInfoResultDTO::getValue));
String ratio;
ratio = collect == NumConstant.ZERO ? NumConstant.ZERO + TopicConstant.RATIO : (shiftedCount.getShiftedIssueCount() / collect) * NumConstant.ONE_HUNDRED + TopicConstant.RATIO;
ratio = collect == NumConstant.ZERO ? NumConstant.ZERO + TopicConstant.RATIO : ((float)shiftedCount.getShiftedIssueCount() / (float)collect) * NumConstant.ONE_HUNDRED + TopicConstant.RATIO;
TopicSummaryInfoResultDTO result = new TopicSummaryInfoResultDTO();
result.setName(TopicConstant.SHIFTED);
result.setRatio(ratio);

Loading…
Cancel
Save