Browse Source

Merge remote-tracking branch 'origin/dev'

dev_shibei_match
zxc 5 years ago
parent
commit
9ac69de282
  1. 24
      epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java

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

@ -626,11 +626,15 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
subPartyAvgList.forEach(party -> {
List<SampleValue> index1SampleValues = new ArrayList<>();
party.forEach(c -> {
if (!c.getParentId().equals(NumConstant.ZERO_STR)) {
pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId()));
SampleValue s = new SampleValue(c.getParentId(), c.getScore());
index1SampleValues.add(s);
}else {
pid.put(c.getAgencyId(), customerAgencyDao.selectPid(c.getAgencyId()));
SampleValue s = new SampleValue(c.getAgencyId(), c.getScore());
index1SampleValues.add(s);
}
});
BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation()));
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc);
@ -714,11 +718,15 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
governAvg.forEach(avg -> {
List<SampleValue> index1SampleValues = new ArrayList<>();
avg.forEach(c -> {
// if (!c.getParentId().equals(NumConstant.ZERO_STR)) {
if (!c.getParentId().equals(NumConstant.ZERO_STR)) {
pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId()));
SampleValue s = new SampleValue(c.getParentId(), c.getScore());
index1SampleValues.add(s);
// }
}else {
pid.put(c.getAgencyId(), customerAgencyDao.selectPid(c.getAgencyId()));
SampleValue s = new SampleValue(c.getAgencyId(), c.getScore());
index1SampleValues.add(s);
}
});
BigDecimalScoreCalculator sc = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation()));
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc);
@ -801,11 +809,15 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict
BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation()));
List<SampleValue> index1SampleValues = new ArrayList<>();
serviceAvg.forEach(c -> {
// if (!c.getParentId().equals(NumConstant.ZERO_STR)) {
if (!c.getParentId().equals(NumConstant.ZERO_STR)) {
pid.put(c.getParentId(), customerAgencyDao.selectPid(c.getParentId()));
SampleValue s = new SampleValue(c.getParentId(), c.getScore());
index1SampleValues.add(s);
// }
}else {
pid.put(c.getAgencyId(), customerAgencyDao.selectPid(c.getAgencyId()));
SampleValue s = new SampleValue(c.getAgencyId(), c.getScore());
index1SampleValues.add(s);
}
});
IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc1);
indexInputVOS.add(index1VO);

Loading…
Cancel
Save