Browse Source

计算问题

dev
sunyuchao 3 years ago
parent
commit
61a0002183
  1. 4
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenPyHistoryScoreServiceImpl.java

4
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcoll/impl/ScreenPyHistoryScoreServiceImpl.java

@ -188,7 +188,7 @@ public class ScreenPyHistoryScoreServiceImpl implements ScreenPyHistoryScoreServ
} }
if (!CollectionUtils.isEmpty(result.getData())) { if (!CollectionUtils.isEmpty(result.getData())) {
GridLivelyResultDTO gridLively = result.getData().get(NumConstant.ZERO); GridLivelyResultDTO gridLively = result.getData().get(NumConstant.ZERO);
String score = (gridLively.getGridSumNum() <= 0) ? "0" : numberFormat.format(((float) gridLively.getGridLivelyNum() / (float) gridLively.getGridSumNum()) * 100 + (gridLively.getGridOrdinaryNum() / gridLively.getGridSumNum()) * 80); String score = (gridLively.getGridSumNum() <= 0) ? "0" : numberFormat.format(((float) gridLively.getGridLivelyNum() / (float) gridLively.getGridSumNum()) * 100 + ((float)gridLively.getGridOrdinaryNum() / (float)gridLively.getGridSumNum()) * 80);
resultDTO.setScore(score); resultDTO.setScore(score);
} }
} else if ("event".equals(formDTO.getType())) { } else if ("event".equals(formDTO.getType())) {
@ -202,7 +202,7 @@ public class ScreenPyHistoryScoreServiceImpl implements ScreenPyHistoryScoreServ
HistoryScoreSjffResultDTO dto2 = screenPyHistoryScoreDao.sumProjectScore(formDTO); HistoryScoreSjffResultDTO dto2 = screenPyHistoryScoreDao.sumProjectScore(formDTO);
//查询街道下有效网格员数 //查询街道下有效网格员数
HistoryScoreSjffResultDTO dto3 = screenPyHistoryScoreDao.sumGridNum(formDTO); HistoryScoreSjffResultDTO dto3 = screenPyHistoryScoreDao.sumGridNum(formDTO);
String score = numberFormat.format(((float) dto1.getEventScore() / (float) dto3.getGridStaffNum()) + (dto2.getProjectScore() / dto3.getGridStaffNum())); String score = numberFormat.format(((float) dto1.getEventScore() / (float) dto3.getGridStaffNum()) + ((float)dto2.getProjectScore() / (float)dto3.getGridStaffNum()));
resultDTO.setScore(score); resultDTO.setScore(score);
} }
return resultDTO; return resultDTO;

Loading…
Cancel
Save