From 952f4e862ce650ac1de37448037c6d3164c08326 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Mon, 31 May 2021 10:37:50 +0800 Subject: [PATCH] .. --- .../IndexCalculateDistrictServiceImpl.java | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java index 013ca207be..14f443ec4e 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/IndexCalculateDistrictServiceImpl.java @@ -237,11 +237,9 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict subPartyAvgList.forEach(party -> { List 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); - } + pid.put(c.getAgencyId(), c.getParentId()); + SampleValue s = new SampleValue(c.getParentId(), 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); @@ -322,11 +320,9 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict governAvg.forEach(avg -> { List index1SampleValues = new ArrayList<>(); avg.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); - } + pid.put(c.getAgencyId(), c.getParentId()); + SampleValue s = new SampleValue(c.getParentId(), 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); @@ -407,11 +403,9 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict BigDecimalScoreCalculator sc1 = new BigDecimalScoreCalculator(maxAndMinBigDecimal.getMin(), maxAndMinBigDecimal.getMax(), ScoreConstants.MIN_SCORE, ScoreConstants.MAX_SCORE, Correlation.getCorrelation(detail.getCorrelation())); List index1SampleValues = new ArrayList<>(); serviceAvg.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); - } + pid.put(c.getAgencyId(), c.getParentId()); + SampleValue s = new SampleValue(c.getParentId(), 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);