接口修改
This commit is contained in:
+20
@@ -45,6 +45,10 @@ public class OfficeServiceImpl implements OfficeService {
|
||||
evaluation.setFloor(null);
|
||||
evaluation.setHeight(null);
|
||||
}
|
||||
if(null != district.getLng()){
|
||||
String location = district.getLng()/10000000000.0+","+district.getLat()/10000000000.0;
|
||||
evaluation.setLocation(location);
|
||||
}
|
||||
OfficeEvaluationDto officeEvaluationDto = this.calcRent(evaluation);
|
||||
// 如果从基价表中找不到,// 第三步:周边(三公里内最近的10个写字楼)同等级、同类型写字楼的均值*楼层系数*装修系数*朝向系数
|
||||
if (officeEvaluationDto == null || officeEvaluationDto.getUnitPrice() == null) {
|
||||
@@ -345,6 +349,11 @@ public class OfficeServiceImpl implements OfficeService {
|
||||
}
|
||||
query.setCat(cat);
|
||||
query.setRadius(3000);
|
||||
if(StringUtils.isNotBlank(evaluation.getLocation())){
|
||||
String[] locationArrs = evaluation.getLocation().split(",");
|
||||
query.setLng(Double.valueOf(locationArrs[0]));
|
||||
query.setLat(Double.valueOf(locationArrs[1]));
|
||||
}
|
||||
|
||||
Integer endDate = Integer.valueOf(DateUtil.formatByPattern(new Date(), "yyyyMMdd"));
|
||||
Integer startDate = Integer.valueOf(DateUtil.formatByPattern(DateUtil.addMonthToDate(new Date(), -12), "yyyyMMdd"));
|
||||
@@ -357,6 +366,7 @@ public class OfficeServiceImpl implements OfficeService {
|
||||
pager.setPageSize(5);
|
||||
query.setPager(pager);
|
||||
query.setTable("latest_seawater");
|
||||
|
||||
List<Seawater> seawaters = seawaterService.findSeawatersByQuery(query);
|
||||
return getOfficeEvaluationDto(seawaters, evaluation, cat);
|
||||
}
|
||||
@@ -496,6 +506,12 @@ public class OfficeServiceImpl implements OfficeService {
|
||||
seawaterDto.setBedKind(seawater.getLevel());
|
||||
seawaterDto.setPublishDate(String.valueOf(seawater.getpDate()));
|
||||
seawaterDto.setFloorInfo(seawater.getFloorInfo());
|
||||
if(StringUtils.isNotBlank(seawater.getLocation())){
|
||||
seawaterDto.setLocation(seawater.getLocation());
|
||||
}
|
||||
seawaterDto.setTotalPrice(seawater.getTotalPrice());
|
||||
seawaterDto.setEstateType(seawater.getEstateType());
|
||||
seawaterDto.setId(seawater.getId());
|
||||
return seawaterDto;
|
||||
}
|
||||
|
||||
@@ -749,6 +765,10 @@ public class OfficeServiceImpl implements OfficeService {
|
||||
evaluation.setFloor(null);
|
||||
evaluation.setHeight(null);
|
||||
}
|
||||
if(null != district.getLng()){
|
||||
String location = district.getLng()/10000000000.0+","+district.getLat()/10000000000.0;
|
||||
evaluation.setLocation(location);
|
||||
}
|
||||
OfficeEvaluationDto officeEvaluationDto = this.calcSell(evaluation);
|
||||
// 如果从基价表中找不到,// 第三步:周边(三公里内最近的10个写字楼)同等级、同类型写字楼的均值*楼层系数*装修系数*朝向系数
|
||||
if (officeEvaluationDto == null || officeEvaluationDto.getUnitPrice() == null) {
|
||||
|
||||
Reference in New Issue
Block a user