住宅指数修改
This commit is contained in:
+10
-7
@@ -81,11 +81,11 @@ class ImportIndexStats extends BaseBatch{
|
|||||||
def date = createDateString(year, month, 0, "");
|
def date = createDateString(year, month, 0, "");
|
||||||
s = DateUtils.addMonth(date, 1, "yyyyMM")
|
s = DateUtils.addMonth(date, 1, "yyyyMM")
|
||||||
|
|
||||||
if(year==2024 && month==8){
|
if(year==2024 && month==9){
|
||||||
stop = true;
|
stop = true;
|
||||||
}
|
}
|
||||||
calculatePriceIndex(year, month);
|
calculatePriceIndex(year, month);
|
||||||
println "运行......"+date
|
println "运行......"+date+" 完成"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -94,15 +94,15 @@ class ImportIndexStats extends BaseBatch{
|
|||||||
def calculatePriceIndex(def year, def month){
|
def calculatePriceIndex(def year, def month){
|
||||||
def citys =CommonDatautils.findAllCity();
|
def citys =CommonDatautils.findAllCity();
|
||||||
def date = createDateString(year, month, 0, "");
|
def date = createDateString(year, month, 0, "");
|
||||||
def haveIndexCitys = findPriceIndexCitys(date);
|
def haveIndexCitys = findPriceIndexCitys(date.toInteger());
|
||||||
def index = 0;
|
def index = 0;
|
||||||
if(citys){
|
if(citys){
|
||||||
for(def city : citys){
|
for(def city : citys){
|
||||||
if(cityList.contains(city)){
|
if(haveIndexCitys.contains(city)){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
def id = findPriceIndex(city, date);
|
def id = findPriceIndex(city, date.toInteger());
|
||||||
if(id){//已计算
|
if(id){//已计算
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -125,8 +125,10 @@ class ImportIndexStats extends BaseBatch{
|
|||||||
result.cat = "district";
|
result.cat = "district";
|
||||||
result.type = "城市"
|
result.type = "城市"
|
||||||
savePriceIndex(result);
|
savePriceIndex(result);
|
||||||
|
println "${index}"+ result+" ";
|
||||||
|
}else{
|
||||||
|
println "${index}"+ result+" "+city +" 无数据";
|
||||||
}
|
}
|
||||||
println "${index}"+ result;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -523,7 +525,7 @@ class ImportIndexStats extends BaseBatch{
|
|||||||
}
|
}
|
||||||
def findPriceIndexCitys(def date){
|
def findPriceIndexCitys(def date){
|
||||||
DBObject q = new BasicDBObject();
|
DBObject q = new BasicDBObject();
|
||||||
q.put("yearmonth", date.toInteger());
|
q.put("yearmonth", date);
|
||||||
q.put("cat", "district")
|
q.put("cat", "district")
|
||||||
|
|
||||||
DBObject keys = new BasicDBObject();
|
DBObject keys = new BasicDBObject();
|
||||||
@@ -543,6 +545,7 @@ class ImportIndexStats extends BaseBatch{
|
|||||||
DBObject q = new BasicDBObject();
|
DBObject q = new BasicDBObject();
|
||||||
q.put("yearmonth", date);
|
q.put("yearmonth", date);
|
||||||
q.put("city", city);
|
q.put("city", city);
|
||||||
|
q.put("cat", "district");
|
||||||
|
|
||||||
DBObject keys = new BasicDBObject();
|
DBObject keys = new BasicDBObject();
|
||||||
keys.put("city", 1)
|
keys.put("city", 1)
|
||||||
|
|||||||
Reference in New Issue
Block a user