Browse Source

网格相关党建能力、治理能力有关 xx率 * 100

master
zxc 5 years ago
parent
commit
3323859ba7
  1. 1
      epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java
  2. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/dataToIndex/impl/CalGridIndexServiceImpl.java

1
epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/constant/NumConstant.java

@ -38,6 +38,7 @@ public interface NumConstant {
int FIFTY_ONE = 51;
int SIXTY = 60;
int ONE_HUNDRED = 100;
BigDecimal ONE_HUNDRED_DECIMAL = new BigDecimal(100);
int ONE_THOUSAND = 1000;
int MAX = 99999999;
int EIGHTY_EIGHT = 88;

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

@ -282,7 +282,7 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
notReturnProjectList.forEach(not -> {
gridIssueShiftProjectRatio.forEach(total -> {
if (not.getGridId().equals(total.getGridId())){
not.setTransferRightRatio(getRound(new BigDecimal(not.getNotReturnProject()/total.getProjectTotal())));
not.setTransferRightRatio(getRound(new BigDecimal(not.getNotReturnProject()/total.getProjectTotal()).multiply(NumConstant.ONE_HUNDRED_DECIMAL)));
}
});
});
@ -319,7 +319,7 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
scoreMap.forEach((k,v) -> {
allScore.set(++v);
});
resultSatisfactionScore.put(gridId,getRound(new BigDecimal(allScore.get()/scoreMap.size())));
resultSatisfactionScore.put(gridId,getRound(new BigDecimal(allScore.get()/scoreMap.size()).multiply(NumConstant.ONE_HUNDRED_DECIMAL)));
});
}
String quarterId = DateUtils.getQuarterId(monthId);
@ -491,7 +491,7 @@ public class CalGridIndexServiceImpl implements CalGridIndexService {
gridProjectTotalList.forEach(project -> {
gridIssueTotalList.forEach(issue -> {
if (project.getGridId().equals(issue.getGridId())) {
project.setIssueToProjectRatio(getRound(new BigDecimal(project.getProjectTotal() / issue.getIssueTotal())));
project.setIssueToProjectRatio(getRound(new BigDecimal(project.getProjectTotal() / issue.getIssueTotal()).multiply(NumConstant.ONE_HUNDRED_DECIMAL)));
}
});
});

Loading…
Cancel
Save