写字楼地址估值结果加区域

This commit is contained in:
majintao
2025-03-10 11:13:18 +08:00
parent 0f558c9e3d
commit 24d5089c50
4 changed files with 24 additions and 4 deletions
@@ -279,7 +279,7 @@ public class OfficeController {
Map<String, Object> districtPriceMap = new HashMap<String, Object>();
districtPriceMap.put("unitPrice", evaluation.getUnitPrice());
districtPriceMap.put("city", evaluation.getCity());
districtPriceMap.put("district", evaluation.getRegion());
districtPriceMap.put("district", evaluation.getDistrict());
districtPriceMap.put("name", evaluation.getName());
districtPriceMap.put("samples", evaluation.getSeawater());
districtPriceMap.put("refOffices", evaluation.getOffice());
@@ -352,9 +352,14 @@ public class OfficeServiceImpl implements OfficeService {
evaluation.setHeight(null);
}
// 评估逻辑
String location = getLocation(evaluation.getCity(), evaluation.getAddress());
evaluation.setLocation(location);
// String location = getLocation(evaluation.getCity(), evaluation.getAddress());
GaodeDto gaodeDto = getGaodeGeo(evaluation.getCity(), evaluation.getAddress());
if (gaodeDto.getLng() != null && gaodeDto.getLat() != null) {
evaluation.setLocation(gaodeDto.getLng() + "," + gaodeDto.getLat());
}else {
evaluation.setLocation("");
}
evaluation.setRegion(gaodeDto.getDistrict());
return rentEvaluateByLocation(evaluation);
}
@@ -435,6 +440,10 @@ public class OfficeServiceImpl implements OfficeService {
}
return "";
}
private GaodeDto getGaodeGeo(String city, String address) {
GaodeDto gaodeDto = GeoUtils.geo(city, address);
return gaodeDto;
}
public List<OfficeRentStat> findOfficeRentStat(final String city, final String region, final String name, final String cat, final Integer startDate, final Integer endDate) {
return CacheUtils.getValue(this.getClass(), "findOfficeRentStat", city + region + name + startDate + endDate,
@@ -48,6 +48,7 @@ public class GeoUtils {
gaodeDto.setLevel(level);
gaodeDto.setLng(lng);
gaodeDto.setLat(lat);
gaodeDto.setDistrict(geocode.getString("district"));
}
}
}
@@ -13,6 +13,8 @@ public class GaodeDto {
private String level;
private String district;
public Double getLng() {
return lng;
}
@@ -36,4 +38,12 @@ public class GaodeDto {
public void setLevel(String level) {
this.level = level;
}
public String getDistrict() {
return district;
}
public void setDistrict(String district) {
this.district = district;
}
}