|
@ -155,21 +155,21 @@ public class GrassRootsGovernServiceImpl implements GrassRootsGovernService { |
|
|
// 总参与数6月份比5月份增加了?
|
|
|
// 总参与数6月份比5月份增加了?
|
|
|
int incrTotal = latest.getTotal() - beforeTwoMonth.getTotal(); |
|
|
int incrTotal = latest.getTotal() - beforeTwoMonth.getTotal(); |
|
|
// 总参与数月增长:增加的占5月份的占比???
|
|
|
// 总参与数月增长:增加的占5月份的占比???
|
|
|
BigDecimal monthIncr = BigDecimal.valueOf(incrTotal / beforeTwoMonth.getTotal()); |
|
|
BigDecimal monthIncr = NumConstant.ZERO == beforeTwoMonth.getTotal() ? BigDecimal.ZERO : BigDecimal.valueOf(incrTotal / beforeTwoMonth.getTotal()); |
|
|
latest.setMonthIncr(monthIncr); |
|
|
latest.setMonthIncr(monthIncr); |
|
|
latest.setMonthTrend(monthIncr.compareTo(BigDecimal.ZERO) > 0 ? "incr" : "decr"); |
|
|
latest.setMonthTrend(monthIncr.compareTo(BigDecimal.ZERO) > 0 ? "incr" : "decr"); |
|
|
|
|
|
|
|
|
//人均议题数6月份比五月份增加了?
|
|
|
//人均议题数6月份比五月份增加了?
|
|
|
BigDecimal issueIncrTotal = latest.getAverageIssue().subtract(beforeTwoMonth.getAverageIssue()); |
|
|
BigDecimal issueIncrTotal = latest.getAverageIssue().subtract(beforeTwoMonth.getAverageIssue()); |
|
|
//人均议题数月增长:增加的占5月份的占比???
|
|
|
//人均议题数月增长:增加的占5月份的占比???
|
|
|
BigDecimal issueCompareLatestMonth = issueIncrTotal.divide(beforeTwoMonth.getAverageIssue(),2, RoundingMode.HALF_UP); |
|
|
BigDecimal issueCompareLatestMonth = BigDecimal.ZERO.compareTo(beforeTwoMonth.getAverageIssue()) == 0 ? BigDecimal.ZERO : 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(),2,RoundingMode.HALF_UP); |
|
|
BigDecimal joinCompareLatestMonth = BigDecimal.ZERO.compareTo(beforeTwoMonth.getJoinCompareLatestMonth()) == 0 ? BigDecimal.ZERO : 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"); |
|
|
} |
|
|
} |
|
|