|
@ -67,13 +67,20 @@ public class IndexExplainServiceImpl implements IndexExplainService { |
|
|
@Autowired |
|
|
@Autowired |
|
|
private FactIndexGridSubScoreDao gridSubScoreDao; |
|
|
private FactIndexGridSubScoreDao gridSubScoreDao; |
|
|
@Autowired |
|
|
@Autowired |
|
|
|
|
|
private FactIndexGridScoreDao gridScoreDao; |
|
|
|
|
|
@Autowired |
|
|
private FactIndexCpcSubScoreDao factIndexCpcSubScoreDao; |
|
|
private FactIndexCpcSubScoreDao factIndexCpcSubScoreDao; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private FactIndexCommunitySubScoreDao communitySubScoreDao; |
|
|
private FactIndexCommunitySubScoreDao communitySubScoreDao; |
|
|
@Autowired |
|
|
@Autowired |
|
|
|
|
|
private FactIndexCommunityScoreDao communityScoreDao; |
|
|
|
|
|
@Autowired |
|
|
private FactIndexAgencySubScoreDao agencySubScoreDao; |
|
|
private FactIndexAgencySubScoreDao agencySubScoreDao; |
|
|
@Autowired |
|
|
@Autowired |
|
|
private FactIndexDeptSubScoreDao deptSubScoreDao; |
|
|
private FactIndexDeptSubScoreDao deptSubScoreDao; |
|
|
|
|
|
@Autowired |
|
|
|
|
|
private FactIndexAgencyScoreDao agencyScoreDao; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
@ -83,6 +90,8 @@ public class IndexExplainServiceImpl implements IndexExplainService { |
|
|
first.setTitle(IndexConstant.INDEX_SCORE_TITLE); |
|
|
first.setTitle(IndexConstant.INDEX_SCORE_TITLE); |
|
|
first.setMeaning(IndexConstant.INDEX_SCORE_DESC); |
|
|
first.setMeaning(IndexConstant.INDEX_SCORE_DESC); |
|
|
results.add(first); |
|
|
results.add(first); |
|
|
|
|
|
//获取该等级的分数及权重
|
|
|
|
|
|
setCurrentMonthScore(formDTO,first); |
|
|
List<IndexExplainTreeDTO> explainDTOList = indexExplainDao.getIndexExplainTreeByOrgType(formDTO.getOrgLevel()); |
|
|
List<IndexExplainTreeDTO> explainDTOList = indexExplainDao.getIndexExplainTreeByOrgType(formDTO.getOrgLevel()); |
|
|
if (CollectionUtils.isEmpty(explainDTOList)) { |
|
|
if (CollectionUtils.isEmpty(explainDTOList)) { |
|
|
return null; |
|
|
return null; |
|
@ -124,6 +133,40 @@ public class IndexExplainServiceImpl implements IndexExplainService { |
|
|
return indexDictDao.selectIndexDict(formDTO.getIndexCode()); |
|
|
return indexDictDao.selectIndexDict(formDTO.getIndexCode()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
private void setCurrentMonthScore(IndexExplainFormDTO formDTO, IndexExplainResult first){ |
|
|
|
|
|
|
|
|
|
|
|
String orgLevel = formDTO.getOrgLevel(); |
|
|
|
|
|
String orgId = formDTO.getOrgId(); |
|
|
|
|
|
OrgLevelEnum anEnum = OrgLevelEnum.getEnum(orgLevel); |
|
|
|
|
|
switch (anEnum) { |
|
|
|
|
|
case GRID: |
|
|
|
|
|
List<IndexScoreResult> list = gridScoreDao.selectGridScoreList(formDTO.getCustomerId(),formDTO.getOrgId(),formDTO.getMonthId()); |
|
|
|
|
|
String meaning = first.getMeaning(); |
|
|
|
|
|
for (IndexScoreResult score : list) { |
|
|
|
|
|
String indexCode = score.getIndexCode(); |
|
|
|
|
|
if (score.getIsTotal()){ |
|
|
|
|
|
meaning = meaning.replaceFirst(IndexConstant.PATTERN_TOTAL,score.getScore().toString()); |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
meaning = meaning.replaceFirst(indexCode, score.getScore().toString()).replaceFirst(indexCode.concat(IndexConstant.PATTERN_WEIGHT), score.getWeight() + "%"); |
|
|
|
|
|
} |
|
|
|
|
|
first.setMeaning(meaning); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
|
case COMMUNITY: |
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
|
case STREET: |
|
|
|
|
|
|
|
|
|
|
|
break; |
|
|
|
|
|
case DISTRICT: |
|
|
|
|
|
break; |
|
|
|
|
|
default: |
|
|
|
|
|
log.error("暂不支持更高级别的查询,level:{}", orgLevel); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
private void setTableData(IndexExplainFormDTO formDTO, Map<String, List<IndexGroupDetailResult>> detailEntityMap, IndexExplainTreeDTO explainDTO, IndexExplainResult result) { |
|
|
private void setTableData(IndexExplainFormDTO formDTO, Map<String, List<IndexGroupDetailResult>> detailEntityMap, IndexExplainTreeDTO explainDTO, IndexExplainResult result) { |
|
|
if (NumConstant.ONE == explainDTO.getIsSearch()) { |
|
|
if (NumConstant.ONE == explainDTO.getIsSearch()) { |
|
|
List<IndexScoreResult> realScoreList = null; |
|
|
List<IndexScoreResult> realScoreList = null; |
|
|