This commit is contained in:
2022-07-20 16:42:12 +08:00
parent 2828feab7c
commit 20940fa2c0
@@ -67,10 +67,22 @@ class DistrictInfoExportBatch extends BaseBatch{
def createDatas(def city){
def result = []
def distKeys = []
def districts = CommonDatautils.findAllDistricts(city, "district", null);
for(def dist : districts){
def key = dist.city +"##"+dist.region+"##"+dist.name
if(!distKeys.contains(key)){
distKeys << key
}
}
def removeDists = CommonDatautils.findRemoveDistricts(city, "district", null, "2022-01-01");
districts.addAll(removeDists)
for(def dist : removeDists){
def key = dist.city +"##"+dist.region+"##"+dist.name
if(!distKeys.contains(key)){
distKeys << key
districts << dist
}
}
def lastDate = DateUtils.getLastDayOfMonth(new Date(), -1)
def startDate = DateUtils.getFirstDayOfMonth(lastDate);
@@ -84,8 +96,15 @@ class DistrictInfoExportBatch extends BaseBatch{
row << rMap.city
row << rMap.region
row << rMap.name
row << DataHandleUtils.getDoubleRound(6, rMap.lng/10000000000d)
row << DataHandleUtils.getDoubleRound(6, rMap.lat/10000000000d)
if(rMap.lng){
row << DataHandleUtils.getDoubleRound(6, rMap.lng/10000000000d)
row << DataHandleUtils.getDoubleRound(6, rMap.lat/10000000000d)
}else{
row << ""
row << ""
println rMap.name +" 无经纬度"
}
row << rMap.estate_type2
row << rMap.build_type
row << rMap.household_count