From 6f5c7b537554a19c86b647c723224c22217a7fc9 Mon Sep 17 00:00:00 2001 From: jianjun Date: Thu, 27 May 2021 14:29:11 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=B9=E6=AE=8A=E5=A4=84=E7=90=86=E4=B8=8B%d?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/datareport/constant/IndexConstant.java | 14 ++++++++------ .../index/impl/IndexExplainServiceImpl.java | 11 ++++++++++- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/constant/IndexConstant.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/constant/IndexConstant.java index af1ae3588d..e6a4b3bfac 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/constant/IndexConstant.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/constant/IndexConstant.java @@ -18,12 +18,12 @@ public class IndexConstant { public static final List ScoreLastHeader = Arrays.asList("指标值", "得分", "权重"); public static final List QuantityLastHeader = Arrays.asList("数量", "平均值", "权重"); - private static final String DJZS_CN = "党建指数"; - private static final String FWZS_CN = "服务指数"; - private static final String ZLZS_CN = "治理指数"; - private static final String ZB_CN = "指标"; - private static final String BEN_JI_CN = "本级"; - private static final String XIA_JI_CN = "下级"; + public static final String DJZS_CN = "党建指数"; + public static final String FWZS_CN = "服务指数"; + public static final String ZLZS_CN = "治理指数"; + public static final String ZB_CN = "指标"; + public static final String BEN_JI_CN = "本级"; + public static final String XIA_JI_CN = "下级"; public static final String ZI_SHEN = "zishen"; public static final String XIA_JI = "xiaji"; @@ -33,6 +33,8 @@ public class IndexConstant { public static final String INDEX_SCORE_DESC = "含义:自然月周期内,当月指数得分=党建指数得分*相关权重+治理指数得分*相关权重+服务指数得分*相关权重"; public static final String INDEX_DISTRINCT_TABLE1_INDEX_CODE = "suoyoujiedaozlnlpjz"; public static final String ZHI_LI_NENG_LI = "zhilinengli"; + public static final String PATTERN_D = "d"; + public static final String QUAN_QU_ZHI_LI_INDEX_CODE = "quanquxiangguan:zhilinengli"; /** diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/index/impl/IndexExplainServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/index/impl/IndexExplainServiceImpl.java index 4ade8e04b0..3915f53da4 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/index/impl/IndexExplainServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/index/impl/IndexExplainServiceImpl.java @@ -100,6 +100,16 @@ public class IndexExplainServiceImpl implements IndexExplainService { results.add(result); result.setTitle(explainDTO.getTitle()); result.setMeaning(explainDTO.getMeaning()); + + //全区相关的服务能力的含义中 有权重 所以特殊处理下 + if (explainDTO.getOrgLevel().equals(OrgLevelEnum.DISTRICT.getCode()) && IndexConstant.ZLZS_CN.equals(explainDTO.getTitle())) { + List detailResults = detailEntityMap.get(IndexConstant.QUAN_QU_ZHI_LI_INDEX_CODE); + detailResults.forEach(index -> { + String newMeaning = result.getMeaning().replaceFirst(IndexConstant.PATTERN_D, + index.getWeight().multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.ZERO, BigDecimal.ROUND_HALF_UP).toString()); + result.setMeaning(newMeaning); + }); + } //设置表格数据 setTableData(formDTO, detailEntityMap, explainDTO, result); //子节点 @@ -163,7 +173,6 @@ public class IndexExplainServiceImpl implements IndexExplainService { List indexGroupDetailEntities = new ArrayList<>(); for (IndexGroupDetailResult index : detailResults) { - if (IndexConstant.INDEX_DISTRINCT_TABLE1_INDEX_CODE.equals(index.getIndexCode())) { indexGroupDetailEntities.add(index); setDefaultTableData(orgLevel, type, detailEntityMap, result, allIndexCodePath, indexGroupDetailEntities);