修改
This commit is contained in:
+3
-3
@@ -154,9 +154,9 @@ class BigdataForsaleBatch extends BaseBatch{
|
|||||||
// def allDatas = createSellDatas(city, retMap.values());
|
// def allDatas = createSellDatas(city, retMap.values());
|
||||||
def allDatas = retMap.values()
|
def allDatas = retMap.values()
|
||||||
def headers = []
|
def headers = []
|
||||||
if(index == 1){
|
// if(index == 1){
|
||||||
headers = ["城市ID","出售ID","挂牌房屋ID","城市名称","行政区ID","行政区名称","小区ID","小区名称","楼栋ID","楼栋编号","楼栋名称","单元ID","单元编号","单元名称","户ID","详细地址","建筑年代","权属","权属年限","单价","总价","出售付款方式","所在楼层","总楼层","建筑类型","室内结构","建筑结构","建筑面积","套内面积","户型","室","厅","厨","卫","朝向","装修情况","是否有电梯","几梯几户","发布时间","到期时间","是否首发","房源数据来源","中介公司ID","中介公司名称","发布人","发布人电话","描述信息","备注","创建时间","更新时间","来源公司","附加信息"]
|
// headers = ["城市ID","出售ID","挂牌房屋ID","城市名称","行政区ID","行政区名称","小区ID","小区名称","楼栋ID","楼栋编号","楼栋名称","单元ID","单元编号","单元名称","户ID","详细地址","建筑年代","权属","权属年限","单价","总价","出售付款方式","所在楼层","总楼层","建筑类型","室内结构","建筑结构","建筑面积","套内面积","户型","室","厅","厨","卫","朝向","装修情况","是否有电梯","几梯几户","发布时间","到期时间","是否首发","房源数据来源","中介公司ID","中介公司名称","发布人","发布人电话","描述信息","备注","创建时间","更新时间","来源公司","附加信息"]
|
||||||
}
|
// }
|
||||||
FileUtils.batchCreateFile(allDatas, fileName, headers, "utf-8", true);
|
FileUtils.batchCreateFile(allDatas, fileName, headers, "utf-8", true);
|
||||||
println "txt文件生成 "
|
println "txt文件生成 "
|
||||||
}
|
}
|
||||||
|
|||||||
+4
-2
@@ -69,10 +69,10 @@ class CcbCommonUtils {
|
|||||||
return map;
|
return map;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static def findPersonPrice(city, date){
|
public static def findPersonPrice(city, date, endDate){
|
||||||
def q = new BasicDBObject()
|
def q = new BasicDBObject()
|
||||||
q.put("city", city)
|
q.put("city", city)
|
||||||
q.put('guiding_date', new BasicDBObject('$gte', DateUtils.parseFromTightYYYYMMDD(date)));
|
q.put('guiding_date', new BasicDBObject('$gte', DateUtils.parseFromTightYYYYMMDD(date)).append('$lt', DateUtils.parseFromTightYYYYMMDD(endDate))));
|
||||||
def dbcursor = GUIDING_PRICE_COLL.find(q)
|
def dbcursor = GUIDING_PRICE_COLL.find(q)
|
||||||
def rets = []
|
def rets = []
|
||||||
for(def d : dbcursor){
|
for(def d : dbcursor){
|
||||||
@@ -292,6 +292,7 @@ class CcbCommonUtils {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
def dbsour = getDataStoreConnection().find(q, keys).batchSize(2000)
|
def dbsour = getDataStoreConnection().find(q, keys).batchSize(2000)
|
||||||
|
println "原始:"+dbsour.count()
|
||||||
def rets = []
|
def rets = []
|
||||||
for(def d : dbsour){
|
for(def d : dbsour){
|
||||||
if(d.name_cat == 0 && d.lng && ["普通住宅","商住"].contains(d.estate_type2) && !d.name.contains("洋房") && !d.name.contains("公房")){
|
if(d.name_cat == 0 && d.lng && ["普通住宅","商住"].contains(d.estate_type2) && !d.name.contains("洋房") && !d.name.contains("公房")){
|
||||||
@@ -301,6 +302,7 @@ class CcbCommonUtils {
|
|||||||
rets << d
|
rets << d
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
println "小区量:"+rets.size()
|
||||||
return rets;
|
return rets;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -44,7 +44,7 @@ class GuiDingPriceBatch extends BaseBatch{
|
|||||||
def distCodeMap = CcbCommonUtils.findAllDistrictCodeValue(city)
|
def distCodeMap = CcbCommonUtils.findAllDistrictCodeValue(city)
|
||||||
|
|
||||||
//添加自己库中的人工指导价
|
//添加自己库中的人工指导价
|
||||||
def prices = CcbCommonUtils.findPersonPrice(city, DateUtils.addMonth(new Date(), -6))
|
def prices = CcbCommonUtils.findPersonPrice(city, "2021-10-1", "2021-11-1")
|
||||||
if(prices){
|
if(prices){
|
||||||
def distMap = getDistrictMap(city)
|
def distMap = getDistrictMap(city)
|
||||||
def rets = createCityDatas(cityCodeDatas, distCodeMap, distMap, prices)
|
def rets = createCityDatas(cityCodeDatas, distCodeMap, distMap, prices)
|
||||||
|
|||||||
Reference in New Issue
Block a user