test
This commit is contained in:
+6
-4
@@ -34,6 +34,8 @@ class BigdataCommunityBatch extends BaseBatch{
|
|||||||
def sqlInstance = Sql.newInstance("jdbc:postgresql://192.168.0.236:5432/warehouse?stringtype=unspecified",
|
def sqlInstance = Sql.newInstance("jdbc:postgresql://192.168.0.236:5432/warehouse?stringtype=unspecified",
|
||||||
"postgres", "postgres", "org.postgresql.Driver")
|
"postgres", "postgres", "org.postgresql.Driver")
|
||||||
|
|
||||||
|
def fangjiaDists = new HashSet()
|
||||||
|
|
||||||
static main(args) {
|
static main(args) {
|
||||||
runBatch(new BigdataCommunityBatch(), args);
|
runBatch(new BigdataCommunityBatch(), args);
|
||||||
}
|
}
|
||||||
@@ -50,7 +52,6 @@ class BigdataCommunityBatch extends BaseBatch{
|
|||||||
def cityCodeDataMap = CcbCommonUtils.findCityCodeValue()
|
def cityCodeDataMap = CcbCommonUtils.findCityCodeValue()
|
||||||
def index = 0
|
def index = 0
|
||||||
def today = new Date().getDate()
|
def today = new Date().getDate()
|
||||||
def fangjiaDists = []
|
|
||||||
|
|
||||||
println "starting 。。。。。。。。。"
|
println "starting 。。。。。。。。。"
|
||||||
for(def city : citys){
|
for(def city : citys){
|
||||||
@@ -64,6 +65,7 @@ class BigdataCommunityBatch extends BaseBatch{
|
|||||||
for(def d : dists){
|
for(def d : dists){
|
||||||
fangjiaDists << d._id.toString()
|
fangjiaDists << d._id.toString()
|
||||||
}
|
}
|
||||||
|
println "加载建行小区量"
|
||||||
|
|
||||||
def ccbMaps = null
|
def ccbMaps = null
|
||||||
if(today<=10){
|
if(today<=10){
|
||||||
@@ -71,9 +73,9 @@ class BigdataCommunityBatch extends BaseBatch{
|
|||||||
}else{
|
}else{
|
||||||
ccbMaps = CcbCommonUtils.findPgCcbDistrict(cityCodeDataMap.get(city)) //估值导数时使用
|
ccbMaps = CcbCommonUtils.findPgCcbDistrict(cityCodeDataMap.get(city)) //估值导数时使用
|
||||||
}
|
}
|
||||||
|
println "组装新数据"
|
||||||
def rets = createCityDatas(cityCodeDataMap, distCodeMap, dists)
|
def rets = createCityDatas(cityCodeDataMap, distCodeMap, dists)
|
||||||
rets = addDeleteDist(dists, ccbMaps, rets, fangjiaDists)
|
rets = addDeleteDist(dists, ccbMaps, rets)
|
||||||
rows.addAll(rets)
|
rows.addAll(rets)
|
||||||
println "[${index}] "+city +" 小区量:"+dists.size()+" 总:"+rets.size()
|
println "[${index}] "+city +" 小区量:"+dists.size()+" 总:"+rets.size()
|
||||||
|
|
||||||
@@ -106,7 +108,7 @@ class BigdataCommunityBatch extends BaseBatch{
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def addDeleteDist(dists, ccbMaps, rets, fangjiaDists){
|
def addDeleteDist(dists, ccbMaps, rets){
|
||||||
|
|
||||||
println "房价网小区:"+fangjiaDists.size()+" 建行小区:"+rets.size()
|
println "房价网小区:"+fangjiaDists.size()+" 建行小区:"+rets.size()
|
||||||
def ccbDists = ccbMaps.keySet()
|
def ccbDists = ccbMaps.keySet()
|
||||||
|
|||||||
+2
-2
@@ -53,13 +53,13 @@ class FjwBigdataCommunityBatch extends BaseBatch{
|
|||||||
def cityCodeDataMap = CcbCommonUtils.findCityCodeValue()
|
def cityCodeDataMap = CcbCommonUtils.findCityCodeValue()
|
||||||
def index = 0
|
def index = 0
|
||||||
def today = new Date().getDate()
|
def today = new Date().getDate()
|
||||||
|
def fangjiaDists = new HashSet()
|
||||||
println "starting 。。。。。。。。。"
|
println "starting 。。。。。。。。。"
|
||||||
for(def city : citys){
|
for(def city : citys){
|
||||||
index ++
|
index ++
|
||||||
def distCodeMap = CcbCommonUtils.findAllDistrictCodeValue(city)
|
def distCodeMap = CcbCommonUtils.findAllDistrictCodeValue(city)
|
||||||
def dists = CcbCommonUtils.findAllDistrictByCity(city, "district", ["city","region", "name", "address","lat", "lng","all_area","build_area","virescence_percent","cubage_percent","car_site_count","finish_building_date","estate_type2","household_count","status","c_date","m_date","name_cat","street","street_number"], "all")
|
def dists = CcbCommonUtils.findAllDistrictByCity(city, "district", ["city","region", "name", "address","lat", "lng","all_area","build_area","virescence_percent","cubage_percent","car_site_count","finish_building_date","estate_type2","household_count","status","c_date","m_date","name_cat","street","street_number"], "all")
|
||||||
def fangjiaDists = []
|
|
||||||
for(def d : dists){
|
for(def d : dists){
|
||||||
fangjiaDists << d._id.toString()
|
fangjiaDists << d._id.toString()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user