Merge branch 'script_gj' into 'master'

update

See merge request !100
This commit is contained in:
2021-09-02 20:03:21 +08:00
5 changed files with 9 additions and 10 deletions
@@ -34,7 +34,7 @@ class BigdataCommunityBatch extends BaseBatch{
@Override
public void process(Object args) {
def citys = ["宁波"]// CcbCommonUtils.citys;
def citys = CcbCommonUtils.citys;
def rows = []
def headers = ["城市ID","行政区ID","小区ID","行政区名称","小区名称","详细地址","纬度","经度","占地总面积","建筑总面积","绿化率","容积率","车位数量","建筑年代","房屋用途",
@@ -420,8 +420,8 @@ class BigdataDealBatch extends BaseBatch{
startPrice = (int)(price - price*0.1)
endPrice = (int)(price*0.5 + price)
}else{
startPrice = (int)(price - price*0.5)
endPrice = (int)(price*0.5 + price)
startPrice = 1//(int)(price - price*0.5)
endPrice = 500000//(int)(price*0.5 + price)
}
}
def trades = CcbCommonUtils.findTradesDetail(dist, startDate, endDate, startPrice, endPrice)
@@ -459,8 +459,8 @@ class BigdataDealBatch extends BaseBatch{
startPrice = (int)(price - price*0.1)
endPrice = (int)(price*0.5 + price)
}else{
startPrice = (int)(price - price*0.5)
endPrice = (int)(price*0.5 + price)
startPrice = 1//(int)(price - price*0.5)
endPrice = 500000//(int)(price*0.5 + price)
}
if(obj.price>=startPrice && obj.price<=endPrice){
rets << obj;
@@ -174,6 +174,7 @@ class CcbCommonUtils {
q.put("visible",0)
q.put("cat", cat);
q.put("city", city);
// q.put("name", "美辰香醒")
// q.put("name_cat", 0);
// q.put("estate_type2", new BasicDBObject('$in', ["普通住宅","商住"]))
@@ -186,7 +187,7 @@ class CcbCommonUtils {
def dbsour = getDataStoreConnection().find(q, keys).batchSize(2000)
def rets = []
for(def d : dbsour){
if(d.name_cat == 0 && d.lng && ["普通住宅","商住"].contains(d.estate_type2)){
if(d.name_cat == 0 && d.lng && ["普通住宅","商住"].contains(d.estate_type2) && !d.name.contains("洋房") && !d.name.contains("公房")){
if(d.address){
d.address = d.address.replaceAll("\r|\n|\\s", "");
}
@@ -107,7 +107,7 @@ class NameProcess {
}
}
if(name && !name.contains("路") && !name.contains("街") && !name.contains("大道") && !name.contains("巷")){
def h1 = DataUtil.match(name, Pattern.compile("(\\w+)?-?\\w+(号|排)"))
def h1 = DataUtil.match(name, Pattern.compile("(\\w+)?-?\\w+(排)"))
if(h1){
name = name.replaceAll(h1,"")
}
@@ -24,6 +24,7 @@ class SeaweedDataMatchProcess {
rMap.estate_type2 = obj.estate_type2
rMap.city = obj.city
rMap.region = obj.region
rMap.alias = obj.alias
rMap.name = obj.name
rMap.lat = obj.lat/10000000000.0
rMap.lng = obj.lng/10000000000.0
@@ -43,9 +44,6 @@ class SeaweedDataMatchProcess {
}
}
// if(rMap && rMap.id && region.contains(rMap.region)) {
// def obj = CommonDatautils.findDistrictById(rMap.id.toString());
// if (obj) {