新增一房一价逻辑
This commit is contained in:
+75
-40
@@ -397,7 +397,7 @@ public class PropertyController {
|
||||
|
||||
/**
|
||||
* 利用百度API把GPS转换成Google经纬度
|
||||
*
|
||||
*
|
||||
* @param lng
|
||||
* @param lat
|
||||
* @return
|
||||
@@ -419,7 +419,7 @@ public class PropertyController {
|
||||
|
||||
/**
|
||||
* 利用算法模板把GPS转换成Google经纬度
|
||||
*
|
||||
*
|
||||
* @param lng
|
||||
* @param lat
|
||||
* @return
|
||||
@@ -611,7 +611,7 @@ public class PropertyController {
|
||||
|
||||
/**
|
||||
* 判断小区是否有经纬度
|
||||
*
|
||||
*
|
||||
* @param district
|
||||
* @return
|
||||
*/
|
||||
@@ -622,7 +622,7 @@ public class PropertyController {
|
||||
|
||||
/**
|
||||
* 调用匹配接口匹配小区
|
||||
*
|
||||
*
|
||||
* @param city
|
||||
* @param address
|
||||
* @param region
|
||||
@@ -1000,6 +1000,32 @@ public class PropertyController {
|
||||
}
|
||||
}
|
||||
|
||||
// 调整面积不同面积价格
|
||||
try {
|
||||
DistrictStatBo districtStatBo = districtStatService.findDistrictStat(new DistrictKey(district));
|
||||
int orgAvgPrice = 0;
|
||||
if (districtStatBo != null) {
|
||||
if (StringUtils.isNotBlank(district.getEstateType2()) && district.getEstateType2().contains("别墅") && districtStatBo.getVillaDistrictStat() != null) {
|
||||
orgAvgPrice = districtStatBo.getVillaDistrictStat().getAvgPrice();
|
||||
} else if (districtStatBo.getDistrictStat() != null) {
|
||||
orgAvgPrice = districtStatBo.getDistrictStat().getAvgPrice();
|
||||
}
|
||||
}
|
||||
if (evaluation != null && evaluation.getAvgPrice() != null && evaluation.getAvgPrice() > 0) {
|
||||
int factorPrice = evaluation.getAvgPrice();
|
||||
int avgPrice = evaluateFactorService.recompose(district.getCity(), district.getRegion(), evaluation.getArea(), factorPrice, orgAvgPrice);
|
||||
Integer minPrice = (int)(evaluation.getAvgPrice() * 0.95);
|
||||
Integer maxPrice = (int)(evaluation.getAvgPrice() * 1.05);
|
||||
// 偏离度超过5%不进行调整
|
||||
if (minPrice <= avgPrice && avgPrice <= maxPrice) {
|
||||
evaluation.setAvgPrice(avgPrice);
|
||||
evaluation.setBigTotalPrice((long) (avgPrice * evaluation.getArea()));
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
|
||||
}
|
||||
|
||||
if (evaluation.getTotalPrice() != null && evaluation.getTotalPrice() != 0
|
||||
&& (cityPriceCredit == null || evaluation.getCredit() >= cityPriceCredit)) {
|
||||
Map<String, Object> districtPriceMap = new HashMap<String, Object>();
|
||||
@@ -1172,20 +1198,29 @@ public class PropertyController {
|
||||
return mav;
|
||||
}
|
||||
// 调整面积不同面积价格
|
||||
DistrictStatBo districtStatBo = districtStatService.findDistrictStat(new DistrictKey(district));
|
||||
int orgAvgPrice = 0;
|
||||
if (districtStatBo != null) {
|
||||
if (StringUtils.isNotBlank(district.getEstateType2()) && district.getEstateType2().contains("别墅") && districtStatBo.getVillaDistrictStat() != null) {
|
||||
orgAvgPrice = districtStatBo.getVillaDistrictStat().getAvgPrice();
|
||||
} else if (districtStatBo.getDistrictStat() != null) {
|
||||
orgAvgPrice = districtStatBo.getDistrictStat().getAvgPrice();
|
||||
try {
|
||||
DistrictStatBo districtStatBo = districtStatService.findDistrictStat(new DistrictKey(district));
|
||||
int orgAvgPrice = 0;
|
||||
if (districtStatBo != null) {
|
||||
if (StringUtils.isNotBlank(district.getEstateType2()) && district.getEstateType2().contains("别墅") && districtStatBo.getVillaDistrictStat() != null) {
|
||||
orgAvgPrice = districtStatBo.getVillaDistrictStat().getAvgPrice();
|
||||
} else if (districtStatBo.getDistrictStat() != null) {
|
||||
orgAvgPrice = districtStatBo.getDistrictStat().getAvgPrice();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (evaluation != null && evaluation.getAvgPrice() != null && evaluation.getAvgPrice() > 0) {
|
||||
int factorPrice = evaluation.getAvgPrice();
|
||||
int avgPrice = evaluateFactorService.recompose(district.getCity(), district.getRegion(), evaluation.getArea(), factorPrice, orgAvgPrice);
|
||||
evaluation.setAvgPrice(avgPrice);
|
||||
evaluation.setTotalPrice((int) (avgPrice * evaluation.getArea()));
|
||||
if (evaluation != null && evaluation.getAvgPrice() != null && evaluation.getAvgPrice() > 0) {
|
||||
int factorPrice = evaluation.getAvgPrice();
|
||||
int avgPrice = evaluateFactorService.recompose(district.getCity(), district.getRegion(), evaluation.getArea(), factorPrice, orgAvgPrice);
|
||||
Integer minPrice = (int)(evaluation.getAvgPrice() * 0.95);
|
||||
Integer maxPrice = (int)(evaluation.getAvgPrice() * 1.05);
|
||||
// 偏离度超过5%不进行调整
|
||||
if (minPrice <= avgPrice && avgPrice <= maxPrice) {
|
||||
evaluation.setAvgPrice(avgPrice);
|
||||
evaluation.setBigTotalPrice((long) (avgPrice * evaluation.getArea()));
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
|
||||
}
|
||||
Map<String, Object> districtPriceMap = new LinkedHashMap<String, Object>();
|
||||
districtPriceMap.put("city", district.getCity());
|
||||
@@ -1512,7 +1547,7 @@ public class PropertyController {
|
||||
return mav;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 四川锦程 定制接口 多建筑年代
|
||||
* @param model
|
||||
@@ -1624,7 +1659,7 @@ public class PropertyController {
|
||||
districtPriceMap.put("buildYear", matcher3.group());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 根据城市等 级设置D级可信度
|
||||
ApiUserAuthority apiUserAuthority = apiUserAuthorityService
|
||||
@@ -2137,7 +2172,7 @@ public class PropertyController {
|
||||
|
||||
/**
|
||||
* 小区租金查询接口
|
||||
*
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -2616,7 +2651,7 @@ public class PropertyController {
|
||||
|
||||
/**
|
||||
* 批量获取小区的均价,均价走势数据
|
||||
*
|
||||
*
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@@ -2758,7 +2793,7 @@ public class PropertyController {
|
||||
|
||||
/**
|
||||
* 批量获取小区的配套数据,最多12个小区
|
||||
*
|
||||
*
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@@ -2903,7 +2938,7 @@ public class PropertyController {
|
||||
|
||||
/**
|
||||
* 获取JSON参数中的num参数值
|
||||
*
|
||||
*
|
||||
* @param jo
|
||||
* @return
|
||||
*/
|
||||
@@ -2928,7 +2963,7 @@ public class PropertyController {
|
||||
|
||||
/**
|
||||
* 获取JSON参数中的radius值
|
||||
*
|
||||
*
|
||||
* @param jo
|
||||
* @return
|
||||
*/
|
||||
@@ -3736,7 +3771,7 @@ public class PropertyController {
|
||||
|
||||
/**
|
||||
* 解析出关键字中的小区名
|
||||
*
|
||||
*
|
||||
* @param keyword
|
||||
* @return
|
||||
*/
|
||||
@@ -3853,7 +3888,7 @@ public class PropertyController {
|
||||
|
||||
/**
|
||||
* 小区统计分析接口
|
||||
*
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -3938,7 +3973,7 @@ public class PropertyController {
|
||||
|
||||
/**
|
||||
* 小区交通接口
|
||||
*
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -3996,7 +4031,7 @@ public class PropertyController {
|
||||
|
||||
/**
|
||||
* 小区周边接口
|
||||
*
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -4055,7 +4090,7 @@ public class PropertyController {
|
||||
/**
|
||||
* 相同小区相似户型房源挂牌量接口<br>
|
||||
* 获取该小区的满足指定相似条件的挂牌房源量 条件说明: 1.输入面积-5<=房源面积<=输入面积+5 2.上个月发布的房源
|
||||
*
|
||||
*
|
||||
* @author yinjihuan
|
||||
* @date 2016年9月1日
|
||||
* @param city
|
||||
@@ -4095,7 +4130,7 @@ public class PropertyController {
|
||||
/**
|
||||
* 周边小区相似户型挂牌量接口<br>
|
||||
* 获取该小区的满足指定相似条件的挂牌房源量 条件说明: 1.输入面积-5<=房源面积<=输入面积+5 2.上个月发布的房源
|
||||
*
|
||||
*
|
||||
* @author yinjihuan
|
||||
* @date 2016年9月1日
|
||||
* @param city
|
||||
@@ -4146,7 +4181,7 @@ public class PropertyController {
|
||||
|
||||
/**
|
||||
* 小区周边一公里均价
|
||||
*
|
||||
*
|
||||
* @author wenyan
|
||||
* @param model
|
||||
* @return
|
||||
@@ -4169,7 +4204,7 @@ public class PropertyController {
|
||||
|
||||
/**
|
||||
* 相同小区相似户型租金范围查询接口
|
||||
*
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -4212,7 +4247,7 @@ public class PropertyController {
|
||||
|
||||
/**
|
||||
* 周边小区相似户型租金范围查询接口
|
||||
*
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -4275,7 +4310,7 @@ public class PropertyController {
|
||||
|
||||
/**
|
||||
* 室号查询接口
|
||||
*
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -4311,7 +4346,7 @@ public class PropertyController {
|
||||
|
||||
/**
|
||||
* 楼栋楼层信息查询接口
|
||||
*
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -4336,7 +4371,7 @@ public class PropertyController {
|
||||
|
||||
/**
|
||||
* 楼栋查询接口
|
||||
*
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -4381,7 +4416,7 @@ public class PropertyController {
|
||||
|
||||
/**
|
||||
* 楼栋查询接口
|
||||
*
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -4834,7 +4869,7 @@ public class PropertyController {
|
||||
|
||||
/**
|
||||
* 房产交易记录查询
|
||||
*
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -4894,7 +4929,7 @@ public class PropertyController {
|
||||
|
||||
/**
|
||||
* 房产拍卖记录
|
||||
*
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
@@ -4955,7 +4990,7 @@ public class PropertyController {
|
||||
|
||||
/**
|
||||
* 房产近期评估次数
|
||||
*
|
||||
*
|
||||
* @param model
|
||||
* @return
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user