新增一房一价逻辑
This commit is contained in:
+21
@@ -178,6 +178,7 @@ public class PropertyController {
|
|||||||
private SeawaterService seawaterService;
|
private SeawaterService seawaterService;
|
||||||
private SqmetreRentService sqmetreRentService;
|
private SqmetreRentService sqmetreRentService;
|
||||||
private CommunityPoiServiceImpl communityPoiService;
|
private CommunityPoiServiceImpl communityPoiService;
|
||||||
|
private EvaluateFactorService evaluateFactorService;
|
||||||
|
|
||||||
private FileDao fileDao = FileDao.getInstance();
|
private FileDao fileDao = FileDao.getInstance();
|
||||||
private static final int DEFAULT_PAGE_SIZE = 20;
|
private static final int DEFAULT_PAGE_SIZE = 20;
|
||||||
@@ -1170,6 +1171,22 @@ public class PropertyController {
|
|||||||
mav.setModel(BasicModel.buildOKModel().setMsg("暂时不支持该小区的估价").markNoData());
|
mav.setModel(BasicModel.buildOKModel().setMsg("暂时不支持该小区的估价").markNoData());
|
||||||
return mav;
|
return mav;
|
||||||
}
|
}
|
||||||
|
// 调整面积不同面积价格
|
||||||
|
DistrictStatBo districtStatBo = districtStatService.findDistrictStat(new DistrictKey(district));
|
||||||
|
int orgAvgPrice = 0;
|
||||||
|
if (districtStatBo != null) {
|
||||||
|
if (StringUtils.isNotBlank(district.getEstateType2()) && district.getEstateType2().contains("别墅") && districtStatBo.getVillaDistrictStat() != null) {
|
||||||
|
orgAvgPrice = districtStatBo.getVillaDistrictStat().getAvgPrice();
|
||||||
|
} else if (districtStatBo.getDistrictStat() != null) {
|
||||||
|
orgAvgPrice = districtStatBo.getDistrictStat().getAvgPrice();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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);
|
||||||
|
evaluation.setAvgPrice(avgPrice);
|
||||||
|
evaluation.setTotalPrice((int) (avgPrice * evaluation.getArea()));
|
||||||
|
}
|
||||||
Map<String, Object> districtPriceMap = new LinkedHashMap<String, Object>();
|
Map<String, Object> districtPriceMap = new LinkedHashMap<String, Object>();
|
||||||
districtPriceMap.put("city", district.getCity());
|
districtPriceMap.put("city", district.getCity());
|
||||||
districtPriceMap.put("district", district.getRegion());
|
districtPriceMap.put("district", district.getRegion());
|
||||||
@@ -5631,4 +5648,8 @@ public class PropertyController {
|
|||||||
public void setCommunityPoiService(CommunityPoiServiceImpl communityPoiService) {
|
public void setCommunityPoiService(CommunityPoiServiceImpl communityPoiService) {
|
||||||
this.communityPoiService = communityPoiService;
|
this.communityPoiService = communityPoiService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setEvaluateFactorService(EvaluateFactorService evaluateFactorService) {
|
||||||
|
this.evaluateFactorService = evaluateFactorService;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user