Merge branch 'open_gj' into 'master'

新增周边统计

See merge request !301
This commit is contained in:
2022-05-18 19:27:14 +08:00
6 changed files with 204 additions and 0 deletions
@@ -31,12 +31,14 @@ import javax.validation.Valid;
import com.fangjia.core.util.*;
import com.fangjia.dal.*;
import com.fangjia.dal.mongo.model.*;
import com.fangjia.dal.mongo.open.model.CommunityPoi;
import com.fangjia.dal.seawater.dao.SeawaterDao;
import com.fangjia.dal.seawater.model.Seawater;
import com.fangjia.open.dto.*;
import com.fangjia.service.district.*;
import com.fangjia.service.mongo.fangjia.*;
import com.fangjia.service.open.*;
import com.fangjia.service.open.impl.CommunityPoiServiceImpl;
import com.fangjia.service.util.DistrictScoreUtil;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
@@ -175,6 +177,7 @@ public class PropertyController {
private SeawaterDao seawaterDao;
private SeawaterService seawaterService;
private SqmetreRentService sqmetreRentService;
private CommunityPoiServiceImpl communityPoiService;
private FileDao fileDao = FileDao.getInstance();
private static final int DEFAULT_PAGE_SIZE = 20;
@@ -1262,6 +1265,18 @@ public class PropertyController {
modelFeaturesFto.put("buildYear", String.valueOf(buildYear));
}
modelFeaturesFto.append("nearCommunity", nearCommunityDtos);
// 模型特征新增周边数量
CommunityPoi communityPoi = communityPoiService.getById(district.getId());
if (communityPoi != null) {
modelFeaturesFto.put("subway", communityPoi.getSubway());
modelFeaturesFto.put("traffic", communityPoi.getTraffic());
modelFeaturesFto.put("bank", communityPoi.getBank());
modelFeaturesFto.put("primary", communityPoi.getPrimary());
modelFeaturesFto.put("hospital", communityPoi.getHospital());
modelFeaturesFto.put("junior", communityPoi.getJunior());
modelFeaturesFto.put("funeral", communityPoi.getFuneral());
}
districtPriceMap.put("modelFeatures", modelFeaturesFto);
}
mav.setModel(BasicModel.buildOKModel().setResult(districtPriceMap));
@@ -5627,4 +5642,12 @@ public class PropertyController {
public void setRentDealPriceService(RentDealPriceService rentDealPriceService) {
this.rentDealPriceService = rentDealPriceService;
}
public CommunityPoiServiceImpl getCommunityPoiService() {
return communityPoiService;
}
public void setCommunityPoiService(CommunityPoiServiceImpl communityPoiService) {
this.communityPoiService = communityPoiService;
}
}