From bfca3691e59153dced5f3dd6b519c8b89a364954 Mon Sep 17 00:00:00 2001 From: gaojuan1 Date: Tue, 27 Aug 2024 15:49:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=AA=E8=B7=91=E7=A9=BA=E5=80=BC=E6=95=B0?= =?UTF-8?q?=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../script/gj/data_handle/MinglujiData.groovy | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/MinglujiData.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/MinglujiData.groovy index ce20d1f8e..2624d025c 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/MinglujiData.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/MinglujiData.groovy @@ -33,8 +33,8 @@ class MinglujiData { def prov = "浙江省" def city = "嘉兴" // exportDatas(city) -// matchDev(prov, city) -// matchCommunity(city) + matchDev(prov, city) + matchCommunity(city) // tempMatchDev(prov) // saveMljData() @@ -204,20 +204,22 @@ class MinglujiData { def fiveLevelSplit(city){ - def i = 2; + def i = 1; while(i<20) { def fileName = "/home/goojia/gj/mlj_${i}.xlsx" if (CommonDatautils.isWindow()) { - fileName = "D:\\数据\\数据建设\\名录集\\${city}_${i}.xlsx" + fileName = "D:\\数据\\数据建设\\名录集\\mlj_${i}.xlsx" } File file = new File(fileName); if (file.exists()) { ExcelUtils.multiThreadingModify(fileName, { d -> - def jsonObject = com.fangjia.script.gj.district.FangjiaClientUtils.formatFivelevel(d['B'], d['J']) - if(jsonObject) { - if (jsonObject.get("address") && jsonObject.get("address") != "null") { - d['X'] = jsonObject.get("address") + if(d['J'] && !d['X']){ + def jsonObject = com.fangjia.script.gj.district.FangjiaClientUtils.formatFivelevel(d['B'], d['J']) + if(jsonObject) { + if (jsonObject.get("address") && jsonObject.get("address") != "null") { + d['X'] = jsonObject.get("address") + } } } })