Merge remote-tracking branch 'origin/master'
This commit is contained in:
+5
-4
@@ -34,9 +34,9 @@ class MinglujiData {
|
||||
def prov = "河北省"
|
||||
def city = "石家庄市"
|
||||
// exportDatas(city)
|
||||
matchDev(prov, city)
|
||||
matchCommunity(city)
|
||||
fiveLevelSplit(city)
|
||||
// matchDev(prov, city)
|
||||
// matchCommunity(city)
|
||||
// fiveLevelSplit(city)
|
||||
nineLevelSplit(city)
|
||||
// tempMatchDev(prov)
|
||||
|
||||
@@ -214,6 +214,7 @@ class MinglujiData {
|
||||
fileName = "D:\\数据\\数据建设\\名录集\\${city}_${i}.xlsx"
|
||||
}
|
||||
|
||||
println "开始读取:"+fileName
|
||||
File file = new File(fileName);
|
||||
if (file.exists()) {
|
||||
ExcelUtils.multiThreadingModify(fileName,{d->
|
||||
@@ -235,7 +236,7 @@ class MinglujiData {
|
||||
}
|
||||
}
|
||||
|
||||
if(d['E'] && !d['M']) {
|
||||
if(d['J'] && !d['M']) {
|
||||
def jsonObject = com.fangjia.script.gj.district.FangjiaClientUtils.formatNinelevel(d['B'], d['J'])
|
||||
def street = jsonObject.get("street")
|
||||
def streetNumber = jsonObject.get("streetNumber")
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.fangjia.script.util
|
||||
|
||||
import com.fangjia.core.RegionData
|
||||
import com.fangjia.core.util.HttpRequest
|
||||
import com.mongodb.BasicDBObject
|
||||
import com.mongodb.DBCollection
|
||||
import com.mongodb.DBObject
|
||||
@@ -192,6 +193,19 @@ public class CommonUtils {
|
||||
}
|
||||
}
|
||||
|
||||
static void recalcAverage(String city, String region, String name, Integer count =1 , String category="sell", Boolean retainHistory=true){
|
||||
def url = "http://192.168.0.100:38080/FangJiaDataService/districtPriceCalculate";
|
||||
def params = new HashMap<String,String>();
|
||||
params.city = city;
|
||||
params.region = region;
|
||||
params.name = name;
|
||||
params.count = count.toString();
|
||||
params.category = category;
|
||||
params.retainHistory = retainHistory.toString();
|
||||
HttpRequest request = new HttpRequest();
|
||||
println(request.get(url, params, "UTF-8"))
|
||||
}
|
||||
|
||||
/**
|
||||
* 重算小区均价
|
||||
* @param city
|
||||
@@ -221,7 +235,7 @@ public class CommonUtils {
|
||||
cmd.put("name", name)
|
||||
cmd.put('estate_type', estateType)
|
||||
cmd.put("calc_date", calcDate)
|
||||
cmd.put("calc_type", 0)
|
||||
cmd.put("calc_type", calcType)
|
||||
println(cmd)
|
||||
DBObject data = new BasicDBObject()
|
||||
data.put("category", "sell")
|
||||
|
||||
+10
-9
@@ -229,7 +229,7 @@ public class CzbankSampleServiceImpl implements CzbankSampleService {
|
||||
}
|
||||
}
|
||||
|
||||
List<SampleWrapper> samples = findJnbankSampleByDistrict(district, keys, names, queryBean.getPropertyTypeCode(), queryBean.getUpdateDate(), districtStat);
|
||||
List<SampleWrapper> samples = findJnbankSampleByDistrict(district, keys, names, queryBean.getPropertyTypeCode(), queryBean.getUpdateDate(), districtStat, target.getStrctureArea());
|
||||
|
||||
// scoreForSample(samples, target);
|
||||
sortForSample(samples, target);
|
||||
@@ -269,7 +269,7 @@ public class CzbankSampleServiceImpl implements CzbankSampleService {
|
||||
}
|
||||
}
|
||||
|
||||
List<SampleWrapper> nearlySample = findJnbankSampleByDistrict(district, arroundKeys, arroundNnames, queryBean.getPropertyTypeCode(), queryBean.getUpdateDate(), districtStat);
|
||||
List<SampleWrapper> nearlySample = findJnbankSampleByDistrict(district, arroundKeys, arroundNnames, queryBean.getPropertyTypeCode(), queryBean.getUpdateDate(), districtStat, target.getStrctureArea());
|
||||
|
||||
for (SampleWrapper sample : nearlySample) {
|
||||
sample.setProperty(district);
|
||||
@@ -346,13 +346,13 @@ public class CzbankSampleServiceImpl implements CzbankSampleService {
|
||||
propertyLife = "40";
|
||||
} else {
|
||||
if (sample.getBuildStructureCode() != null) {
|
||||
if ("10".equals(sample.getBuildStructureCode())) {
|
||||
if ("10".equals(sample.getBuildStructureCode().toString())) {
|
||||
propertyLife = "70";
|
||||
} else if ("20".equals(sample.getBuildStructureCode())) {
|
||||
} else if ("20".equals(sample.getBuildStructureCode().toString())) {
|
||||
propertyLife = "60";
|
||||
} else if ("40".equals(sample.getBuildStructureCode())) {
|
||||
} else if ("40".equals(sample.getBuildStructureCode().toString())) {
|
||||
propertyLife = "40";
|
||||
} else if ("30".equals(sample.getBuildStructureCode())) {
|
||||
} else if ("30".equals(sample.getBuildStructureCode().toString())) {
|
||||
propertyLife = "50";
|
||||
} else {
|
||||
propertyLife = "60";
|
||||
@@ -770,7 +770,6 @@ public class CzbankSampleServiceImpl implements CzbankSampleService {
|
||||
return d1.compareTo(d2);
|
||||
}
|
||||
});
|
||||
|
||||
List<Integer> prices = new ArrayList<Integer>();
|
||||
for (SampleWrapper sample : samples) {
|
||||
if (!prices.contains(sample.getUnitPrice())) {
|
||||
@@ -989,7 +988,7 @@ public class CzbankSampleServiceImpl implements CzbankSampleService {
|
||||
* @param startDate
|
||||
* @return
|
||||
*/
|
||||
private List<SampleWrapper> findJnbankSampleByDistrict(District district, List<String> keys, List<String> names, String estateType, Date startDate, DistrictStat districtStat) {
|
||||
private List<SampleWrapper> findJnbankSampleByDistrict(District district, List<String> keys, List<String> names, String estateType, Date startDate, DistrictStat districtStat,double area) {
|
||||
|
||||
|
||||
BooleanQuery nameQuery = new BooleanQuery();
|
||||
@@ -1013,8 +1012,10 @@ public class CzbankSampleServiceImpl implements CzbankSampleService {
|
||||
houseQuery.add(new QueryParam("avgPrice", QueryParam.GREATER_THAN_EQUAL_OPERATOR, (int) (avgPrice * 0.5)));//0.85
|
||||
houseQuery.add(new QueryParam("avgPrice", QueryParam.LESS_THAN_EQUAL_OPERATOR, (int) (avgPrice * 1.5)));//1.15
|
||||
}
|
||||
houseQuery.add(new QueryParam("area", QueryParam.LESS_THAN_EQUAL_OPERATOR, area + 30));
|
||||
houseQuery.add(new QueryParam("area", QueryParam.GREATER_THAN_EQUAL_OPERATOR, area - 30));
|
||||
|
||||
if (nameQuery.clauses().size() == 0) {
|
||||
if (nameQuery.clauses().isEmpty()){
|
||||
return samples;
|
||||
}
|
||||
BooleanQuery srQuery = new BooleanQuery();
|
||||
|
||||
Reference in New Issue
Block a user