diff --git a/projects/fangjia-coresite/src/main/java/com/fangjia/coresite/controllers/EvaluationController.java b/projects/fangjia-coresite/src/main/java/com/fangjia/coresite/controllers/EvaluationController.java index be342ece4..30a73fa2f 100644 --- a/projects/fangjia-coresite/src/main/java/com/fangjia/coresite/controllers/EvaluationController.java +++ b/projects/fangjia-coresite/src/main/java/com/fangjia/coresite/controllers/EvaluationController.java @@ -3665,12 +3665,14 @@ public Object checkUserAction(EvaluationModel model, HttpServletRequest req, Htt SimpleDateFormat format = new SimpleDateFormat("yyyy.MM"); for (Date key : districtStatMap.keySet()) { DistrictStat ds = districtStatMap.get(key); - districtMap.put(format.format(ds.getWeekend()),ds.getAvgPrice()); + Integer avgPrice = ds.getAvg_price_2b() != null ? ds.getAvg_price_2b() : ds.getAvgPrice(); + districtMap.put(format.format(ds.getWeekend()), avgPrice); } for (Date key : villaDistrictStatMap.keySet()) { DistrictStat ds = villaDistrictStatMap.get(key); - districtMap.put(format.format(ds.getWeekend()),ds.getAvgPrice()); + Integer avgPrice = ds.getAvg_price_2b() != null ? ds.getAvg_price_2b() : ds.getAvgPrice(); + districtMap.put(format.format(ds.getWeekend()), avgPrice); } } diff --git a/projects/fangjia-service/src/main/java/com/fangjia/service/datastore/EvaluationServiceImpl.java b/projects/fangjia-service/src/main/java/com/fangjia/service/datastore/EvaluationServiceImpl.java index 070094dc1..0146770f1 100644 --- a/projects/fangjia-service/src/main/java/com/fangjia/service/datastore/EvaluationServiceImpl.java +++ b/projects/fangjia-service/src/main/java/com/fangjia/service/datastore/EvaluationServiceImpl.java @@ -1,5 +1,6 @@ package com.fangjia.service.datastore; +import java.math.BigDecimal; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; @@ -338,7 +339,10 @@ public class EvaluationServiceImpl implements EvaluationService { if(useAvgMode) { DistrictStatBo districtStatBo = districtStatService.findDistrictStat(districtKey); if (districtStatBo != null && districtStatBo.getDefaultDistrictStat() != null && districtStatBo.getDefaultDistrictStat().getAvgPrice() > 0) { - long totalPrice = evaluationRateService.evaluation(districtStatBo.getDefaultDistrictStat().getAvgPrice(), evaluation); + Double avgPrice = (double) (districtStatBo.getDefaultDistrictStat().getAvg_price_2b() != null ? districtStatBo.getDefaultDistrictStat().getAvg_price_2b() : districtStatBo.getDefaultDistrictStat().getAvgPrice()); + // 均价乘以系数 + avgPrice *= 1.04; + long totalPrice = evaluationRateService.evaluation(BigDecimal.valueOf(avgPrice).setScale(0, BigDecimal.ROUND_HALF_UP).intValue(), evaluation); avgModeValue = ((Number) (totalPrice)).intValue(); avgModeCredit = districtStatBo.getDefaultDistrictStat().getCredit(); } @@ -1898,7 +1902,8 @@ public class EvaluationServiceImpl implements EvaluationService { private void buildWeekAvgPrice(EvaluationBeforeLoanBean dto, Evaluation evaluation) { DistrictStatBo bo = getNearestDistrictStat(new DistrictKey(evaluation.getCity(), evaluation.getRegion(), evaluation.getDistrictName())); if (bo != null) { - dto.setWeekAvgPrice(bo.getDistrictStat().getAvgPrice()); + Integer avgPrice = bo.getDistrictStat().getAvg_price_2b() != null ? bo.getDistrictStat().getAvg_price_2b() : bo.getDistrictStat().getAvgPrice(); + dto.setWeekAvgPrice(avgPrice); dto.setTopWeekUpDownRange(bo.getDistrictStat().getWeekendMarkup()); } }