Browse Source

Merge remote-tracking branch 'origin/dev_pyscreen' into dev

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

17
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<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);
}
});
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<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);
}
// }
});
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<SubAgencyScoreAvgResultDTO> subStreetAvgList = agencyScoreDao.selectAgencyScoreAvgExistsSub(monthId,IndexCodeEnum.FU_WU_NENG_LI.getCode(),IndexCalConstant.STREET_LEVEL,form.getCustomerAreaCode(),NumConstant.SIX);
List<SubAgencyScoreAvgResultDTO> 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<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);
}
// }
});
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<IndexGroupDetailEntity> detailListByParentCode = indexGroupDetailService.getDetailListByParentCode(customerId, IndexCodeEnum.SHE_QU_XIANG_GUAN.getCode());
List<AgencyScoreDTO> 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);
}

Loading…
Cancel
Save