From 135099cb1182a36dcc92e4dd2b1d6962941d3f44 Mon Sep 17 00:00:00 2001 From: gaojuan Date: Fri, 14 Jul 2023 13:13:34 +0800 Subject: [PATCH] =?UTF-8?q?500-=E3=80=8B200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../gj/district/OfficeFieldCleanBatch.groovy | 27 +++++++++---------- .../script/gj/house/RemoveHouse.groovy | 2 +- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/district/OfficeFieldCleanBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/district/OfficeFieldCleanBatch.groovy index 9af975f10..af011e88f 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/district/OfficeFieldCleanBatch.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/district/OfficeFieldCleanBatch.groovy @@ -72,9 +72,10 @@ class OfficeFieldCleanBatch extends BaseBatch{ // addBlock() // addFieldValue() -// test() - updateErrorField() -// export() + +// updateErrorField() + export() + test() // addOffice() } @@ -94,15 +95,14 @@ class OfficeFieldCleanBatch extends BaseBatch{ }else if(v=="lat" || v=="lng"){ row << val.toString().toDouble()/10000000000.0 }else if(v == "divisible"){ - if(val){ - if(val.toString()=="1"){ + + if(val==1){ row << "是" - }else if(val.toString()=="0"){ + }else if(val==0){ row << "否" + }else{ + row << '' } - }else{ - row << "" - } }else if(v.contains("alias")){ if(val){ row << val.join(" ") @@ -116,19 +116,18 @@ class OfficeFieldCleanBatch extends BaseBatch{ rets << row } } - ExcelUtils.write("D:\\数据\\写字楼\\中远(原始字段).xlsx",rets, "数据") + ExcelUtils.write("D:\\数据\\写字楼\\中远.xlsx",rets, "数据") } def test(){ - def datas = ExcelUtils.read("D:\\数据\\写字楼\\写字楼价格.xlsx",0 , 1) + def datas = ExcelUtils.read("D:\\数据\\写字楼\\写字楼价格租金.xlsx",0 , 1) def map = [:] for(def d : datas){ map.put(d['A']+"#"+d['B']+'#'+d['C'], d) } - ExcelUtils.multiThreadingModify("D:\\数据\\写字楼\\中远海运写字楼.xlsx",{d-> + ExcelUtils.multiThreadingModify("D:\\数据\\写字楼\\中远.xlsx",{d-> def row = map.get(d['B']+"#"+d['C']+'#'+d['D']) - d['H'] = row['F'] - d['I'] = row['G'] + d['F'] = row['F'] }) } diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/house/RemoveHouse.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/house/RemoveHouse.groovy index 2ee35ffff..ec8b35d44 100644 --- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/house/RemoveHouse.groovy +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/house/RemoveHouse.groovy @@ -29,7 +29,7 @@ class RemoveHouse extends BaseBatch{ def rets = [] for(def d : dbcursor){ rets << d._id - if(rets.size()==500){ + if(rets.size()==200){ def delquery = new BasicDBObject() delquery.put("_id", new BasicDBObject('$in', rets)) SEABIRD_COLL.remove(delquery)