From 78b9a5a52220fe452d4e788a4db1718632b264c4 Mon Sep 17 00:00:00 2001 From: Jian Shen Date: Tue, 24 May 2022 14:30:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../open/controllers/PropertyController.java | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 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 fcf240ddc..89d72a2cc 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 @@ -1278,6 +1278,29 @@ public class PropertyController { Integer maxPrice = (int)(evaluation.getAvgPrice() * 1.2); Integer min10Price = (int)(evaluation.getAvgPrice() * 0.9); Integer max10Price = (int)(evaluation.getAvgPrice() * 1.1); + // 新增第三方均价 + try { + double dCredit = 0.61; + Map rMap = getLastEvaluationPrice(district, evaluation, dCredit); + if (null != rMap) { + if (rMap.containsKey("other_price")) { + Map otherPriceMap = (Map) rMap.get("other_price"); + Map priceResultMap = new HashMap(); + for (String key : otherPriceMap.keySet()) { + Integer price = otherPriceMap.get(key); + // 剔除偏差大于10的 + if (min10Price <= price && max10Price >= price) { + if (OTHER_PRICE_MAP.containsKey(key)) { + priceResultMap.put(OTHER_PRICE_MAP.get(key), price); + } + } + } + districtPriceMap.put("otherPrice", priceResultMap); + } + } + } catch (Exception ex) { + + } List houses = seawaterDao.findHouses(district.getCity(), district.getRegion(), names,minPrice, maxPrice, 20); if(houses.size() > 3){ districtPriceMap.put("calcType", 1); @@ -1303,29 +1326,6 @@ public class PropertyController { houseDtos.add(houseDto); } districtPriceMap.put("houses", houseDtos); - // 新增第三方均价 - try { - double dCredit = 0.61; - Map rMap = getLastEvaluationPrice(district, evaluation, dCredit); - if (null != rMap) { - if (rMap.containsKey("other_price")) { - Map otherPriceMap = (Map) rMap.get("other_price"); - Map priceResultMap = new HashMap(); - for (String key : otherPriceMap.keySet()) { - Integer price = otherPriceMap.get(key); - // 剔除偏差大于10的 - if (min10Price <= price && max10Price >= price) { - if (OTHER_PRICE_MAP.containsKey(key)) { - priceResultMap.put(OTHER_PRICE_MAP.get(key), price); - } - } - } - districtPriceMap.put("otherPrice", priceResultMap); - } - } - } catch (Exception ex) { - - } }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);