空值判断
This commit is contained in:
+8
-3
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user