diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataDealBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataDealBatch.groovy index d7bf3a8a3..bcd484c2b 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataDealBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataDealBatch.groovy @@ -62,6 +62,12 @@ class BigdataDealBatch extends BaseBatch{ @Override public void process(Object args) { + def date = DateUtils.parseFromTightByPattern("2024-5-21", "yyyy-MM-dd") + def objectId = dateToObjectId(date) + println objectId + + //664a22000000000000000000 5-20 + //664b73800000000000000000 5-21 def citys = CcbCommonUtils.getRunningCitys(args) // // println "curDate:"+curDate diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/GuiDingPriceBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/GuiDingPriceBatch.groovy index 691a3f859..14c61c7e6 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/GuiDingPriceBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/GuiDingPriceBatch.groovy @@ -52,7 +52,7 @@ class GuiDingPriceBatch extends BaseBatch{ def distCodeMap = CcbCommonUtils.findAllDistrictCodeValue(city) //添加自己库中的人工指导价 - def prices = CcbCommonUtils.findPersonPrice(city, "2024-04-26", "2024-05-20") + def prices = CcbCommonUtils.findPersonPrice(city, "2024-04-26", "2024-05-24") // def prices = CcbCommonUtils.findPersonPrice(city, "2022-01-01", "2022-11-22") if(prices){ def distMap = getDistrictMap(city) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/DevProcess.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/DevProcess.groovy index 1098539f6..89a12c9d2 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/DevProcess.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/DevProcess.groovy @@ -32,7 +32,7 @@ class DevProcess { // task.devSplitRoad() // task.devNameSplitRoad() // task.addFlag() -// task.matchDev() + task.matchDev() // task.calAddrDistince() // task.updateCityAndDist() @@ -44,7 +44,7 @@ class DevProcess { // task.addNewDev() // task.createDevMapping() // task.deleteAddr() - task.deleteAddr2() +// task.deleteAddr2() // task.synchDevTo43() } @@ -292,17 +292,17 @@ class DevProcess { } def matchDev(){ - ExcelUtils.multiThreadingModify("C:\\Users\\gaojuan\\Downloads\\企业园区地址.xlsx",{d-> - if(d['H']){ + ExcelUtils.multiThreadingModify("D:\\数据\\数据建设\\开发区\\河北省官网发布190开发区.xlsx",{d-> + if(!d['F']){ def q = new BasicDBObject() - q.put("name", d['H']) + q.put("name", d['D'].replace("河北", "").replace("浙江","")) def obj = development_zone_CONN.findOne(q) if(obj){ - d['S'] = obj._id.toString() - d['T'] = obj.name + d['F'] = obj._id.toString() + d['G'] = obj.name } } - },1); + },0); } def calAddrDistince(){ diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/fjwPriceBaseData/FjwBigdataForsaleBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/fjwPriceBaseData/FjwBigdataForsaleBatch.groovy index 2b8cde742..42a11b53a 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/fjwPriceBaseData/FjwBigdataForsaleBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/fjwPriceBaseData/FjwBigdataForsaleBatch.groovy @@ -180,6 +180,7 @@ class FjwBigdataForsaleBatch extends BaseBatch{ m.house_structure_code = null//getHouseStructureCode(); m.source = "FJW" retMap.put(m.houseId, converData(m)) + houseIdsfilter.put(m.houseId) }else{ println city +" "+m.houseId+" 已存在" } diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/poc/AddPriceTest.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/poc/AddPriceTest.groovy index 93a106c85..dc9e9b1c6 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/poc/AddPriceTest.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/poc/AddPriceTest.groovy @@ -33,17 +33,31 @@ class AddPriceTest { task.run(); } def run(){ - def filePath = "D:\\数据\\建行\\房产估值\\苏州价格.xlsx" - addGXDPrice(filePath) + def filePath = "D:\\数据\\建行\\房产估值\\_业务5月份系统反馈问题价格核查20240416-20240516 - 国信达.xlsx" +// addGXDPrice(filePath) // addCcbPrice(filePath) // addThirdPrice(filePath) // addFjwPrice(filePath) // exportPkPrice() // addRegion() + addTradePrice(filePath) } + def addTradePrice(filePath){ + ExcelUtils.multiThreadingModify(filePath, { d -> + if(d['Y']){ + def dist = CommonDatautils.findDistrictById(d['Y']) + def tradePrice = CommonDatautils.findTrades(dist, '2024-02-01', '2024-05-01') + if (tradePrice) { + d['W'] = tradePrice.toInteger() + } + } + + }); + } + def addRegion(){ ExcelUtils.multiThreadingModify("D:\\数据\\上海农总行\\江苏省价格比对超20%的小区.xlsx",{d-> def dist = CommonDatautils.findDistrictById(d['A']) @@ -190,11 +204,11 @@ class AddPriceTest { def addThirdPrice(filepath){ ExcelUtils.multiThreadingModify(filepath, { d -> - if (d['C']) { - def dist = CommonDatautils.findDistrictById(d['C']) + if (!d['X']) { + def dist = CommonDatautils.findDistrictById(d['Y']) if(dist){ def thirdPrice = findThirdPartyPrice(dist.city, dist.region, dist.name) - d['O'] = thirdPrice + d['X'] = thirdPrice } } }) @@ -206,8 +220,8 @@ class AddPriceTest { q.put("city", city) q.put("region", region) q.put("name", name) - q.put("s_date", new BasicDBObject('$gte', 202311).append('$lte',202404)) - +// q.put("s_date", new BasicDBObject('$gte', 202311).append('$lte',202404)) + q.put("s_date", 202404) def dbcursor = AVERAGE_STATISTICS.find(q).sort(new BasicDBObject("s_date", -1)) def price = null for(def db : dbcursor){ diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/xiamen/GaoDePoiDataProcess.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/xiamen/GaoDePoiDataProcess.groovy index cfda2228d..6d41f48cd 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/xiamen/GaoDePoiDataProcess.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/xiamen/GaoDePoiDataProcess.groovy @@ -39,7 +39,7 @@ import java.util.concurrent.atomic.AtomicLong @BatchOwner(Watcher.GaoJuan) class GaoDePoiDataProcess extends BaseBatch{ - public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(20) + public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(1) public static def version = new Date().getTime() @@ -58,6 +58,9 @@ class GaoDePoiDataProcess extends BaseBatch{ def fullCityMap = null + DBCollection CHUN_POI_COLL = MongoUtils.getCollectionByName("crawl", "poi_wap_spider", "192.168.0.206",27020) + + DBCollection ADMINISTRATIVE_MAPPING_COLL_100 = MongoUtils.getCollectionByName2("fangjia", "administrative_mapping", MAP_POI_URL) static main(args) { runBatch(new GaoDePoiDataProcess(), args) @@ -69,12 +72,152 @@ class GaoDePoiDataProcess extends BaseBatch{ // synchMapPoi(); - synchCompany() +// synchCompany() // poiCatProcess() // addressAndCatProcess() // synchNetwork() // println DateUtils.parseFromTightByPattern("2023-11-30","yyyy-MM-dd").getTime() // sysnchPoi() +// sysnchVillage() + + addTownship() + } + + def addTownship(){ + ExcelUtils.multiThreadingModify("D:\\数据\\数据建设\\湖州小区.xlsx",{d-> + if(d['J']){ +// def gaodeMap = getTownshipInfo(d['F']+","+d['E']) +// if(gaodeMap && gaodeMap.township){ +// d['H'] = gaodeMap.city +// d['I'] = gaodeMap.district +// d['J'] = gaodeMap.township +// d['K'] = gaodeMap.format_addr +// } + + def q = new BasicDBObject() + q.put("city", d['H']) + q.put("district", d['I']) + q.put("street",d['G']) + def obj = ADMINISTRATIVE_MAPPING_COLL_100.findOne(q) + if(obj){ + d['O'] = "是" + } + } + }) + + } + + def sysnchVillage(){ + def pois = findAllVillagePoiMap() + + def rets = new CopyOnWriteArrayList() + def totalCount = new AtomicLong() + final CountDownLatch latch = new CountDownLatch(pois.size()) + + + + for(def i=0;i