Browse Source

特殊处理下%d

dev_shibei_match
jianjun 4 years ago
parent
commit
6f5c7b5375
  1. 14
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/constant/IndexConstant.java
  2. 11
      epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/index/impl/IndexExplainServiceImpl.java

14
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<String> ScoreLastHeader = Arrays.asList("指标值", "得分", "权重");
public static final List<String> 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";
/**

11
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<IndexGroupDetailResult> 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<IndexGroupDetailResult> 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);

Loading…
Cancel
Save