diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/SubAgencyIndexRankResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/SubAgencyIndexRankResultDTO.java index af9d6caf5e..ae70697765 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/SubAgencyIndexRankResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/evaluationindex/screen/dto/result/SubAgencyIndexRankResultDTO.java @@ -27,16 +27,19 @@ public class SubAgencyIndexRankResultDTO implements Serializable { * 党建能力 */ private Double governAbility = 0.0; + private Double originGovernAbility = 0.0; /** * 治理能力 */ private Double partyDevAbility = 0.0; + private Double originPartyDevAbility = 0.0; /** * 服务能力 */ private Double serviceAbility = 0.0; + private Double originServiceAbility = 0.0; private String orgId; private String orgType; 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/fact/FactIndexAgencyScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencyScoreDao.xml index 214385cc29..04fcae2efd 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencyScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencyScoreDao.xml @@ -6,7 +6,7 @@ SELECT fact.month_id AS "monthId", - ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal", + ROUND(ROUND(fact.score,1)*fact.WEIGHT, 1) AS "indexTotal", ROUND(fact.score,1) AS "indexTotalOriginScore", fact.WEIGHT AS "indexTotalSupWeight", - ROUND(self.self_score*fact.WEIGHT, 1) AS "agencyScore", - ROUND(self.sub_score*fact.WEIGHT, 1) AS "subAgencyScore", + ROUND(ROUND(self.self_score,1)*fact.WEIGHT, 1) AS "agencyScore", + ROUND(ROUND(self.sub_score,1)*fact.WEIGHT, 1) AS "subAgencyScore", fact.index_code AS "indexCode", self.SELF_WEIGHT AS "selfWeight", self.SUB_WEIGHT AS "subWeight" diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml index aafd8dd25b..17354e06f7 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexAgencySubScoreDao.xml @@ -7,10 +7,10 @@ SELECT fact.index_code AS "key", IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "value", - fact.score AS score, + round(fact.score,1) AS score, dict.index_name AS "name", round(fact.WEIGHT,2) AS weight, - (fact.SCORE * fact.WEIGHT) AS weightedScore + round(round(fact.SCORE,1) * fact.WEIGHT,1) AS weightedScore FROM fact_index_agency_sub_score fact LEFT JOIN index_dict dict ON fact.index_code = dict.index_code diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunityScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunityScoreDao.xml index 8bb86a24b3..5f77c4950d 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunityScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunityScoreDao.xml @@ -6,7 +6,7 @@ SELECT fact.month_id AS "monthId", - ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal", + ROUND(ROUND(fact.score,1)*fact.WEIGHT, 1) AS "indexTotal", ROUND(fact.score,1) AS "indexTotalOriginScore", fact.WEIGHT AS "indexTotalSupWeight", - ROUND(self.self_score*fact.WEIGHT, 1) AS "agencyScore", - ROUND(self.sub_score*fact.WEIGHT, 1) AS "subAgencyScore", + ROUND(ROUND(self.self_score,1)*fact.WEIGHT, 1) AS "agencyScore", + ROUND(ROUND(self.sub_score,1)*fact.WEIGHT, 1) AS "subAgencyScore", fact.index_code AS "indexCode", self.SELF_WEIGHT AS "selfWeight", self.SUB_WEIGHT AS "subWeight" diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunitySubScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunitySubScoreDao.xml index 37290ed60a..11a9f85a9b 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunitySubScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexCommunitySubScoreDao.xml @@ -8,9 +8,9 @@ fact.index_code AS "key", IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "value", dict.index_name AS "name", - fact.score AS score, + round(fact.score,1) AS score, round(fact.WEIGHT,2) AS weight, - (fact.SCORE * fact.WEIGHT) AS weightedScore + round(round(fact.SCORE,1) * fact.WEIGHT,1) AS weightedScore FROM fact_index_community_sub_score fact LEFT JOIN index_dict dict ON fact.index_code = dict.index_code diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridScoreDao.xml index 9be33bd524..c152cbd144 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridScoreDao.xml @@ -6,7 +6,7 @@ SELECT fact.month_id AS "monthId", - ROUND(fact.score*fact.WEIGHT, 1) AS "indexTotal", + ROUND(ROUND(fact.score,1)*fact.WEIGHT, 1) AS "indexTotal", ROUND(fact.score,1) AS "indexTotalOriginScore", fact.WEIGHT AS "indexTotalSupWeight", - ROUND(self.self_score*fact.WEIGHT, 1) AS "agencyScore", - ROUND(self.sub_score*fact.WEIGHT, 1) AS "subAgencyScore", + ROUND(ROUND(self.self_score,1)*fact.WEIGHT, 1) AS "agencyScore", + ROUND(ROUND(self.sub_score,1)*fact.WEIGHT, 1) AS "subAgencyScore", fact.index_code AS "indexCode", self.SELF_WEIGHT AS "selfWeight", self.SUB_WEIGHT AS "subWeight" diff --git a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridSubScoreDao.xml b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridSubScoreDao.xml index 1fda25b3ac..f3127095e7 100644 --- a/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridSubScoreDao.xml +++ b/epmet-module/data-report/data-report-server/src/main/resources/mapper/fact/FactIndexGridSubScoreDao.xml @@ -8,9 +8,9 @@ fact.index_code AS "key", IF(fact.origin_value='',0,IFNULL(fact.origin_value,0)) AS "value", dict.index_name AS "name", - fact.score AS score, + round(fact.score,1) AS score, round(fact.WEIGHT,2) AS weight, - (fact.SCORE * fact.WEIGHT) AS weightedScore + round(round(fact.SCORE,1) * fact.WEIGHT,1) AS weightedScore FROM fact_index_grid_sub_score fact LEFT JOIN index_dict dict ON fact.index_code = dict.index_code 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..8b4eed6642 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, @@ -88,9 +88,9 @@ resultType="com.epmet.evaluationindex.screen.dto.result.AnNingSubAgencyIndexRankResultDTO"> SELECT score.org_name AS `NAME`, - score.service_ablity * score.SERVICE_ABLITY_WEIGHT AS serviceAbility, - score.party_dev_ablity * score.PARTY_DEV_WEIGHT AS partyDevAbility, - score.govern_ablity * score.GOVERN_ABLITY_WEIGHT AS governAbility, + ROUND(ROUND(score.service_ablity,1) * score.SERVICE_ABLITY_WEIGHT, 1) AS serviceAbility, + ROUND(ROUND(score.party_dev_ablity,1) * score.PARTY_DEV_WEIGHT, 1) AS partyDevAbility, + ROUND(ROUND(score.govern_ablity,1) * score.GOVERN_ABLITY_WEIGHT, 1) AS governAbility, score.PARTY_DEV_WEIGHT AS partyWeight, score.GOVERN_ABLITY_WEIGHT AS governWeight, score.SERVICE_ABLITY_WEIGHT AS serviceWeight, @@ -156,13 +156,13 @@ org_id AS "orgId", org_name AS "orgName", - round((party_dev_ablity * party_dev_weight),1) AS "score" + round(round(party_dev_ablity,1) * party_dev_weight,1) AS "score" - round((govern_ablity * govern_ablity_weight),1) AS "score" + round(round(govern_ablity,1) * govern_ablity_weight,1) AS "score" - round((service_ablity * service_ablity_weight),1) AS "score" + round(round(service_ablity,1) * service_ablity_weight,1) AS "score" FROM screen_index_data_monthly @@ -360,9 +360,12 @@ 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 @@ -406,9 +409,9 @@ resultType="com.epmet.evaluationindex.screen.dto.result.AnNingSubAgencyIndexRankResultDTO"> SELECT score.org_name AS `NAME`, - score.service_ablity * score.SERVICE_ABLITY_WEIGHT AS serviceAbility, - score.party_dev_ablity * score.PARTY_DEV_WEIGHT AS partyDevAbility, - score.govern_ablity * score.GOVERN_ABLITY_WEIGHT AS governAbility, + ROUND(ROUND(score.service_ablity,1)*score.SERVICE_ABLITY_WEIGHT, 1)AS serviceAbility, + ROUND(ROUND(score.party_dev_ablity,1) * score.PARTY_DEV_WEIGHT, 1) AS partyDevAbility, + ROUND(ROUND(score.govern_ablity,1) * score.GOVERN_ABLITY_WEIGHT, 1) AS governAbility, score.PARTY_DEV_WEIGHT AS partyWeight, score.GOVERN_ABLITY_WEIGHT AS governWeight, score.SERVICE_ABLITY_WEIGHT AS serviceWeight, 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 @@