Browse Source

添加权重

dev_shibei_match
jianjun 5 years ago
parent
commit
505aa8be14
  1. 3
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java
  2. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java
  3. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java
  4. 2
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java

3
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/CpcIndexCalculateServiceImpl.java

@ -266,8 +266,7 @@ public class CpcIndexCalculateServiceImpl implements CpcIndexCalculateService {
cpcScoreEntity.setScore(new BigDecimal(NumConstant.ZERO));
cpcScoreEntity.setIndexCode(parentIndexCode);
cpcScoreEntity.setAllParentIndexCode(value.getAllParentIndexCode());
String vallPath = value.getAllParentIndexCode().concat(StrConstant.COLON).concat(parentIndexCode);
BigDecimal weight = indexGroupDetailService.getWeightByAllPathIndexCode(formDTO.getCustomerId(), vallPath);
BigDecimal weight = indexGroupDetailService.getWeightByAllPathIndexCode(formDTO.getCustomerId(), value.getAllParentIndexCode());
cpcScoreEntity.setWeight(weight);
scoreEntityMap.put(userId, cpcScoreEntity);

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/DeptScoreServiceImpl.java

@ -311,7 +311,7 @@ public class DeptScoreServiceImpl extends BaseServiceImpl<DeptScoreDao, DeptScor
//区直部门治理能力的 上一级是 quzhibumen
////新增ALL_PARENT_INDEX_CODE 所有指标code拼接的字符串 冒号隔开
deptScoreEntity.setAllParentIndexCode(IndexCodeEnum.QU_ZHI_BU_MEN.getCode());
String allPath = deptScoreEntity.getAllParentIndexCode().concat(StrConstant.COLON).concat(IndexCodeEnum.ZHI_LI_NENG_LI.getCode());
String allPath = deptScoreEntity.getAllParentIndexCode().concat(StrConstant.COLON).concat(deptScoreEntity.getIndexCode());
BigDecimal weight = indexGroupDetailService.getWeightByAllPathIndexCode(formDTO.getCustomerId(), allPath);
deptScoreEntity.setWeight(weight);
deptScoreEntityList.add(deptScoreEntity);

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java

@ -366,7 +366,7 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
gridScoreEntity.setScore(calculateResult.getTotalScore());
//新增ALL_PARENT_INDEX_CODE 所有指标code拼接的字符串 冒号隔开
gridScoreEntity.setAllParentIndexCode(IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode());
BigDecimal weight = indexGroupDetailService.getWeightByAllPathIndexCode(formDTO.getCustomerId(), IndexCodeEnum.WANG_GE_XIANG_GUAN.getCode());
BigDecimal weight = indexGroupDetailService.getWeightByAllPathIndexCode(formDTO.getCustomerId(), gridScoreEntity.getAllParentIndexCode().concat(StrConstant.COLON).concat(gridScoreEntity.getIndexCode()));
gridScoreEntity.setWeight(weight);
gridScoreEntityList.add(gridScoreEntity);
for (IndexScoreVo detail : calculateResult.getDetails()) {

2
epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java

@ -322,6 +322,8 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
score.setDataType(IndexCalConstant.DISTRICT_LEVEL);
score.setIndexCode(IndexCodeEnum.QUAN_QU_XIANG_GUAN.getCode());
score.setAllParentIndexCode(NumConstant.ZERO_STR);
BigDecimal weight = indexGroupDetailService.getWeightByAllPathIndexCode(customerId, score.getAllParentIndexCode().concat(StrConstant.COLON).concat(score.getIndexCode()));
score.setWeight(weight);
value.forEach(community -> {
score.setScore(score.getScore().add(community.getScore()));
score.setParentAgencyId(community.getParentAgencyId());

Loading…
Cancel
Save