Merge branch 'script_gj' of http://gitlab.fangjia.com/dev0/main into script_gj
This commit is contained in:
+52
-34
@@ -15,42 +15,60 @@ ExcelUtils.multiThreadingModify("D:\\Users\\Domi\\Documents\\֪ʶ
|
|||||||
def province = item['D']
|
def province = item['D']
|
||||||
def city = item['E']
|
def city = item['E']
|
||||||
def area = item['F']
|
def area = item['F']
|
||||||
def township = item['G']
|
String township = item['G']
|
||||||
def community = item['H']
|
String community = item['H']
|
||||||
if (StringUtils.isBlank(city)) {
|
if (StringUtils.isBlank(city)) {
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
if (ProvinceData.isGovernmentCity(city)) {
|
if (item['T'] != null) {
|
||||||
townConn.find(new BasicDBObject("province", "重庆市")
|
return ;
|
||||||
.append("region", area + "区")
|
|
||||||
.append("street", township)
|
|
||||||
.append("juweihui", community), new BasicDBObject()).limit(1).each {
|
|
||||||
obj ->
|
|
||||||
item['T'] = obj.juweihui_type
|
|
||||||
}
|
|
||||||
if (item['T'] == null) {
|
|
||||||
townConn.find(new BasicDBObject("province", "重庆市")
|
|
||||||
.append("region", area + "区")
|
|
||||||
.append("juweihui", community), new BasicDBObject()).limit(1).each {
|
|
||||||
obj ->
|
|
||||||
item['T'] = obj.juweihui_type
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
townConn.find(new BasicDBObject("city", city + "市")
|
|
||||||
.append("region", area + "区")
|
|
||||||
.append("street", township)
|
|
||||||
.append("juweihui", community), new BasicDBObject()).limit(1).each {
|
|
||||||
obj ->
|
|
||||||
item['T'] = obj.juweihui_type
|
|
||||||
}
|
|
||||||
if (item['T'] == null) {
|
|
||||||
townConn.find(new BasicDBObject("city", city + "市")
|
|
||||||
.append("region", area + "区")
|
|
||||||
.append("juweihui", community), new BasicDBObject()).limit(1).each {
|
|
||||||
obj ->
|
|
||||||
item['T'] = obj.juweihui_type
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// if (community == null) {
|
||||||
|
// return ;
|
||||||
|
// }
|
||||||
|
if (township) {
|
||||||
|
if (township.endsWith("镇") || township.endsWith("乡")) {
|
||||||
|
item['T'] = 2
|
||||||
|
} else if (township.endsWith("街道")) {
|
||||||
|
item['T'] = 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// community = community.replaceAll("居委会", "")
|
||||||
|
// community = community.replaceAll("居民委员会", "")
|
||||||
|
// community = community.replaceAll("村民委员会", "")
|
||||||
|
// community = community.replaceAll("村委会", "")
|
||||||
|
//
|
||||||
|
// if (ProvinceData.isGovernmentCity(city)) {
|
||||||
|
// townConn.find(new BasicDBObject("province", "重庆市")
|
||||||
|
// .append("region", area + "区")
|
||||||
|
// .append("street", township)
|
||||||
|
// .append("juweihui", new BasicDBObject('$regex', "^" + community)), new BasicDBObject()).limit(1).each {
|
||||||
|
// obj ->
|
||||||
|
// item['T'] = obj.juweihui_type
|
||||||
|
// }
|
||||||
|
// if (item['T'] == null) {
|
||||||
|
// townConn.find(new BasicDBObject("province", "重庆市")
|
||||||
|
// .append("region", area + "区")
|
||||||
|
// .append("juweihui", new BasicDBObject('$regex', "^" + community)), new BasicDBObject()).limit(1).each {
|
||||||
|
// obj ->
|
||||||
|
// item['T'] = obj.juweihui_type
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// townConn.find(new BasicDBObject("city", city + "市")
|
||||||
|
// .append("region", area + "区")
|
||||||
|
// .append("street", township)
|
||||||
|
// .append("juweihui", new BasicDBObject('$regex', "^" + community)), new BasicDBObject()).limit(1).each {
|
||||||
|
// obj ->
|
||||||
|
// item['T'] = obj.juweihui_type
|
||||||
|
// }
|
||||||
|
// if (item['T'] == null) {
|
||||||
|
// townConn.find(new BasicDBObject("city", city + "市")
|
||||||
|
// .append("region", area + "区")
|
||||||
|
// .append("juweihui", new BasicDBObject('$regex', "^" + community)), new BasicDBObject()).limit(1).each {
|
||||||
|
// obj ->
|
||||||
|
// item['T'] = obj.juweihui_type
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
})
|
})
|
||||||
|
|||||||
+2
-2
@@ -21,10 +21,10 @@ import java.util.concurrent.Executors
|
|||||||
class CommitteeLatLng {
|
class CommitteeLatLng {
|
||||||
|
|
||||||
static DBCollection villagesConn = MongoUtils.getCollectionByName("fangjia", "villages", "192.168.0.43", 28017)
|
static DBCollection villagesConn = MongoUtils.getCollectionByName("fangjia", "villages", "192.168.0.43", 28017)
|
||||||
static ExecutorService executorService = Executors.newFixedThreadPool(20)
|
static ExecutorService executorService = Executors.newFixedThreadPool(10)
|
||||||
|
|
||||||
static void main(String[] args) {
|
static void main(String[] args) {
|
||||||
dealPoi(new BasicDBObject("status_location", new BasicDBObject('$ne', 0)).append("name", "席庄二村委会"))
|
dealPoi(new BasicDBObject("status_location", new BasicDBObject('$ne', 0)).append("year", 2021))
|
||||||
//dealLocation()
|
//dealLocation()
|
||||||
executorService.shutdown()
|
executorService.shutdown()
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user