Merge remote-tracking branch 'origin/master'
This commit is contained in:
+18
-5
@@ -215,6 +215,11 @@ public class SeawaterDaoImpl extends com.fangjia.dal.SeawaterDaoImpl<Seawater> i
|
|||||||
seawater.setFloor(source.getInt("floor"));
|
seawater.setFloor(source.getInt("floor"));
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
seawater.setFloor(0);
|
seawater.setFloor(0);
|
||||||
|
}
|
||||||
|
try{
|
||||||
|
seawater.setFloorInfo(source.getString("floor_info"));
|
||||||
|
}catch(Exception e){
|
||||||
|
|
||||||
}
|
}
|
||||||
if(source.containsKey("fitment")){
|
if(source.containsKey("fitment")){
|
||||||
seawater.setFitment(source.getString("fitment"));
|
seawater.setFitment(source.getString("fitment"));
|
||||||
@@ -243,6 +248,14 @@ public class SeawaterDaoImpl extends com.fangjia.dal.SeawaterDaoImpl<Seawater> i
|
|||||||
if(source.containsKey("root")){
|
if(source.containsKey("root")){
|
||||||
seawater.setRoot(source.getString("root"));
|
seawater.setRoot(source.getString("root"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(source.containsKey("estate_type")){
|
||||||
|
seawater.setEstateType(source.getString("estate_type"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(source.containsKey("build_type")){
|
||||||
|
seawater.setBuildType(source.getString("build_type"));
|
||||||
|
}
|
||||||
seawaterList.add(seawater);
|
seawaterList.add(seawater);
|
||||||
}
|
}
|
||||||
return seawaterList;
|
return seawaterList;
|
||||||
@@ -391,11 +404,11 @@ public class SeawaterDaoImpl extends com.fangjia.dal.SeawaterDaoImpl<Seawater> i
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ²»Õ¹Ê¾É¾³ý
|
// ²»Õ¹Ê¾É¾³ý
|
||||||
JSONObject param = new JSONObject();
|
// JSONObject param = new JSONObject();
|
||||||
param.put("status", 0);
|
// param.put("status", 0);
|
||||||
JSONObject temp = new JSONObject();
|
// JSONObject temp = new JSONObject();
|
||||||
temp.put("term", param);
|
// temp.put("term", param);
|
||||||
jsonList.add(temp);
|
// jsonList.add(temp);
|
||||||
|
|
||||||
query.put("must", jsonList);
|
query.put("must", jsonList);
|
||||||
q.put("bool", query);
|
q.put("bool", query);
|
||||||
|
|||||||
@@ -48,6 +48,7 @@ public class Seawater implements SeawaterEntity {
|
|||||||
private Double area;
|
private Double area;
|
||||||
private Integer height;
|
private Integer height;
|
||||||
private Integer floor;
|
private Integer floor;
|
||||||
|
private String floorInfo;
|
||||||
private String fitment;
|
private String fitment;
|
||||||
private Integer room;
|
private Integer room;
|
||||||
private Integer hall;
|
private Integer hall;
|
||||||
@@ -60,6 +61,7 @@ public class Seawater implements SeawaterEntity {
|
|||||||
private Integer avgPrice;
|
private Integer avgPrice;
|
||||||
private String purpose;
|
private String purpose;
|
||||||
private String estateType;
|
private String estateType;
|
||||||
|
private String buildType;
|
||||||
|
|
||||||
@Id
|
@Id
|
||||||
@Column(name = "_id")
|
@Column(name = "_id")
|
||||||
@@ -197,6 +199,15 @@ public class Seawater implements SeawaterEntity {
|
|||||||
this.floor = floor;
|
this.floor = floor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Column(name = "floorInfo")
|
||||||
|
public String getFloorInfo() {
|
||||||
|
return floorInfo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setFloorInfo(String floorInfo) {
|
||||||
|
this.floorInfo = floorInfo;
|
||||||
|
}
|
||||||
|
|
||||||
@Column(name = "fitment")
|
@Column(name = "fitment")
|
||||||
public String getFitment() {
|
public String getFitment() {
|
||||||
return fitment;
|
return fitment;
|
||||||
@@ -305,4 +316,13 @@ public class Seawater implements SeawaterEntity {
|
|||||||
public void setEstateType(String estateType) {
|
public void setEstateType(String estateType) {
|
||||||
this.estateType = estateType;
|
this.estateType = estateType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Column(name = "build_type")
|
||||||
|
public String getBuildType() {
|
||||||
|
return buildType;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setBuildType(String buildType) {
|
||||||
|
this.buildType = buildType;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+9
@@ -203,6 +203,15 @@ public class AuctionController {
|
|||||||
if(StringUtils.isNotBlank(model.getName())){
|
if(StringUtils.isNotBlank(model.getName())){
|
||||||
params.add(new QueryParam("matchName", model.getName()));
|
params.add(new QueryParam("matchName", model.getName()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Date startDate = null;
|
||||||
|
if(StringUtils.isNotBlank(model.getStartDate())){
|
||||||
|
startDate = DateUtil.parseDate(model.getStartDate(),"yyyyMMdd");
|
||||||
|
if(startDate != null){
|
||||||
|
params.add(new QueryParam("startDate", startDate));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
List<SortParam> sortParams = new ArrayList<SortParam>();
|
List<SortParam> sortParams = new ArrayList<SortParam>();
|
||||||
sortParams.add(new SortParam("startDate", false));
|
sortParams.add(new SortParam("startDate", false));
|
||||||
List<PaiMai> paimais = paiMaiService.findAll(params, sortParams, model.getLimit(), SEARCH_FIELDS);
|
List<PaiMai> paimais = paiMaiService.findAll(params, sortParams, model.getLimit(), SEARCH_FIELDS);
|
||||||
|
|||||||
+3
-1
@@ -421,7 +421,9 @@ public class HouseController {
|
|||||||
district = districtService.findDistrict(districtKey, "district");
|
district = districtService.findDistrict(districtKey, "district");
|
||||||
}else{
|
}else{
|
||||||
district = districtService.findDistrictById(model.getId());
|
district = districtService.findDistrictById(model.getId());
|
||||||
districtKey = new DistrictKey(district.getCity(), district.getRegion(), district.getName());
|
if(district!=null){
|
||||||
|
districtKey = new DistrictKey(district.getCity(), district.getRegion(), district.getName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(district == null){
|
if(district == null){
|
||||||
|
|||||||
+15
-8
@@ -1171,11 +1171,12 @@ public class PropertyController {
|
|||||||
districtPriceMap.put("district", district.getRegion());
|
districtPriceMap.put("district", district.getRegion());
|
||||||
districtPriceMap.put("name", district.getName());
|
districtPriceMap.put("name", district.getName());
|
||||||
long totalPrice = evaluation.getBigTotalPrice();
|
long totalPrice = evaluation.getBigTotalPrice();
|
||||||
if(CITY_CORRECTION_FACTOR.containsKey(district.getCity())){
|
// 取消系数下调
|
||||||
totalPrice = (long)(totalPrice * (1 - CITY_CORRECTION_FACTOR.get(district.getCity())));
|
// if(CITY_CORRECTION_FACTOR.containsKey(district.getCity())){
|
||||||
evaluation.setBigTotalPrice(totalPrice);
|
// totalPrice = (long)(totalPrice * (1 - CITY_CORRECTION_FACTOR.get(district.getCity())));
|
||||||
evaluation.setAvgPrice((int)(totalPrice/evaluation.getArea()));
|
// evaluation.setBigTotalPrice(totalPrice);
|
||||||
}
|
// evaluation.setAvgPrice((int)(totalPrice/evaluation.getArea()));
|
||||||
|
// }
|
||||||
districtPriceMap.put("totalPrice", evaluation.getBigTotalPrice());
|
districtPriceMap.put("totalPrice", evaluation.getBigTotalPrice());
|
||||||
districtPriceMap.put("unitPrice", evaluation.getAvgPrice());
|
districtPriceMap.put("unitPrice", evaluation.getAvgPrice());
|
||||||
List<String> names = new ArrayList<String>();
|
List<String> names = new ArrayList<String>();
|
||||||
@@ -1217,7 +1218,7 @@ public class PropertyController {
|
|||||||
}else if(district.getLng() != null && district.getLng() > 0){
|
}else if(district.getLng() != null && district.getLng() > 0){
|
||||||
double lng = DataUtil.roundDouble(district.getLng() / 10000000000.0,6);
|
double lng = DataUtil.roundDouble(district.getLng() / 10000000000.0,6);
|
||||||
double lat = DataUtil.roundDouble(district.getLat() / 10000000000.0, 6);
|
double lat = DataUtil.roundDouble(district.getLat() / 10000000000.0, 6);
|
||||||
List<District> districts = districtService.findNearestDistrict(district.getEstateType2(), lng, lat, 1000 * 3 , 4, null);
|
List<District> districts = districtService.findNearestDistrict(district.getEstateType2(), lng, lat, 1000 * 3 , 6, null);
|
||||||
if(districts.size() < 2){
|
if(districts.size() < 2){
|
||||||
evaluationService.remove(evaluation.getId());
|
evaluationService.remove(evaluation.getId());
|
||||||
mav.setModel(BasicModel.buildOKModel().setMsg("暂时不支持该小区的估价").markNoData());
|
mav.setModel(BasicModel.buildOKModel().setMsg("暂时不支持该小区的估价").markNoData());
|
||||||
@@ -1255,9 +1256,15 @@ public class PropertyController {
|
|||||||
districtDto.append("buildYear", String.valueOf(buildYear));
|
districtDto.append("buildYear", String.valueOf(buildYear));
|
||||||
}
|
}
|
||||||
districtAnalyData = districtAnalyDataService.findByDistrictKey(new DistrictKey(d));
|
districtAnalyData = districtAnalyDataService.findByDistrictKey(new DistrictKey(d));
|
||||||
if(districtAnalyData != null && districtAnalyData.getHalfYearMarkup() != null){
|
if(districtAnalyData != null){
|
||||||
districtDto.append("halfYearMarkup",DataUtil.roundDouble( districtAnalyData.getHalfYearMarkup() * 100 ,2));
|
if (districtAnalyData.getHalfYearMarkup() != null) {
|
||||||
|
districtDto.append("halfYearMarkup", DataUtil.roundDouble(districtAnalyData.getHalfYearMarkup() * 100, 2));
|
||||||
|
}
|
||||||
|
if (districtAnalyData.getAvgPrice() != null && minPrice <= districtAnalyData.getAvgPrice() && maxPrice >= districtAnalyData.getAvgPrice()) {
|
||||||
|
districtDto.append("avgPrice", districtAnalyData.getAvgPrice());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nearCommunityDtos.add(districtDto);
|
nearCommunityDtos.add(districtDto);
|
||||||
}
|
}
|
||||||
Integer buildYear = districtService.getBuildYear(district);
|
Integer buildYear = districtService.getBuildYear(district);
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ public class AuctionModel extends FangjiaApiModel{
|
|||||||
private Integer propertyType;
|
private Integer propertyType;
|
||||||
private Integer status;
|
private Integer status;
|
||||||
private Integer limit = 10;
|
private Integer limit = 10;
|
||||||
|
private String startDate;
|
||||||
|
|
||||||
public String getId() {
|
public String getId() {
|
||||||
return id;
|
return id;
|
||||||
@@ -130,4 +131,12 @@ public class AuctionModel extends FangjiaApiModel{
|
|||||||
public void setName(String name) {
|
public void setName(String name) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getStartDate() {
|
||||||
|
return startDate;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setStartDate(String startDate) {
|
||||||
|
this.startDate = startDate;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+9
-11
@@ -1,12 +1,12 @@
|
|||||||
package com.fangjia.service.address;
|
package com.fangjia.service.address;
|
||||||
|
|
||||||
import com.fangjia.core.RegionData;
|
import com.fangjia.core.RegionData;
|
||||||
import com.fangjia.core.util.*;
|
import com.fangjia.core.util.DataUtil;
|
||||||
|
import com.fangjia.core.util.GeoUtils;
|
||||||
import com.fangjia.dal.QueryParam;
|
import com.fangjia.dal.QueryParam;
|
||||||
import com.fangjia.dal.common.DistrictKey;
|
import com.fangjia.dal.common.DistrictKey;
|
||||||
import com.fangjia.dal.common.ServerAreaData;
|
import com.fangjia.dal.common.ServerAreaData;
|
||||||
import com.fangjia.dal.mongo.fangjia.model.ServerArea;
|
import com.fangjia.dal.mongo.fangjia.model.ServerArea;
|
||||||
import com.fangjia.dal.mongo.model.AmapPoi;
|
|
||||||
import com.fangjia.dal.mongo.model.bkoff.HouseLoudong;
|
import com.fangjia.dal.mongo.model.bkoff.HouseLoudong;
|
||||||
import com.fangjia.dal.mongo.model.bkoff.Loudong;
|
import com.fangjia.dal.mongo.model.bkoff.Loudong;
|
||||||
import com.fangjia.dal.seaweed.dao.SeaweedDao;
|
import com.fangjia.dal.seaweed.dao.SeaweedDao;
|
||||||
@@ -16,17 +16,15 @@ import com.fangjia.service.address.processor.AddressDistrictProcessors;
|
|||||||
import com.fangjia.service.address.processor.AddressProcessors;
|
import com.fangjia.service.address.processor.AddressProcessors;
|
||||||
import com.fangjia.service.api.AliyunService;
|
import com.fangjia.service.api.AliyunService;
|
||||||
import com.fangjia.service.bo.AliyunBo;
|
import com.fangjia.service.bo.AliyunBo;
|
||||||
import com.fangjia.service.bo.MatchAddressScore;
|
|
||||||
import com.fangjia.service.datastore.DistrictService;
|
import com.fangjia.service.datastore.DistrictService;
|
||||||
import com.fangjia.service.mongo.addrepo.AddressRepoService;
|
import com.fangjia.service.mongo.addrepo.AddressRepoService;
|
||||||
import com.fangjia.service.mongo.bkoff.HouseLoudongService;
|
import com.fangjia.service.mongo.bkoff.HouseLoudongService;
|
||||||
import com.fangjia.service.mongo.bkoff.LoudongService;
|
import com.fangjia.service.mongo.bkoff.LoudongService;
|
||||||
import com.google.common.base.Function;
|
import com.google.common.base.Function;
|
||||||
import com.google.common.collect.MapMaker;
|
import com.google.common.collect.MapMaker;
|
||||||
import net.sf.json.JSONObject;
|
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.bson.types.ObjectId;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.concurrent.ConcurrentMap;
|
import java.util.concurrent.ConcurrentMap;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
@@ -916,23 +914,23 @@ public class AddressParserServiceImpl implements AddressParserService {
|
|||||||
} else if (standardAddressScore > 0) {
|
} else if (standardAddressScore > 0) {
|
||||||
matchLevelScore = 0.8;
|
matchLevelScore = 0.8;
|
||||||
similarityScore = standardAddressScore * SIMILARITY_RATE;
|
similarityScore = standardAddressScore * SIMILARITY_RATE;
|
||||||
}else if(metaData.getId().equals(address.getPolygonSeaweedId())){
|
|
||||||
matchLevelScore = 0.7;
|
|
||||||
similarityScore = 0.05;
|
|
||||||
} else if(keywordScore > 0 && streetScore > 0){
|
} else if(keywordScore > 0 && streetScore > 0){
|
||||||
matchLevelScore = 0.6;
|
matchLevelScore = 0.7;
|
||||||
similarityScore = Math.max(streetScore, keywordScore * 0.8) * SIMILARITY_RATE;
|
similarityScore = Math.max(streetScore, keywordScore * 0.8) * SIMILARITY_RATE;
|
||||||
} else if (keywordScore > 0) {
|
} else if (keywordScore > 0) {
|
||||||
matchLevelScore = 0.5;
|
matchLevelScore = 0.6;
|
||||||
similarityScore = keywordScore * SIMILARITY_RATE;
|
similarityScore = keywordScore * SIMILARITY_RATE;
|
||||||
} else if (fuzzyKeywordsScore > 0) {
|
} else if (fuzzyKeywordsScore > 0) {
|
||||||
if(address.hasCoordinate() && metaData.getLng() != null && GeoUtils.calculateDistance(address.getLng(), address.getLat(),
|
if(address.hasCoordinate() && metaData.getLng() != null && GeoUtils.calculateDistance(address.getLng(), address.getLat(),
|
||||||
metaData.getLng(), metaData.getLat()) < 100){
|
metaData.getLng(), metaData.getLat()) < 100){
|
||||||
matchLevelScore = 0.6;
|
matchLevelScore = 0.7;
|
||||||
}else{
|
}else{
|
||||||
matchLevelScore = 0.4;
|
matchLevelScore = 0.4;
|
||||||
}
|
}
|
||||||
similarityScore = fuzzyKeywordsScore * SIMILARITY_RATE;
|
similarityScore = fuzzyKeywordsScore * SIMILARITY_RATE;
|
||||||
|
}else if(metaData.getId().equals(address.getPolygonSeaweedId())){
|
||||||
|
matchLevelScore = 0.4;
|
||||||
|
similarityScore = 0.05;
|
||||||
}
|
}
|
||||||
if (similarityScore > 0) {
|
if (similarityScore > 0) {
|
||||||
if(metaData.getBuildingType() != null){
|
if(metaData.getBuildingType() != null){
|
||||||
|
|||||||
Reference in New Issue
Block a user