From e2632a25cc6589ab337d619f4d2199e8d65e7dbf Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 9 Mar 2021 19:24:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=B3=E9=98=B4=E6=95=B0=E6=8D=AE=E6=8A=BD?= =?UTF-8?q?=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IndexCalculateDistrictServiceImpl.java | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 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 0071929851..b21a19ceac 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 @@ -626,11 +626,11 @@ 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); - } + }); 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 +714,11 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict governAvg.forEach(avg -> { List 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); - } +// } }); 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); @@ -786,7 +786,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict if (IndexCodeEnum.QU_XIA_SHU_JIE_DFWNLHZPJZ.getCode().equals(indexCode)) { // List subStreetAvgList = agencyScoreDao.selectAgencyScoreAvgExistsSub(monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL,form.getCustomerAreaCode(),NumConstant.SIX); List subStreetAvgList = agencyScoreDao.selectAgencyScoreAvgByOrgIds(monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),orgInfos.stream().map(m -> m.getOrgId()).collect(Collectors.toList())); - log.info("subStreetAvgList"+subStreetAvgList.toString()); + log.info("subStreetAvgList:::"+subStreetAvgList.toString()); for (int i = 0; i < subStreetAvgList.size(); i++) { if (subStreetAvgList.get(i).getAgencyId().equals(NumConstant.ZERO_STR)){ subStreetAvgList.remove(subStreetAvgList.get(i)); @@ -801,11 +801,11 @@ 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)) { +// 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); - } +// } }); IndexInputVO index1VO = new IndexInputVO(detail.getIndexCode(), detail.getAllParentIndexCode(), index1SampleValues, detail.getThreshold(), detail.getWeight(), IndexCodeEnum.isAvgIndex(detail.getIndexCode()), sc1); indexInputVOS.add(index1VO); @@ -837,7 +837,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict String monthId = form.getMonthId(); List detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode()); List agencyScoreList = agencyScoreDao.selectAgencyScoreInfoExistsSubSelf(form.getCustomerAreaCode(),monthId, IndexCalConstant.DISTRICT_LEVEL); - log.info("agencyScoreList"+agencyScoreList.toString()); + log.info("agencyScoreList:::"+agencyScoreList.toString()); detailListByParentCode.forEach(detail -> { agencyScoreList.forEach(community -> { if (detail.getIndexCode().equals(community.getIndexCode())) { @@ -865,6 +865,7 @@ public class IndexCalculateDistrictServiceImpl implements IndexCalculateDistrict }); result.add(score); }); + log.info("result:::"+result.toString()); if (!CollectionUtils.isEmpty(result)){ agencyScoreDao.insertStreetRecord(result); }