diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java index 8ccc906405..95446fac0d 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/IndexServiceImpl.java @@ -57,9 +57,6 @@ public class IndexServiceImpl implements IndexService { if (null == yearAverageIndexResultDTO){ return new YearAverageIndexResultDTO(); } - yearAverageIndexResultDTO.setPartyDevAbility(getRound(yearAverageIndexResultDTO.getPartyDevAbility())); - yearAverageIndexResultDTO.setGovernAbility(getRound(yearAverageIndexResultDTO.getGovernAbility())); - yearAverageIndexResultDTO.setServiceAbility(getRound(yearAverageIndexResultDTO.getServiceAbility())); yearAverageIndexResultDTO.setYearAverageIndex(getRound(yearAverageIndexResultDTO.getPartyDevAbility() + yearAverageIndexResultDTO.getGovernAbility() + yearAverageIndexResultDTO.getServiceAbility())); return yearAverageIndexResultDTO; } @@ -86,10 +83,6 @@ public class IndexServiceImpl implements IndexService { if (null == pieChartDTO) { return new MonthPieChartResultDTO(); } - // 处理小数四舍五入 - pieChartDTO.setPartyDevAbility(getRound(pieChartDTO.getPartyDevAbility())); - pieChartDTO.setGovernAbility(getRound(pieChartDTO.getGovernAbility())); - pieChartDTO.setServiceAbility(getRound(pieChartDTO.getServiceAbility())); return pieChartDTO; } @@ -154,9 +147,6 @@ public class IndexServiceImpl implements IndexService { } // 处理小数四舍五入 monthBarchartResults.forEach(barchart -> { - barchart.setPartyDevAbility(getRound(barchart.getPartyDevAbility())); - barchart.setGovernAbility(getRound(barchart.getGovernAbility())); - barchart.setServiceAbility(getRound(barchart.getServiceAbility())); barchart.setIndexTotal(getRound(barchart.getPartyDevAbility() + barchart.getGovernAbility() + barchart.getServiceAbility())); //四舍五入,保留小数点后两位 barchart.setServiceAblityWeight(barchart.getServiceAblityWeight().setScale(NumConstant.TWO,BigDecimal.ROUND_HALF_UP)); @@ -443,9 +433,6 @@ public class IndexServiceImpl implements IndexService { // 小数四舍五入 streetList.forEach(indexRank -> { indexRank.setOrgType("street"); - indexRank.setPartyDevAbility(getRound(indexRank.getPartyDevAbility())); - indexRank.setGovernAbility(getRound(indexRank.getGovernAbility())); - indexRank.setServiceAbility(getRound(indexRank.getServiceAbility())); indexRank.setTotalIndex(getRound(indexRank.getPartyDevAbility() + indexRank.getGovernAbility() + indexRank.getServiceAbility())); }); return streetList; @@ -455,9 +442,6 @@ public class IndexServiceImpl implements IndexService { // 小数四舍五入 gridList.forEach(indexRank -> { indexRank.setOrgType("grid"); - indexRank.setPartyDevAbility(getRound(indexRank.getPartyDevAbility())); - indexRank.setGovernAbility(getRound(indexRank.getGovernAbility())); - indexRank.setServiceAbility(getRound(indexRank.getServiceAbility())); indexRank.setTotalIndex(getRound(indexRank.getPartyDevAbility() + indexRank.getGovernAbility() + indexRank.getServiceAbility())); }); return gridList; diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml index 8d6109753d..03f4da3f4f 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataMonthlyDao.xml @@ -6,9 +6,9 @@ SELECT month_id AS monthId, - service_ablity * SERVICE_ABLITY_WEIGHT AS serviceAbility, - party_dev_ablity * PARTY_DEV_WEIGHT AS partyDevAbility, - govern_ablity * GOVERN_ABLITY_WEIGHT AS governAbility, + ROUND((ROUND(service_ablity,1) * SERVICE_ABLITY_WEIGHT),1) AS serviceAbility, + ROUND((ROUND(party_dev_ablity,1) * PARTY_DEV_WEIGHT),1) AS partyDevAbility, + ROUND((ROUND(govern_ablity,1) * GOVERN_ABLITY_WEIGHT),1) AS governAbility, ROUND(service_ablity,1) serviceOriginScore, ROUND(party_dev_ablity,1) partyOriginScore, ROUND(govern_ablity,1) governOriginScore, @@ -360,9 +360,9 @@ SELECT scg.GRID_NAME AS NAME, - sy.govern_ablity * sy.GOVERN_ABLITY_WEIGHT AS governAbility, - sy.party_dev_ablity * sy.PARTY_DEV_WEIGHT AS partyDevAbility, - sy.service_ablity * sy.SERVICE_ABLITY_WEIGHT AS serviceAbility, + ROUND((ROUND(sy.govern_ablity,1) * sy.GOVERN_ABLITY_WEIGHT),1) AS governAbility, + ROUND((ROUND(sy.party_dev_ablity,1) * sy.PARTY_DEV_WEIGHT),1) AS partyDevAbility, + ROUND((ROUND(sy.service_ablity,1) * sy.SERVICE_ABLITY_WEIGHT),1) AS serviceAbility, sy.ORG_ID as orgId, scg.area_code as areaCode FROM screen_customer_grid scg diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml index 78c494648b..c65c1bd3b0 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/screen/ScreenIndexDataYearlyDao.xml @@ -6,9 +6,9 @@