From b5efda084a10d95ebba0cb497957508fdbac7f8b Mon Sep 17 00:00:00 2001 From: gaojuan1 Date: Sat, 22 Feb 2025 11:18:04 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A9=BA=E5=80=BC=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../script/gj/data_handle/TownStandardBatch.groovy | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/TownStandardBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/TownStandardBatch.groovy index 0feaa0b5e..3ace39f53 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/TownStandardBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/TownStandardBatch.groovy @@ -36,7 +36,7 @@ class TownStandardBatch extends BaseBatch{ def fullCityMap = CommonDatautils.queryFullNameCity() def regionMap = com.fangjia.script.commData.CommonDatautils.queryAllRegionNameByCity() def regionFullNameMap = com.fangjia.script.commData.CommonDatautils.queryAllRegionFullNameByCity() - public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(20) + public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(5) def updateList = [] def addAliasList = [] @@ -380,7 +380,12 @@ class TownStandardBatch extends BaseBatch{ o.put("district", arrs[4]) o.put("lng", arrs[5]) o.put("lat", arrs[6]) - o.put("data_source", arrs[7]) + if(arrs[7]){ + o.put("data_source", arrs[7]) + }else{ + o.put("data_source", "") + } + rets << o }catch(Exception e){ println arrs @@ -459,7 +464,7 @@ class TownStandardBatch extends BaseBatch{ totalCount.addAndGet(1) def rMap = regionFullNameMap.get(r.city) if (rMap) { - def townMap = null//CommonDatautils.queryTownByCity(r.city, ["city", "district", "mzb_district_name", "street", "alias", "shape"]) +// def townMap = CommonDatautils.queryTownByCity(r.city, ["city", "district", "mzb_district_name", "street", "alias", "shape"]) def set = rMap.keySet() println totalCount.get() +" "+r.city + " " + set.size() // if (set.size() >= 1) {