新增周边统计
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
package com.fangjia.dal.mongo.open.dao;
|
||||
|
||||
import com.fangjia.dal.MongoDao;
|
||||
import com.fangjia.dal.mongo.model.CountDistrictStatBycity;
|
||||
import com.fangjia.dal.mongo.open.model.CommunityPoi;
|
||||
|
||||
public interface CommunityPoiDao extends MongoDao<CommunityPoi> {
|
||||
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package com.fangjia.dal.mongo.open.dao.impl;
|
||||
|
||||
import com.fangjia.dal.MongoDaoImpl;
|
||||
import com.fangjia.dal.mongo.open.dao.ApiVisitCountDao;
|
||||
import com.fangjia.dal.mongo.open.dao.CommunityPoiDao;
|
||||
import com.fangjia.dal.mongo.open.model.CommunityPoi;
|
||||
import com.fangjia.dal.mongo.tool.model.ApiVisitCount;
|
||||
|
||||
public class CommunityPoiDaoImpl extends MongoDaoImpl<CommunityPoi> implements CommunityPoiDao {
|
||||
}
|
||||
+135
@@ -0,0 +1,135 @@
|
||||
package com.fangjia.dal.mongo.open.model;
|
||||
|
||||
import com.fangjia.dal.MongoEntity;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 小区周边配套统计信息
|
||||
*
|
||||
* @author shenjian@fangjia.com
|
||||
*/
|
||||
@Entity
|
||||
@Table(name = "fangjia_stat.community_poi_gj")
|
||||
public class CommunityPoi implements MongoEntity {
|
||||
|
||||
private static final long serialVersionUID = -7663644539542318409L;
|
||||
|
||||
private String id;
|
||||
private String city;
|
||||
private String region;
|
||||
private String name;
|
||||
private Integer subway;
|
||||
private Integer traffic;
|
||||
private Integer bank;
|
||||
private Integer primary;
|
||||
private Integer junior;
|
||||
private Integer hospital;
|
||||
/**
|
||||
* 不利设施,丧葬
|
||||
*/
|
||||
private Integer funeral;
|
||||
|
||||
@Id
|
||||
@Column(name = "_id")
|
||||
@Override
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
@Column(name = "city")
|
||||
public String getCity() {
|
||||
return city;
|
||||
}
|
||||
|
||||
public void setCity(String city) {
|
||||
this.city = city;
|
||||
}
|
||||
|
||||
@Column(name = "region")
|
||||
public String getRegion() {
|
||||
return region;
|
||||
}
|
||||
|
||||
public void setRegion(String region) {
|
||||
this.region = region;
|
||||
}
|
||||
|
||||
@Column(name = "name")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
@Column(name = "subway")
|
||||
public Integer getSubway() {
|
||||
return subway;
|
||||
}
|
||||
|
||||
public void setSubway(Integer subway) {
|
||||
this.subway = subway;
|
||||
}
|
||||
|
||||
@Column(name = "traffic")
|
||||
public Integer getTraffic() {
|
||||
return traffic;
|
||||
}
|
||||
|
||||
public void setTraffic(Integer traffic) {
|
||||
this.traffic = traffic;
|
||||
}
|
||||
|
||||
@Column(name = "bank")
|
||||
public Integer getBank() {
|
||||
return bank;
|
||||
}
|
||||
|
||||
public void setBank(Integer bank) {
|
||||
this.bank = bank;
|
||||
}
|
||||
|
||||
@Column(name = "primary")
|
||||
public Integer getPrimary() {
|
||||
return primary;
|
||||
}
|
||||
|
||||
public void setPrimary(Integer primary) {
|
||||
this.primary = primary;
|
||||
}
|
||||
|
||||
@Column(name = "junior")
|
||||
public Integer getJunior() {
|
||||
return junior;
|
||||
}
|
||||
|
||||
public void setJunior(Integer junior) {
|
||||
this.junior = junior;
|
||||
}
|
||||
|
||||
@Column(name = "hospital")
|
||||
public Integer getHospital() {
|
||||
return hospital;
|
||||
}
|
||||
|
||||
public void setHospital(Integer hospital) {
|
||||
this.hospital = hospital;
|
||||
}
|
||||
|
||||
@Column(name = "funeral")
|
||||
public Integer getFuneral() {
|
||||
return funeral;
|
||||
}
|
||||
|
||||
public void setFuneral(Integer funeral) {
|
||||
this.funeral = funeral;
|
||||
}
|
||||
}
|
||||
+23
@@ -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;
|
||||
@@ -1266,6 +1269,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));
|
||||
@@ -5601,4 +5616,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;
|
||||
}
|
||||
}
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.fangjia.service.open;
|
||||
|
||||
import com.fangjia.dal.mongo.open.model.CommunityPoi;
|
||||
|
||||
public interface CommunityPoiService {
|
||||
|
||||
CommunityPoi getById(String id);
|
||||
}
|
||||
+19
@@ -0,0 +1,19 @@
|
||||
package com.fangjia.service.open.impl;
|
||||
|
||||
import com.fangjia.dal.mongo.open.dao.CommunityPoiDao;
|
||||
import com.fangjia.dal.mongo.open.model.CommunityPoi;
|
||||
import com.fangjia.service.open.CommunityPoiService;
|
||||
|
||||
public class CommunityPoiServiceImpl implements CommunityPoiService {
|
||||
|
||||
private CommunityPoiDao communityPoiDao;
|
||||
|
||||
@Override
|
||||
public CommunityPoi getById(String id) {
|
||||
return communityPoiDao.findById(id);
|
||||
}
|
||||
|
||||
public void setCommunityPoiDao(CommunityPoiDao communityPoiDao) {
|
||||
this.communityPoiDao = communityPoiDao;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user