北交所价格改成2B
This commit is contained in:
+35
-7
@@ -258,9 +258,21 @@ public class ComprehensiveQueryController {
|
||||
DistrictStatBo statBo = districtStatService.findCurrentDistrictStat(new DistrictKey(district));
|
||||
if (null != statBo) {
|
||||
if (statBo.getDistrictStat() != null) {
|
||||
dto.setAvgPrice(statBo.getDistrictStat().getAvgPrice());
|
||||
// 有2B价格,使用2B价格
|
||||
Integer avgPrice2b = statBo.getDistrictStat().getAvg_price_2b();
|
||||
if (avgPrice2b != null && avgPrice2b > 0) {
|
||||
dto.setAvgPrice(avgPrice2b);
|
||||
} else {
|
||||
dto.setAvgPrice(statBo.getDistrictStat().getAvgPrice());
|
||||
}
|
||||
} else if (statBo.getVillaDistrictStat() != null) {
|
||||
dto.setAvgPrice(statBo.getVillaDistrictStat().getAvgPrice());
|
||||
// 有2B价格,使用2B价格
|
||||
Integer avgPrice2b = statBo.getVillaDistrictStat().getAvg_price_2b();
|
||||
if (avgPrice2b != null && avgPrice2b > 0) {
|
||||
dto.setAvgPrice(avgPrice2b);
|
||||
} else {
|
||||
dto.setAvgPrice(statBo.getVillaDistrictStat().getAvgPrice());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -640,10 +652,18 @@ public class ComprehensiveQueryController {
|
||||
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);
|
||||
// 有2B价格用2B价格,没有用2C
|
||||
Integer minPrice = 0;
|
||||
Integer maxPrice = 0;
|
||||
if (evaluation.getAvgPrice2b() != null && evaluation.getAvgPrice2b() > 0) {
|
||||
minPrice = (int) (evaluation.getAvgPrice2b() * 0.95);
|
||||
maxPrice = (int) (evaluation.getAvgPrice2b() * 1.05);
|
||||
} else {
|
||||
minPrice = (int) (evaluation.getAvgPrice() * 0.95);
|
||||
maxPrice = (int) (evaluation.getAvgPrice() * 1.05);
|
||||
}
|
||||
// 偏离度超过5%不进行调整
|
||||
if (minPrice <= avgPrice && avgPrice <= maxPrice) {
|
||||
if (minPrice != 0 && maxPrice != 0 && minPrice <= avgPrice && avgPrice <= maxPrice) {
|
||||
evaluation.setAvgPrice(avgPrice);
|
||||
evaluation.setBigTotalPrice((long) (avgPrice * evaluation.getArea()));
|
||||
}
|
||||
@@ -659,7 +679,11 @@ public class ComprehensiveQueryController {
|
||||
districtPriceMap.put("district", district.getRegion());
|
||||
districtPriceMap.put("name", district.getName());
|
||||
districtPriceMap.put("totalPrice", evaluation.getBigTotalPrice());
|
||||
districtPriceMap.put("avgPrice", evaluation.getAvgPrice());
|
||||
if (evaluation.getAvgPrice2b() != null && evaluation.getAvgPrice2b() != 0) {
|
||||
districtPriceMap.put("avgPrice", evaluation.getAvgPrice2b());
|
||||
} else {
|
||||
districtPriceMap.put("avgPrice", evaluation.getAvgPrice());
|
||||
}
|
||||
|
||||
// 根据城市等 级设置D级可信度
|
||||
ApiUserAuthority apiUserAuthority = apiUserAuthorityService
|
||||
@@ -884,7 +908,11 @@ public class ComprehensiveQueryController {
|
||||
otherPriceRets = new HashMap();
|
||||
}
|
||||
|
||||
otherPriceRets.put("fjw_price", evaluation.getAvgPrice());
|
||||
if (evaluation.getAvgPrice2b()!=null&&evaluation.getAvgPrice2b() > 0){
|
||||
otherPriceRets.put("fjw_price", evaluation.getAvgPrice2b());
|
||||
}else {
|
||||
otherPriceRets.put("fjw_price", evaluation.getAvgPrice());
|
||||
}
|
||||
Map<String, Object> levelMap = getPriceLevel(otherPriceRets, evaluation.getCredit());
|
||||
Long lastPrice = getLastPrice(levelMap, otherPriceRets, evaluation, dCredit);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user