写字楼地址估值结果加区域
This commit is contained in:
+1
-1
@@ -279,7 +279,7 @@ public class OfficeController {
|
|||||||
Map<String, Object> districtPriceMap = new HashMap<String, Object>();
|
Map<String, Object> districtPriceMap = new HashMap<String, Object>();
|
||||||
districtPriceMap.put("unitPrice", evaluation.getUnitPrice());
|
districtPriceMap.put("unitPrice", evaluation.getUnitPrice());
|
||||||
districtPriceMap.put("city", evaluation.getCity());
|
districtPriceMap.put("city", evaluation.getCity());
|
||||||
districtPriceMap.put("district", evaluation.getRegion());
|
districtPriceMap.put("district", evaluation.getDistrict());
|
||||||
districtPriceMap.put("name", evaluation.getName());
|
districtPriceMap.put("name", evaluation.getName());
|
||||||
districtPriceMap.put("samples", evaluation.getSeawater());
|
districtPriceMap.put("samples", evaluation.getSeawater());
|
||||||
districtPriceMap.put("refOffices", evaluation.getOffice());
|
districtPriceMap.put("refOffices", evaluation.getOffice());
|
||||||
|
|||||||
+12
-3
@@ -352,9 +352,14 @@ public class OfficeServiceImpl implements OfficeService {
|
|||||||
evaluation.setHeight(null);
|
evaluation.setHeight(null);
|
||||||
}
|
}
|
||||||
// 评估逻辑
|
// 评估逻辑
|
||||||
String location = getLocation(evaluation.getCity(), evaluation.getAddress());
|
// String location = getLocation(evaluation.getCity(), evaluation.getAddress());
|
||||||
evaluation.setLocation(location);
|
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);
|
return rentEvaluateByLocation(evaluation);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -435,6 +440,10 @@ public class OfficeServiceImpl implements OfficeService {
|
|||||||
}
|
}
|
||||||
return "";
|
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) {
|
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,
|
return CacheUtils.getValue(this.getClass(), "findOfficeRentStat", city + region + name + startDate + endDate,
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ public class GeoUtils {
|
|||||||
gaodeDto.setLevel(level);
|
gaodeDto.setLevel(level);
|
||||||
gaodeDto.setLng(lng);
|
gaodeDto.setLng(lng);
|
||||||
gaodeDto.setLat(lat);
|
gaodeDto.setLat(lat);
|
||||||
|
gaodeDto.setDistrict(geocode.getString("district"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ public class GaodeDto {
|
|||||||
|
|
||||||
private String level;
|
private String level;
|
||||||
|
|
||||||
|
private String district;
|
||||||
|
|
||||||
public Double getLng() {
|
public Double getLng() {
|
||||||
return lng;
|
return lng;
|
||||||
}
|
}
|
||||||
@@ -36,4 +38,12 @@ public class GaodeDto {
|
|||||||
public void setLevel(String level) {
|
public void setLevel(String level) {
|
||||||
this.level = level;
|
this.level = level;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getDistrict() {
|
||||||
|
return district;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDistrict(String district) {
|
||||||
|
this.district = district;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user