From aa107962bd84350eae1fa44dba9800f1c9875a57 Mon Sep 17 00:00:00 2001 From: gaojuan Date: Mon, 1 Jul 2024 17:09:37 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E5=B0=8F=E5=8C=BA?= =?UTF-8?q?=E6=96=B9=E5=BC=8F=E4=BF=AE=E6=94=B9=EF=BC=8C=E9=87=8D=E6=96=B0?= =?UTF-8?q?master=E6=89=93=E6=A0=87=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fangjia/script/ana/FindStageDistrictBatch.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ana/FindStageDistrictBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ana/FindStageDistrictBatch.groovy index 8c6633b4d..a46baf30a 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ana/FindStageDistrictBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ana/FindStageDistrictBatch.groovy @@ -3,6 +3,7 @@ package com.fangjia.script.ana import com.fangjia.script.BaseBatch import com.fangjia.script.BatchOwner import com.fangjia.script.Watcher +import com.fangjia.script.commData.CommonDatautils import com.fangjia.script.util.CommonUtils import com.fangjia.script.util.DbUtils import com.mongodb.BasicDBObject @@ -24,7 +25,7 @@ class FindStageDistrictBatch extends BaseBatch { @Override void process(Object args) { CommonUtils.findAllCity().each { def city -> - DbUtils.seaweed.find(DbUtils.buildSeaweedQuery(city), new BasicDBObject("region", 1).append("name", 1).append("master_district_name", 1).append("city", 1)).each { BasicDBObject dbo -> + CommonDatautils.SEAWEED_COLL.find(DbUtils.buildSeaweedQuery2(city), new BasicDBObject("region", 1).append("name", 1).append("master_district_name", 1).append("city", 1)).each { BasicDBObject dbo -> if (dbo.name =~ STAGE_PATTERN && StringUtils.isBlank(dbo.master_district_name)) { def mainName = dbo.name.toString().replaceAll("([一二三四五六七八九十百千\\d]+)期\$", "") def query = DbUtils.buildSeaweedQuery(city, dbo.region, mainName) @@ -40,7 +41,6 @@ class FindStageDistrictBatch extends BaseBatch { println(dbo) } } - } } } From c1857de354e78521eabba66142c955c54fdc5292 Mon Sep 17 00:00:00 2001 From: gaojuan Date: Mon, 1 Jul 2024 17:10:11 +0800 Subject: [PATCH 2/4] =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=9D=A1=E4=BB=B6?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fangjia/script/util/DbUtils.groovy | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/util/DbUtils.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/util/DbUtils.groovy index aeda5fc28..40e691bef 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/util/DbUtils.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/util/DbUtils.groovy @@ -186,6 +186,26 @@ public class DbUtils{ return query } + public static BasicDBObject buildSeaweedQuery2(def city = null, def region = null, def name = null, def cat = "district", def status = 0){ + BasicDBObject query = new BasicDBObject() + if(city){ + query.append("city", city) + } + if(region){ + query.append("region", region) + } + if(name){ + query.append("name", name) + } + if(cat != null){ + query.append("cat", cat) + } + if(status != null){ + query.append("status", status) + } + return query + } + /** * 把小区修改成删除状态 * @param id From f231b0866cb1df7baf62d03637807a6aa639a46b Mon Sep 17 00:00:00 2001 From: gaojuan Date: Mon, 1 Jul 2024 17:13:52 +0800 Subject: [PATCH 3/4] update --- .../fangjia/script/ccbevaluation/StagingDistrictBatch.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/StagingDistrictBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/StagingDistrictBatch.groovy index 621973c60..82d2c96c0 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/StagingDistrictBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/StagingDistrictBatch.groovy @@ -28,7 +28,7 @@ class StagingDistrictBatch extends BaseBatch{ @Override public void process(Object args) { - def citys = ["上海"]//CcbCommonUtils.getRunningCitys(args) + def citys = CcbCommonUtils.getRunningCitys(args) def rows = [] for(def city : citys){ def dists = CcbCommonUtils.findAllDistrictByCity(city, "district", ["city", "region", "name", "estate_type2","name_cat","lng","master_district_name", "c_date", "m_date"], null) From bbdff4529087291bf537a79608ba6b7d8d8d4de4 Mon Sep 17 00:00:00 2001 From: gaojuan Date: Tue, 2 Jul 2024 09:42:46 +0800 Subject: [PATCH 4/4] =?UTF-8?q?=E8=B7=91=E4=BC=81=E4=B8=9A=E5=BC=80?= =?UTF-8?q?=E5=8F=91=E5=8C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/fangjia/script/gj/data_handle/DevProcess.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 de279cbea..b105c1f4f 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 { def task = new DevProcess(); // task.run() // task.parseCityAndDist() -// task.devSplitRoad() + task.devSplitRoad() // task.devNameSplitRoad() // task.addFlag() // task.matchDev() @@ -48,7 +48,7 @@ class DevProcess { // task.createDevMapping() // task.deleteAddr() // task.deleteAddr2() - task.synchDevTo43() +// task.synchDevTo43() // task.addNewDev2() // task.addAlias()