|
|
@ -112,10 +112,18 @@ public class IndexExplainServiceImpl implements IndexExplainService { |
|
|
|
|
|
|
|
//全区相关的服务能力的含义中 有权重 所以特殊处理下
|
|
|
|
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()); |
|
|
|
|
|
|
|
//获取分数 补充下
|
|
|
|
IndexScoreFormDTO ablityListFormDTO = new IndexScoreFormDTO(); |
|
|
|
ablityListFormDTO.setCustomerId(formDTO.getCustomerId()); |
|
|
|
ablityListFormDTO.setOrgId(formDTO.getOrgId()); |
|
|
|
ablityListFormDTO.setAllParentIndexCode(explainDTO.getIndexCode()); |
|
|
|
ablityListFormDTO.setMonthId(StringUtils.isBlank(formDTO.getMonthId()) ? DateUtils.getCurrentTimeBeforeMonthId() : formDTO.getMonthId()); |
|
|
|
List<IndexScoreResult> scoreResults = agencySubScoreDao.selectSubScore(ablityListFormDTO); |
|
|
|
scoreResults.forEach(e->{ |
|
|
|
String newMeaning = result.getMeaning().replaceFirst(e.getIndexCode(),e.getScore().toString()) |
|
|
|
.replaceFirst(IndexConstant.PATTERN_D, |
|
|
|
e.getWeight().multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.ZERO, BigDecimal.ROUND_HALF_UP).toString());; |
|
|
|
result.setMeaning(newMeaning); |
|
|
|
}); |
|
|
|
} |
|
|
@ -124,7 +132,6 @@ public class IndexExplainServiceImpl implements IndexExplainService { |
|
|
|
//子节点
|
|
|
|
setChildren(formDTO, detailEntityMap, result, explainDTO, explainDTO.getChildren()); |
|
|
|
//设置 新的含义 带分数的
|
|
|
|
System.out.println(result.getIndexCode()+"============="); |
|
|
|
setCurrentMonthScore(formDTO, first,result); |
|
|
|
} |
|
|
|
|
|
|
@ -175,7 +182,7 @@ public class IndexExplainServiceImpl implements IndexExplainService { |
|
|
|
} |
|
|
|
|
|
|
|
firstMeaning = firstMeaning.replaceFirst(indexCode, score.getScore().toString()).replaceFirst(indexCode.concat(IndexConstant.PATTERN_WEIGHT), score.getWeight().multiply(new BigDecimal(NumConstant.ONE_HUNDRED)).setScale(NumConstant.ZERO, BigDecimal.ROUND_HALF_UP).toString() + "%"); |
|
|
|
if (score.getIndexCode().equals(second.getIndexCode())){ |
|
|
|
if (second.getIndexCode().contains(score.getIndexCode())){ |
|
|
|
secondMeaning = secondMeaning.replaceFirst(IndexConstant.PATTERN_TOTAL, score.getScore().toString()) |
|
|
|
.replaceFirst(IndexConstant.BEN_JI_EN, score.getSelfScore().toString()) |
|
|
|
.replaceFirst(IndexConstant.XIA_JI_EN, score.getSubScore().toString()); |
|
|
@ -235,6 +242,9 @@ public class IndexExplainServiceImpl implements IndexExplainService { |
|
|
|
List<IndexGroupDetailResult> indexGroupDetailEntities = new ArrayList<>(); |
|
|
|
for (IndexGroupDetailResult index : detailResults) { |
|
|
|
if (IndexConstant.INDEX_DISTRINCT_TABLE1_INDEX_CODE.equals(index.getIndexCode())) { |
|
|
|
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); |
|
|
|
indexGroupDetailEntities.add(index); |
|
|
|
setDefaultTableData(orgLevel, type, detailEntityMap, result, allIndexCodePath, indexGroupDetailEntities); |
|
|
|
//不下钻
|
|
|
@ -312,14 +322,14 @@ public class IndexExplainServiceImpl implements IndexExplainService { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
private List<IndexScoreDetailResult> setDefaultTableData(String orgLevel, String type, Map<String, List<IndexGroupDetailResult>> detailEntityMap, |
|
|
|
IndexExplainResult result, String allIndexCodePath, List<IndexGroupDetailResult> indexGroupDetailEntities) { |
|
|
|
private void setDefaultTableData(String orgLevel, String type, Map<String, List<IndexGroupDetailResult>> detailEntityMap, |
|
|
|
IndexExplainResult result, String allIndexCodePath, List<IndexGroupDetailResult> indexGroupDetailEntities) { |
|
|
|
if (indexGroupDetailEntities == null) { |
|
|
|
indexGroupDetailEntities = detailEntityMap.get(allIndexCodePath); |
|
|
|
} |
|
|
|
if (CollectionUtils.isEmpty(indexGroupDetailEntities)) { |
|
|
|
log.warn("setDefaultTableData allINdexCodePath:{} is config error", allIndexCodePath); |
|
|
|
return null; |
|
|
|
return; |
|
|
|
} |
|
|
|
List<IndexScoreDetailResult> tableList = new ArrayList<>(); |
|
|
|
List<String> threlodList = new ArrayList<>(); |
|
|
@ -348,7 +358,6 @@ public class IndexExplainServiceImpl implements IndexExplainService { |
|
|
|
result.setTableDataList(tableList); |
|
|
|
result.setThresholdList(threlodList); |
|
|
|
result.setTableDesc(IndexConstant.TABLE_DESC); |
|
|
|
return tableList; |
|
|
|
} |
|
|
|
|
|
|
|
private void setChildren(IndexExplainFormDTO formDTO, Map<String, List<IndexGroupDetailResult>> detailEntityMap, IndexExplainResult result, IndexExplainTreeDTO parentNode, List<IndexExplainTreeDTO> children) { |
|
|
|