Browse Source

Merge remote-tracking branch 'remotes/origin/dev_screen_data_2.0' into dev_temp

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

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

@ -140,12 +140,15 @@ public class DeptScoreServiceImpl extends BaseServiceImpl<DeptScoreDao, DeptScor
Map<String, Set<String>> selfSubParentMap = new HashMap<>();
selfSubParentMap.put(ProjectConstant.ZI_SHEN, new HashSet<>());
selfSubParentMap.put(ProjectConstant.XIA_JI, new HashSet<>());
Map<String, BigDecimal> weightMap = new HashMap<>();
selfSubIndexList.forEach(o -> {
//找出自身 和下级的指标
if (o.getAllIndexCodePath().indexOf(ProjectConstant.XIA_JI) > -1) {
selfSubParentMap.get(ProjectConstant.XIA_JI).add(o.getIndexCode());
weightMap.put(ProjectConstant.XIA_JI, weightMap.getOrDefault(ProjectConstant.XIA_JI, new BigDecimal(0)).add(o.getWeight()));
} else {
selfSubParentMap.get(ProjectConstant.ZI_SHEN).add(o.getIndexCode());
weightMap.put(ProjectConstant.ZI_SHEN, weightMap.getOrDefault(ProjectConstant.ZI_SHEN, new BigDecimal(0)).add(o.getWeight()));
}
});
Map<String, DeptSelfSubScoreEntity> insertMap = new HashMap<>();
@ -158,16 +161,16 @@ public class DeptScoreServiceImpl extends BaseServiceImpl<DeptScoreDao, DeptScor
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.setSelfWeight(weightMap.getOrDefault(score.getIndexCode(), new BigDecimal(0)));
scoreEntity.setSubWeight(weightMap.getOrDefault(score.getIndexCode(), new BigDecimal(0)));
}
BigDecimal partScore = score.getScore().multiply(score.getWeight());
if (selfSubParentMap.get(ProjectConstant.XIA_JI).contains(score.getIndexCode())) {
scoreEntity.setSubScore(scoreEntity.getSubScore().add(partScore));
scoreEntity.setSubWeight(scoreEntity.getSubWeight().add(score.getWeight()));
scoreEntity.setSelfWeight(weightMap.get(ProjectConstant.XIA_JI));
} else {
scoreEntity.setSelfScore(scoreEntity.getSelfScore().add(partScore));
scoreEntity.setSelfWeight(scoreEntity.getSelfWeight().add(score.getWeight()));
scoreEntity.setSelfWeight(weightMap.get(ProjectConstant.ZI_SHEN));
}
log.debug("=====key" + key + ",grid:{},originScore:{},weight:{},finalScore:{},total", score.getAgencyId(), score.getScore(), score.getWeight(), partScore);
});

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

@ -129,12 +129,15 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
Map<String, Set<String>> selfSubParentMap = new HashMap<>();
selfSubParentMap.put(ProjectConstant.ZI_SHEN, new HashSet<>());
selfSubParentMap.put(ProjectConstant.XIA_JI, new HashSet<>());
Map<String, BigDecimal> weightMap = new HashMap<>();
selfSubIndexList.forEach(o -> {
//找出自身 和下级的指标
if (o.getAllIndexCodePath().indexOf(ProjectConstant.XIA_JI) > -1) {
selfSubParentMap.get(ProjectConstant.XIA_JI).add(o.getIndexCode());
weightMap.put(ProjectConstant.XIA_JI, weightMap.getOrDefault(ProjectConstant.XIA_JI, new BigDecimal(0)).add(o.getWeight()));
} else {
selfSubParentMap.get(ProjectConstant.ZI_SHEN).add(o.getIndexCode());
weightMap.put(ProjectConstant.ZI_SHEN, weightMap.getOrDefault(ProjectConstant.ZI_SHEN, new BigDecimal(0)).add(o.getWeight()));
}
});
Map<String, GridSelfSubScoreEntity> insertMap = new HashMap<>();
@ -154,10 +157,10 @@ public class GridCorreLationServiceImpl implements GridCorreLationService {
BigDecimal partScore = score.getScore().multiply(score.getWeight());
if (selfSubParentMap.get(ProjectConstant.XIA_JI).contains(score.getIndexCode())) {
scoreEntity.setSubScore(scoreEntity.getSubScore().add(partScore));
scoreEntity.setSubWeight(scoreEntity.getSubWeight().add(score.getWeight()));
scoreEntity.setSubWeight(weightMap.get(ProjectConstant.XIA_JI));
} else {
scoreEntity.setSelfScore(scoreEntity.getSelfScore().add(partScore));
scoreEntity.setSelfWeight(scoreEntity.getSelfWeight().add(score.getWeight()));
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

@ -138,12 +138,15 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
Map<String, Set<String>> selfSubParentMap = new HashMap<>();
selfSubParentMap.put(ProjectConstant.ZI_SHEN, new HashSet<>());
selfSubParentMap.put(ProjectConstant.XIA_JI, new HashSet<>());
Map<String, BigDecimal> weightMap = new HashMap<>();
selfSubIndexList.forEach(o -> {
//找出自身 和下级的指标
if (o.getAllIndexCodePath().indexOf(ProjectConstant.XIA_JI) > -1) {
selfSubParentMap.get(ProjectConstant.XIA_JI).add(o.getIndexCode());
weightMap.put(ProjectConstant.XIA_JI, weightMap.getOrDefault(ProjectConstant.XIA_JI, new BigDecimal(0)).add(o.getWeight()));
} else {
selfSubParentMap.get(ProjectConstant.ZI_SHEN).add(o.getIndexCode());
weightMap.put(ProjectConstant.ZI_SHEN, weightMap.getOrDefault(ProjectConstant.ZI_SHEN, new BigDecimal(0)).add(o.getWeight()));
}
});
Map<String, CommunitySelfSubScoreEntity> insertMap = new HashMap<>();
@ -162,10 +165,10 @@ public class IndexCalculateCommunityServiceImpl implements IndexCalculateCommuni
BigDecimal partScore = score.getScore().multiply(score.getWeight());
if (selfSubParentMap.get(ProjectConstant.XIA_JI).contains(score.getIndexCode())) {
scoreEntity.setSubScore(scoreEntity.getSubScore().add(partScore));
scoreEntity.setSubWeight(scoreEntity.getSubWeight().add(score.getWeight()));
scoreEntity.setSubWeight(weightMap.get(ProjectConstant.XIA_JI));
} else {
scoreEntity.setSelfScore(scoreEntity.getSelfScore().add(partScore));
scoreEntity.setSelfWeight(scoreEntity.getSelfWeight().add(score.getWeight()));
scoreEntity.setSelfWeight(weightMap.get(ProjectConstant.ZI_SHEN));
}
log.debug("=====key" + key + ",grid:{},originScore:{},weight:{},finalScore:{},total", score.getAgencyId(), score.getScore(), score.getWeight(), partScore);
});

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

@ -136,12 +136,15 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
Map<String, Set<String>> selfSubParentMap = new HashMap<>();
selfSubParentMap.put(ProjectConstant.ZI_SHEN, new HashSet<>());
selfSubParentMap.put(ProjectConstant.XIA_JI, new HashSet<>());
Map<String, BigDecimal> weightMap = new HashMap<>();
selfSubIndexList.forEach(o -> {
//找出自身 和下级的指标
if (o.getAllIndexCodePath().indexOf(ProjectConstant.XIA_JI) > -1) {
selfSubParentMap.get(ProjectConstant.XIA_JI).add(o.getIndexCode());
weightMap.put(ProjectConstant.XIA_JI, weightMap.getOrDefault(ProjectConstant.XIA_JI, new BigDecimal(0)).add(o.getWeight()));
} else {
selfSubParentMap.get(ProjectConstant.ZI_SHEN).add(o.getIndexCode());
weightMap.put(ProjectConstant.ZI_SHEN, weightMap.getOrDefault(ProjectConstant.ZI_SHEN, new BigDecimal(0)).add(o.getWeight()));
}
});
Map<String, AgencySelfSubScoreEntity> insertMap = new HashMap<>();
@ -160,10 +163,10 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
BigDecimal partScore = score.getScore().multiply(score.getWeight());
if (selfSubParentMap.get(ProjectConstant.XIA_JI).contains(score.getIndexCode())) {
scoreEntity.setSubScore(scoreEntity.getSubScore().add(partScore));
scoreEntity.setSubWeight(scoreEntity.getSubWeight().add(score.getWeight()));
scoreEntity.setSubWeight(weightMap.get(ProjectConstant.XIA_JI));
} else {
scoreEntity.setSelfScore(scoreEntity.getSelfScore().add(partScore));
scoreEntity.setSelfWeight(scoreEntity.getSelfWeight().add(score.getWeight()));
scoreEntity.setSubWeight(weightMap.get(ProjectConstant.ZI_SHEN));
}
log.debug("=====key" + key + ",grid:{},originScore:{},weight:{},finalScore:{},total", score.getAgencyId(), score.getScore(), score.getWeight(), partScore);
});

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

@ -139,13 +139,17 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
Map<String, Set<String>> selfSubParentMap = new HashMap<>();
selfSubParentMap.put(ProjectConstant.ZI_SHEN, new HashSet<>());
selfSubParentMap.put(ProjectConstant.XIA_JI, new HashSet<>());
Map<String, BigDecimal> weightMap = new HashMap<>();
selfSubIndexList.forEach(o -> {
//找出自身 和下级的指标
if (o.getAllIndexCodePath().indexOf(ProjectConstant.XIA_JI) > -1) {
selfSubParentMap.get(ProjectConstant.XIA_JI).add(o.getIndexCode());
weightMap.put(ProjectConstant.XIA_JI, weightMap.getOrDefault(ProjectConstant.XIA_JI, new BigDecimal(0)).add(o.getWeight()));
} else {
selfSubParentMap.get(ProjectConstant.ZI_SHEN).add(o.getIndexCode());
weightMap.put(ProjectConstant.ZI_SHEN, weightMap.getOrDefault(ProjectConstant.ZI_SHEN, new BigDecimal(0)).add(o.getWeight()));
}
});
Map<String, AgencySelfSubScoreEntity> insertMap = new HashMap<>();
subScore.forEach(score -> {
@ -163,10 +167,10 @@ public class IndexCalculateStreetServiceImpl implements IndexCalculateStreetServ
BigDecimal partScore = score.getScore().multiply(score.getWeight());
if (selfSubParentMap.get(ProjectConstant.XIA_JI).contains(score.getIndexCode())) {
scoreEntity.setSubScore(scoreEntity.getSubScore().add(partScore));
scoreEntity.setSubWeight(scoreEntity.getSubWeight().add(score.getWeight()));
scoreEntity.setSubWeight(weightMap.get(ProjectConstant.XIA_JI));
} else {
scoreEntity.setSelfScore(scoreEntity.getSelfScore().add(partScore));
scoreEntity.setSelfWeight(scoreEntity.getSelfWeight().add(score.getWeight()));
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