Browse Source

调整下级和自身权重不对问题

dev_shibei_match
jianjun 5 years ago
parent
commit
8702bcdf1d
  1. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java
  2. 7
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateCommunityServiceImpl.java
  3. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java
  4. 6
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateStreetServiceImpl.java

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

@ -151,16 +151,14 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
scoreEntity.setSelfScore(new BigDecimal(0));
scoreEntity.setSubScore(new BigDecimal(0));
scoreEntity.setParentIndexCode(index.getIndexCode());
scoreEntity.setSelfWeight(new BigDecimal(0));
scoreEntity.setSubWeight(new BigDecimal(0));
scoreEntity.setSubWeight(weightMap.get(ProjectConstant.XIA_JI));
scoreEntity.setSubWeight(weightMap.get(ProjectConstant.ZI_SHEN));
}
BigDecimal partScore = score.getScore().multiply(score.getWeight());
if (selfSubParentMap.get(ProjectConstant.XIA_JI).contains(score.getIndexCode())) {
scoreEntity.setSubScore(scoreEntity.getSubScore().add(partScore));
scoreEntity.setSubWeight(weightMap.get(ProjectConstant.XIA_JI));
} else {
scoreEntity.setSelfScore(scoreEntity.getSelfScore().add(partScore));
scoreEntity.setSubWeight(weightMap.get(ProjectConstant.ZI_SHEN));
}
log.debug("=====key" + key + ",grid:{},originScore:{},weight:{},finalScore:{},total", score.getGridId(), score.getScore(), score.getWeight(), partScore);
});

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

@ -159,16 +159,15 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
scoreEntity.setSelfScore(new BigDecimal(0));
scoreEntity.setSubScore(new BigDecimal(0));
scoreEntity.setParentIndexCode(index.getIndexCode());
scoreEntity.setSelfWeight(new BigDecimal(0));
scoreEntity.setSubWeight(new BigDecimal(0));
scoreEntity.setSubWeight(weightMap.get(ProjectConstant.XIA_JI));
scoreEntity.setSelfWeight(weightMap.get(ProjectConstant.ZI_SHEN));
}
BigDecimal partScore = score.getScore().multiply(score.getWeight());
if (selfSubParentMap.get(ProjectConstant.XIA_JI).contains(score.getIndexCode())) {
scoreEntity.setSubScore(scoreEntity.getSubScore().add(partScore));
scoreEntity.setSubWeight(weightMap.get(ProjectConstant.XIA_JI));
} else {
scoreEntity.setSelfScore(scoreEntity.getSelfScore().add(partScore));
scoreEntity.setSelfWeight(weightMap.get(ProjectConstant.ZI_SHEN));
}
log.debug("=====key" + key + ",grid:{},originScore:{},weight:{},finalScore:{},total", score.getAgencyId(), score.getScore(), score.getWeight(), partScore);
});

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

@ -157,16 +157,14 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
scoreEntity.setSelfScore(new BigDecimal(0));
scoreEntity.setSubScore(new BigDecimal(0));
scoreEntity.setParentIndexCode(index.getIndexCode());
scoreEntity.setSelfWeight(new BigDecimal(0));
scoreEntity.setSubWeight(new BigDecimal(0));
scoreEntity.setSubWeight(weightMap.get(ProjectConstant.XIA_JI));
scoreEntity.setSubWeight(weightMap.get(ProjectConstant.ZI_SHEN));
}
BigDecimal partScore = score.getScore().multiply(score.getWeight());
if (selfSubParentMap.get(ProjectConstant.XIA_JI).contains(score.getIndexCode())) {
scoreEntity.setSubScore(scoreEntity.getSubScore().add(partScore));
scoreEntity.setSubWeight(weightMap.get(ProjectConstant.XIA_JI));
} else {
scoreEntity.setSelfScore(scoreEntity.getSelfScore().add(partScore));
scoreEntity.setSubWeight(weightMap.get(ProjectConstant.ZI_SHEN));
}
log.debug("=====key" + key + ",grid:{},originScore:{},weight:{},finalScore:{},total", score.getAgencyId(), score.getScore(), score.getWeight(), partScore);
});

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

@ -161,16 +161,14 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
scoreEntity.setSelfScore(new BigDecimal(0));
scoreEntity.setSubScore(new BigDecimal(0));
scoreEntity.setParentIndexCode(index.getIndexCode());
scoreEntity.setSelfWeight(new BigDecimal(0));
scoreEntity.setSubWeight(new BigDecimal(0));
scoreEntity.setSubWeight(weightMap.get(ProjectConstant.XIA_JI));
scoreEntity.setSelfWeight(weightMap.get(ProjectConstant.ZI_SHEN));
}
BigDecimal partScore = score.getScore().multiply(score.getWeight());
if (selfSubParentMap.get(ProjectConstant.XIA_JI).contains(score.getIndexCode())) {
scoreEntity.setSubScore(scoreEntity.getSubScore().add(partScore));
scoreEntity.setSubWeight(weightMap.get(ProjectConstant.XIA_JI));
} else {
scoreEntity.setSelfScore(scoreEntity.getSelfScore().add(partScore));
scoreEntity.setSelfWeight(weightMap.get(ProjectConstant.ZI_SHEN));
}
log.debug("=====key" + key + ",grid:{},originScore:{},weight:{},finalScore:{},total", score.getAgencyId(), score.getScore(), score.getWeight(), partScore);
});

Loading…
Cancel
Save