优化小区均价计算脚本
This commit is contained in:
+4
-1
@@ -2,6 +2,7 @@ package com.fangjia.script.averager
|
|||||||
|
|
||||||
import com.fangjia.core.Constants
|
import com.fangjia.core.Constants
|
||||||
import com.fangjia.core.util.DateUtil
|
import com.fangjia.core.util.DateUtil
|
||||||
|
import com.fangjia.core.util.DingDingMessageUtil
|
||||||
import com.fangjia.core.util.MongoUtils
|
import com.fangjia.core.util.MongoUtils
|
||||||
import com.fangjia.datastore.driver.DSCursor
|
import com.fangjia.datastore.driver.DSCursor
|
||||||
import com.fangjia.script.BaseBatch
|
import com.fangjia.script.BaseBatch
|
||||||
@@ -44,6 +45,7 @@ class InsertMonitorCalcCommandBatch extends BaseBatch {
|
|||||||
|
|
||||||
void process(Object args) {
|
void process(Object args) {
|
||||||
def cities = ServerAreaMap.findAllCities()
|
def cities = ServerAreaMap.findAllCities()
|
||||||
|
cities = ['宁德']
|
||||||
println cities
|
println cities
|
||||||
Date weekend = getCalcWeekend()
|
Date weekend = getCalcWeekend()
|
||||||
println weekend
|
println weekend
|
||||||
@@ -204,7 +206,7 @@ class InsertMonitorCalcCommandBatch extends BaseBatch {
|
|||||||
blockCount = REGION_STAT_COLL.count(query);
|
blockCount = REGION_STAT_COLL.count(query);
|
||||||
def msg = "本周小区均价计算量:" + districtCount + ";本周城市均价计算量:" + cityCount + ";本周区域均价计算量:" + regionCount + ";本周板块均价计算量:" + blockCount + ";本周小区均价涨跌幅超过4%小区数量:" + appliesCount + ";计算均价超过10%小区量:" + bigMarkupCount+ ";运行时间:" + secondToTime(time) + ".";
|
def msg = "本周小区均价计算量:" + districtCount + ";本周城市均价计算量:" + cityCount + ";本周区域均价计算量:" + regionCount + ";本周板块均价计算量:" + blockCount + ";本周小区均价涨跌幅超过4%小区数量:" + appliesCount + ";计算均价超过10%小区量:" + bigMarkupCount+ ";运行时间:" + secondToTime(time) + ".";
|
||||||
//发送钉钉提示
|
//发送钉钉提示
|
||||||
sendDingDingMsg(TOKEN, msg);
|
DingDingMessageUtil.sendTextMessage(TOKEN, msg)
|
||||||
EmailTemplate sd = new EmailTemplate("mixedZone.ftl")
|
EmailTemplate sd = new EmailTemplate("mixedZone.ftl")
|
||||||
Map map = new HashMap()
|
Map map = new HashMap()
|
||||||
map.put('applies', applies)
|
map.put('applies', applies)
|
||||||
@@ -356,6 +358,7 @@ class InsertMonitorCalcCommandBatch extends BaseBatch {
|
|||||||
DBObject q = new BasicDBObject()
|
DBObject q = new BasicDBObject()
|
||||||
q.put("city", city)
|
q.put("city", city)
|
||||||
q.put("cat", "district")
|
q.put("cat", "district")
|
||||||
|
q.put("region", "福安")
|
||||||
q.put("status", 0)
|
q.put("status", 0)
|
||||||
|
|
||||||
DBObject fields = new BasicDBObject()
|
DBObject fields = new BasicDBObject()
|
||||||
|
|||||||
Reference in New Issue
Block a user