优化写字楼估值
This commit is contained in:
+12
-2
@@ -78,8 +78,13 @@ public class OfficeServiceImpl implements OfficeService {
|
||||
}
|
||||
if (seawaters.size() > 0) {
|
||||
unitPrice = this.calcRent(seawaters, evaluation);
|
||||
} else if (StringUtils.isNotBlank(evaluation.getLocation())) {
|
||||
unitPrice = rentEvaluateByLocation(evaluation);
|
||||
} else {
|
||||
if (StringUtils.isNotBlank(evaluation.getLocation())) {
|
||||
unitPrice = rentEvaluateByLocation(evaluation);
|
||||
} else if (district != null && district.getLat() != null) {
|
||||
evaluation.setLocation(district.getLng() / Math.pow(10, 10) + "," + district.getLat() / Math.pow(10, 10));
|
||||
unitPrice = rentEvaluateByLocation(evaluation);
|
||||
}
|
||||
}
|
||||
// 评估逻辑
|
||||
evaluation.setUnitPrice(unitPrice);
|
||||
@@ -290,6 +295,11 @@ public class OfficeServiceImpl implements OfficeService {
|
||||
query.setEndArea(null);
|
||||
seawaters = seawaterService.findSeawatersByQuery(query);
|
||||
}
|
||||
// 如果还查不到,取周边三公里,如上海青浦凤新大楼,太偏了
|
||||
if (CollectionUtils.isEmpty(seawaters)) {
|
||||
query.setRadius(3000);
|
||||
seawaters = seawaterService.findSeawatersByQuery(query);
|
||||
}
|
||||
if (CollectionUtils.isNotEmpty(seawaters)) {
|
||||
return calcRent(seawaters, evaluation);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user