From a1d2a8139be45f0550e7b492cea4693056ac10f8 Mon Sep 17 00:00:00 2001 From: Jian Shen Date: Thu, 19 May 2022 14:57:45 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=8F=96=E6=B6=88=E7=B3=BB=E6=95=B0?= =?UTF-8?q?=E4=B8=8B=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../fangjia/open/controllers/PropertyController.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PropertyController.java b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PropertyController.java index 14563310d..a334cf730 100644 --- a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PropertyController.java +++ b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PropertyController.java @@ -1175,11 +1175,12 @@ public class PropertyController { districtPriceMap.put("district", district.getRegion()); districtPriceMap.put("name", district.getName()); long totalPrice = evaluation.getBigTotalPrice(); - if(CITY_CORRECTION_FACTOR.containsKey(district.getCity())){ - totalPrice = (long)(totalPrice * (1 - CITY_CORRECTION_FACTOR.get(district.getCity()))); - evaluation.setBigTotalPrice(totalPrice); - evaluation.setAvgPrice((int)(totalPrice/evaluation.getArea())); - } + // 取消系数下调 +// if(CITY_CORRECTION_FACTOR.containsKey(district.getCity())){ +// totalPrice = (long)(totalPrice * (1 - CITY_CORRECTION_FACTOR.get(district.getCity()))); +// evaluation.setBigTotalPrice(totalPrice); +// evaluation.setAvgPrice((int)(totalPrice/evaluation.getArea())); +// } districtPriceMap.put("totalPrice", evaluation.getBigTotalPrice()); districtPriceMap.put("unitPrice", evaluation.getAvgPrice()); List names = new ArrayList(); From b389e5b0c3ff21ea0b3bc10f48da3256474b98aa Mon Sep 17 00:00:00 2001 From: Jian Shen Date: Thu, 19 May 2022 15:55:11 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E6=97=A0=E6=A0=B7=E6=9C=AC=E5=91=A8?= =?UTF-8?q?=E8=BE=B9=E4=BB=B7=E6=A0=BC=E8=BF=87=E6=BB=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fangjia/open/controllers/PropertyController.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PropertyController.java b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PropertyController.java index a334cf730..96a414024 100644 --- a/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PropertyController.java +++ b/projects/fangjia-open/src/main/java/com/fangjia/open/controllers/PropertyController.java @@ -1222,7 +1222,7 @@ public class PropertyController { }else if(district.getLng() != null && district.getLng() > 0){ double lng = DataUtil.roundDouble(district.getLng() / 10000000000.0,6); double lat = DataUtil.roundDouble(district.getLat() / 10000000000.0, 6); - List districts = districtService.findNearestDistrict(district.getEstateType2(), lng, lat, 1000 * 3 , 4, null); + List districts = districtService.findNearestDistrict(district.getEstateType2(), lng, lat, 1000 * 3 , 6, null); if(districts.size() < 2){ evaluationService.remove(evaluation.getId()); mav.setModel(BasicModel.buildOKModel().setMsg("暂时不支持该小区的估价").markNoData()); @@ -1264,7 +1264,7 @@ public class PropertyController { if (districtAnalyData.getHalfYearMarkup() != null) { districtDto.append("halfYearMarkup", DataUtil.roundDouble(districtAnalyData.getHalfYearMarkup() * 100, 2)); } - if (districtAnalyData.getAvgPrice() != null) { + if (districtAnalyData.getAvgPrice() != null && minPrice <= districtAnalyData.getAvgPrice() && maxPrice >= districtAnalyData.getAvgPrice()) { districtDto.append("avgPrice", districtAnalyData.getAvgPrice()); } }