Browse Source

Merge remote-tracking branch 'origin/dev'

dev_shibei_match
yinzuomei 4 years ago
parent
commit
b22ef0be25
  1. 5
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java

5
epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/GrassRootsGovernServiceImpl.java

@ -26,6 +26,7 @@ import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
@ -161,14 +162,14 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService {
//人均议题数6月份比五月份增加了? //人均议题数6月份比五月份增加了?
BigDecimal issueIncrTotal = latest.getAverageIssue().subtract(beforeTwoMonth.getAverageIssue()); BigDecimal issueIncrTotal = latest.getAverageIssue().subtract(beforeTwoMonth.getAverageIssue());
//人均议题数月增长:增加的占5月份的占比??? //人均议题数月增长:增加的占5月份的占比???
BigDecimal issueCompareLatestMonth = issueIncrTotal.divide(beforeTwoMonth.getAverageIssue()); BigDecimal issueCompareLatestMonth = issueIncrTotal.divide(beforeTwoMonth.getAverageIssue(),2, RoundingMode.HALF_UP);
latest.setIssueCompareLatestMonth(issueCompareLatestMonth); latest.setIssueCompareLatestMonth(issueCompareLatestMonth);
latest.setIssueCompareLatestTrend(issueCompareLatestMonth.compareTo(BigDecimal.ZERO) > 0 ? "incr" : "decr"); latest.setIssueCompareLatestTrend(issueCompareLatestMonth.compareTo(BigDecimal.ZERO) > 0 ? "incr" : "decr");
// 平均参与度6月份比5月份增加了? // 平均参与度6月份比5月份增加了?
BigDecimal incrJoinCompareLatestMonth=latest.getJoinCompareLatestMonth().subtract(beforeTwoMonth.getJoinCompareLatestMonth()); BigDecimal incrJoinCompareLatestMonth=latest.getJoinCompareLatestMonth().subtract(beforeTwoMonth.getJoinCompareLatestMonth());
//平均参与度月增长:增加的占5月份的占比??? //平均参与度月增长:增加的占5月份的占比???
BigDecimal joinCompareLatestMonth=incrJoinCompareLatestMonth.divide(beforeTwoMonth.getJoinCompareLatestMonth()); BigDecimal joinCompareLatestMonth=incrJoinCompareLatestMonth.divide(beforeTwoMonth.getJoinCompareLatestMonth(),2,RoundingMode.HALF_UP);
latest.setJoinCompareLatestMonth(joinCompareLatestMonth); latest.setJoinCompareLatestMonth(joinCompareLatestMonth);
latest.setJoinCompareLatestTrend(joinCompareLatestMonth.compareTo(BigDecimal.ZERO) > 0 ? "incr" : "decr"); latest.setJoinCompareLatestTrend(joinCompareLatestMonth.compareTo(BigDecimal.ZERO) > 0 ? "incr" : "decr");
} }

Loading…
Cancel
Save