update
This commit is contained in:
+15
-11
@@ -60,6 +60,7 @@ class DistrictSellStatBatch extends BaseBatch {
|
||||
}
|
||||
|
||||
def calcMonthlyPrice(){
|
||||
//只有福州使用tob价格
|
||||
def citys = CommonUtils.findAllCity()
|
||||
def keys = new BasicDBObject("city", 1).append("name", 1).append("region", 1).append("estate_type2", 1)
|
||||
|
||||
@@ -142,17 +143,15 @@ class DistrictSellStatBatch extends BaseBatch {
|
||||
|
||||
if(weekendPriceObj.value_type!=1){
|
||||
if(dist.city == "福州"){
|
||||
if(Math.abs(mom)*100>3){
|
||||
if(dist.region != "马尾"){
|
||||
def randMarkup = nextDouble(0, 3)
|
||||
if(mom < 0){
|
||||
mom = DataUtil.roundDouble(randMarkup*(-1)/100, 4)
|
||||
}else{
|
||||
mom = DataUtil.roundDouble(randMarkup/100, 4)
|
||||
}
|
||||
curPrice = (int)(lastMonthPriceObj.avg_price*mom + lastMonthPriceObj.avg_price)
|
||||
}
|
||||
}
|
||||
// if(Math.abs(mom)*100>3){
|
||||
// def randMarkup = nextDouble(0, 3)
|
||||
// if(mom < 0){
|
||||
// mom = DataUtil.roundDouble(randMarkup*(-1)/100, 4)
|
||||
// }else{
|
||||
// mom = DataUtil.roundDouble(randMarkup/100, 4)
|
||||
// }
|
||||
// curPrice = (int)(lastMonthPriceObj.avg_price*mom + lastMonthPriceObj.avg_price)
|
||||
// }
|
||||
}else{
|
||||
if(Math.abs(mom)*100>10){
|
||||
def randMarkup = nextDouble(0, 10)
|
||||
@@ -232,6 +231,11 @@ class DistrictSellStatBatch extends BaseBatch {
|
||||
def dbcursor = DISTRICT_STAT.find(q)
|
||||
def priceMap = [:]
|
||||
for(def d : dbcursor){
|
||||
if(city == "福州"){
|
||||
if(d.avg_price_2b){
|
||||
d.avg_price = d.avg_price_2b
|
||||
}
|
||||
}
|
||||
priceMap.put(d.region +"##"+d.district_name, d)
|
||||
}
|
||||
return priceMap
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ class AddAvgpriceBatch {
|
||||
// def districts = CommonDatautils.findDistrictByCityAndRegions("福州","district", ["马尾"], ["city","region","name", "estate_type2"])
|
||||
for(def dist : districts){
|
||||
//发重算均价命令
|
||||
addPrice(dist.city,dist.region,dist.name, dist.estate_type2, DateUtils.parseFromTightByPattern('2023-05-01','yyyy-MM-dd'),DateUtils.parseFromTightByPattern('2023-05-05','yyyy-MM-dd'))
|
||||
addPrice(dist.city,dist.region,dist.name, dist.estate_type2, DateUtils.parseFromTightByPattern('2023-06-30','yyyy-MM-dd'),DateUtils.parseFromTightByPattern('2023-07-05','yyyy-MM-dd'))
|
||||
}
|
||||
}
|
||||
def run(){
|
||||
|
||||
+1
-2
@@ -92,11 +92,10 @@ class DataStandardBatch extends BaseBatch{
|
||||
|
||||
cityMap.each{city,alias->
|
||||
println "开始加载【${city}】"
|
||||
// if(city == "福州"){
|
||||
// if(city == "广州"){
|
||||
def detailMap = CommonDatautils.findAllCityDistrictNameAndAlias(city, "district", ["city","region","name","address","alias","addr_alias","mapping_alias","estate_type2"])
|
||||
districtMap.putAll(detailMap)
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
while(flag){
|
||||
|
||||
Reference in New Issue
Block a user