修改配置文件
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
services:
|
||||
fangjia-bkoff:
|
||||
image: 192.168.0.19:9012/fangjia-bkoff:latest
|
||||
container_name: fangjia-bkoff
|
||||
pull_policy: always
|
||||
ports:
|
||||
- "8081:8080"
|
||||
environment:
|
||||
JAVA_OPTS: >-
|
||||
-Dfangjia.overridePropertiesLocation=/home/goojia/goojiaconfig/fangjia-bkoff.properties
|
||||
-Dfs.mongo.port=27000
|
||||
-Denable.safeLog=true
|
||||
-Dlog4j.configuration=file:/home/goojia/webapps/ROOT/WEB-INF/classes/log4j_linux.xml
|
||||
extra_hosts:
|
||||
- "seaweed.db.fangjia.com:192.168.0.38"
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- ./goojiaconfig/hosts:/etc/hosts
|
||||
- ./goojiaconfig:/home/goojia/goojiaconfig
|
||||
- ./logs/fangjia-bkoff:/home/goojia/logs
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:8080/k8s/readiness"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 15s
|
||||
restart: unless-stopped
|
||||
@@ -0,0 +1,66 @@
|
||||
services:
|
||||
fangjia-coresite:
|
||||
image: 192.168.0.19:9012/fangjia-coresite:jenkins-fangjiamain-master-360
|
||||
container_name: fangjia-coresite
|
||||
pull_policy: always
|
||||
ports:
|
||||
- "8082:8080"
|
||||
environment:
|
||||
JAVA_OPTS: >-
|
||||
-Xmx4096m -Xms4096m -XX:MaxPermSize=256m
|
||||
-Dlog4j.configuration=file:/home/goojia/webapps/ROOT/WEB-INF/classes/log4j_linux.xml
|
||||
-Dfangjia.overridePropertiesLocation=/home/goojia/goojiaconfig/fangjia-coresite.properties
|
||||
-DMONGO.POOLSIZE=200
|
||||
-Dfangjia.disableKnowBaseCache=false
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 5g
|
||||
reservations:
|
||||
memory: 4g
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- ./goojiaconfig/hosts:/etc/hosts
|
||||
- ./goojiaconfig:/home/goojia/goojiaconfig
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "nc -z localhost 8080 || exit 1"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 15s
|
||||
restart: unless-stopped
|
||||
|
||||
fangjia-static:
|
||||
image: 192.168.0.19:9012/fangjia-static:jenkins-fangjiamain-new_fjw-7
|
||||
container_name: fangjia-static
|
||||
pull_policy: always
|
||||
ports:
|
||||
- "8083:8080"
|
||||
environment:
|
||||
JAVA_OPTS: >-
|
||||
-Xmx2048m -XX:MaxPermSize=256m
|
||||
-Dfangjia.wartermarkimage=/home/goojia/goojiaconfig/warter-marker.png
|
||||
-Dfangjia.downloadTimeout=30000
|
||||
-Dfangjia.downloadPoolSize=4
|
||||
-Dlog4j.configuration=file:/home/goojia/webapps/ROOT/WEB-INF/classes/log4j_linux.xml
|
||||
-Dfs.mongo.port=27000
|
||||
-Dcapped.mongo.port=27000
|
||||
-Dfangjia.blackList=soufunimg.com,soufun.com,koofang.com,baixing.net
|
||||
-Dfangjia.important.category=district,shop,office,avatar,flash,user_house,upload
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
memory: 2g
|
||||
reservations:
|
||||
memory: 1g
|
||||
volumes:
|
||||
- /etc/localtime:/etc/localtime:ro
|
||||
- ./goojiaconfig/hosts:/etc/hosts
|
||||
- ./goojiaconfig:/home/goojia/goojiaconfig
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "nc -z localhost 8080 || exit 1"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 15s
|
||||
restart: unless-stopped
|
||||
@@ -43,9 +43,9 @@ fangjia.fs.mongo.port=27017
|
||||
fangjia.fs.mongodb.mongoUri=mongodb://${fangjia.fs.mongo.host}:${fangjia.fs.mongo.port}/
|
||||
|
||||
fangjia.seabird.mongodb.mongoUri=mongodb://developer:G00IDCDEV12385@${fangjia.mongo.host}:${fangjia.mongo.port},${fangjia.secondary.mongo.host}:${fangjia.secondary.mongo.port}/
|
||||
fangjia.log.mongo.host=log.mongo.db.fangjia.com
|
||||
fangjia.log.mongo.port=52002
|
||||
fangjia.log.mongodb.mongoUri=mongodb://${fangjia.log.mongo.host}:${fangjia.log.mongo.port}/
|
||||
fangjia.log.mongo.host=seawater.mongo.db.fangjia.com
|
||||
fangjia.log.mongo.port=27020
|
||||
fangjia.log.mongodb.mongoUri=mongodb://root:Goojia%40206!!#@${fangjia.log.mongo.host}:${fangjia.log.mongo.port}
|
||||
|
||||
|
||||
fangjia.base.mongo.host=mongo.db.fangjia.com
|
||||
|
||||
+2
-3
@@ -4,7 +4,6 @@ import com.fangjia.core.Constants
|
||||
import com.fangjia.core.util.DateUtil
|
||||
import com.fangjia.core.util.DingDingMessageUtil
|
||||
import com.fangjia.core.util.MongoUtils
|
||||
import com.fangjia.datastore.driver.DSCursor
|
||||
import com.fangjia.script.BaseBatch
|
||||
import com.fangjia.script.BatchOwner
|
||||
import com.fangjia.script.Watcher
|
||||
@@ -14,7 +13,7 @@ import com.fangjia.script.util.ServerAreaMap
|
||||
import com.google.common.collect.MapDifference
|
||||
import com.google.common.collect.Maps
|
||||
import com.mongodb.*
|
||||
import org.bson.types.ObjectId
|
||||
|
||||
/**
|
||||
* 通知计算二手房均价
|
||||
* @author duxiaoyu
|
||||
@@ -25,7 +24,7 @@ class InsertMonitorCalcCommandBatch extends BaseBatch {
|
||||
|
||||
|
||||
public static final DBCollection SEAWEED_COLL = MongoUtils.getDbCollection(Constants.FANGJIA_MONGO_URI, 'fangjia', 'seaweed')
|
||||
public final static DBCollection COMMAND_COLL = MongoUtils.getDbCollection(Constants.LOG_MONGO_URI, 'fangjia_log', 'calc_command')
|
||||
public final static DBCollection COMMAND_COLL = MongoUtils.getDbCollection(Constants.SEAWATER_MONGO_URI, 'fangjia_log', 'calc_command')
|
||||
public final static DBCollection REGION_STAT_COLL = MongoUtils.getDbCollection(Constants.FANGJIA_MONGO_URI, 'fangjia', 'region_stat')
|
||||
public final static DBCollection DISTRICT_STAT_COLL = MongoUtils.getDbCollection(Constants.FANGJIA_MONGO_URI, 'fangjia_stat', 'district_stat')
|
||||
public final static DBCollection REGION_COLL = MongoUtils.getDbCollection(Constants.FANGJIA_MONGO_URI, 'fangjia', 'region_block')
|
||||
|
||||
+53
-36
@@ -36,35 +36,44 @@ class HongXingMonthBatch extends BaseBatch{
|
||||
// createTestFile();
|
||||
// mergeFile()
|
||||
// mergeMatchId()
|
||||
def fileName = "C:\\Users\\wenyan\\Desktop\\宏信交付数据\\宏信楼盘4月监测20260420交付.xlsx"
|
||||
def fileName = "C:\\Users\\wenyan\\Desktop\\宏信交付数据\\宏信楼盘5月监测20260520交付.xlsx"
|
||||
def removeAddrFile = "C:\\Users\\wenyan\\Desktop\\宏信交付数据\\20260520宏信.xlsx"
|
||||
def removeAddrs = []
|
||||
ExcelUtils.read(removeAddrFile, 0).each {List item->
|
||||
removeAddrs << item["C"]
|
||||
}
|
||||
ExcelUtils.modify(fileName,{List item->
|
||||
if(item["E"] == null && removeAddrs.contains(item["C"])){
|
||||
item["E"] = "已处置"
|
||||
println("新增已处置房产:{item['C']}")
|
||||
}
|
||||
})
|
||||
def fixPriceAddrs = [:]
|
||||
ExcelUtils.read(removeAddrFile, 1).each {List item->
|
||||
if(item["A"] && item["B"]){
|
||||
fixPriceAddrs.put(item["A"],item["B"].toString().toDouble().toInteger())
|
||||
}
|
||||
removeAddrs << item["C"]
|
||||
}
|
||||
def stat = [:]
|
||||
//获取上个月的交付价格
|
||||
def lastMonthPriceRowId = "N" //上个月均价所在列号
|
||||
def lastMonthPriceRowId = "P" //上个月均价所在列号
|
||||
ExcelUtils.read(fileName).each{List item->
|
||||
if(item[lastMonthPriceRowId]){
|
||||
stat.put(item["C"], item[lastMonthPriceRowId])
|
||||
}
|
||||
}
|
||||
|
||||
// ExcelUtils.modify("C:\\Users\\wenyan\\Desktop\\宏信楼盘3月监测20260320交付跑数.xlsx",{List item->
|
||||
// if(stat.containsKey(item["C"])){
|
||||
// item["O"] = stat[item["C"]].toString().toDouble().toInteger()
|
||||
// }
|
||||
// })
|
||||
|
||||
|
||||
def lastMonthStr = DateUtils.formatDateByPattern(DateUtils.parseFromTightYYYYMMDD(DateUtils.addMonth(new Date(), -1)),"yyyyMM");
|
||||
def count = findCurMonthPrice(lastMonthStr)
|
||||
if(count > 0){
|
||||
def datas = ExcelUtils.read(fileName)
|
||||
def newDatas = createDatas(datas, lastMonthStr)
|
||||
def newDatas = createDatas(datas, lastMonthStr, fixPriceAddrs)
|
||||
def curDateStr = DateUtils.formatDateByPattern(new Date(),"yyyyMMdd")
|
||||
ExcelUtils.write(fileName, newDatas,"结果${curDateStr}")
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// ExcelUtils.multiThreadingModify("C:\\Users\\wenyan\\Desktop\\宏信楼盘3月监测20260320交付跑数V3(mu).xlsx",{ List d->
|
||||
// if (!["商铺","办公楼"].contains(d['A'])){
|
||||
// def tihuanMap = [:]
|
||||
@@ -112,10 +121,10 @@ class HongXingMonthBatch extends BaseBatch{
|
||||
|
||||
}
|
||||
|
||||
def createDatas(datas, lastMonthStr){
|
||||
def createDatas(datas, lastMonthStr, Map fixPriceAddrs){
|
||||
def rows = []
|
||||
rows << ["物业类型","名称","地址","期房/现房","处置状态","省份","城市","城市排名","面积","1月评估单价(元)","1月评估总价(元)","2月评估单价(元)","2月评估总价(元)","3月评估单价", "3月评估总价(元)","4月评估单价", "4月评估总价(元)"
|
||||
,"环比涨跌幅(%)","计算方式","定基涨跌幅(相比首月波动)","4月区域均价","4月区域均价涨跌幅(%)","3月楼盘所在区域价格的排名(仅针对住宅)","4月楼盘所在区域价格的排名(仅针对住宅)","楼盘所在区域排名变化(仅针对住宅)","近3个月内成交量","近6个月成交量","3个月挂牌量","匹配ID-新","备注","情况说明"]
|
||||
rows << ["物业类型","名称","地址","期房/现房","处置状态","省份","城市","城市排名","面积","1月评估单价(元)","1月评估总价(元)","2月评估单价(元)","2月评估总价(元)","3月评估单价", "3月评估总价(元)","4月评估单价", "4月评估总价(元)","5月评估单价", "5月评估总价(元)"
|
||||
,"环比涨跌幅(%)","计算方式","定基涨跌幅(相比首月波动)","5月区域均价","5月区域均价涨跌幅(%)","4月楼盘所在区域价格的排名(仅针对住宅)","5月楼盘所在区域价格的排名(仅针对住宅)","楼盘所在区域排名变化(仅针对住宅)","近3个月内成交量","近6个月成交量","3个月挂牌量","匹配ID-新","备注","情况说明"]
|
||||
def index = 1
|
||||
for(def d : datas){
|
||||
println d['B']
|
||||
@@ -136,25 +145,33 @@ class HongXingMonthBatch extends BaseBatch{
|
||||
row << d['M']
|
||||
row << d['N']
|
||||
row << d['O']
|
||||
row << d['P']
|
||||
row << d['Q']
|
||||
if(d['E'] == "已处置"){
|
||||
rows << row
|
||||
continue
|
||||
}
|
||||
def currMonthUnitPriceLabel = "R"
|
||||
def preMonthUnitPriceLabel = "P"
|
||||
def matchIdLabel = "AE"
|
||||
if(!["商铺","办公楼"].contains(d['A'])){
|
||||
def dist = CommonDatautils.findDistrictById(d['AD'])
|
||||
def dist = CommonDatautils.findDistrictById(d[matchIdLabel])
|
||||
if(dist){
|
||||
def priceObj = findDistrictMonthPrice(dist.city, dist.region, dist.name, lastMonthStr)
|
||||
def tihuanMap = [:]
|
||||
def preTihuanMap = [:]
|
||||
if(priceObj){
|
||||
if(d["P"]){
|
||||
def newAvgPrice = d["P"]
|
||||
if(fixPriceAddrs.containsKey(d['C'])){
|
||||
d[currMonthUnitPriceLabel] = fixPriceAddrs[d['c']]
|
||||
}
|
||||
if(d[currMonthUnitPriceLabel]){
|
||||
def newAvgPrice = d[currMonthUnitPriceLabel]
|
||||
row << DataUtil.getRound(newAvgPrice)
|
||||
def totalPrice = newAvgPrice * d['I']
|
||||
row << DataUtil.getRound(totalPrice)
|
||||
if(d["N"]){
|
||||
row << new BigDecimal(DataUtil.getRound(2,(newAvgPrice - d["N"]) * 100/ d["N"]).toString())
|
||||
preTihuanMap.put(dist.city+"##"+dist.region+"##"+dist.name, d["N"])
|
||||
if(d[preMonthUnitPriceLabel]){
|
||||
row << new BigDecimal(DataUtil.getRound(2,(newAvgPrice - d[preMonthUnitPriceLabel]) * 100/ d[preMonthUnitPriceLabel]).toString())
|
||||
preTihuanMap.put(dist.city+"##"+dist.region+"##"+dist.name, d[preMonthUnitPriceLabel])
|
||||
}else{
|
||||
row << ""
|
||||
}
|
||||
@@ -169,7 +186,7 @@ class HongXingMonthBatch extends BaseBatch{
|
||||
tihuanMap.put(dist.city+"##"+dist.region+"##"+dist.name, newAvgPrice)
|
||||
}else{
|
||||
def markup = priceObj.mom
|
||||
def curPrice = d['N']
|
||||
def curPrice = d[preMonthUnitPriceLabel]
|
||||
def newAvgPrice = curPrice * markup + curPrice
|
||||
row << DataUtil.getRound(newAvgPrice)
|
||||
def totalPrice = newAvgPrice * d['I']
|
||||
@@ -184,7 +201,7 @@ class HongXingMonthBatch extends BaseBatch{
|
||||
row << ""
|
||||
}
|
||||
tihuanMap.put(dist.city+"##"+dist.region+"##"+dist.name, newAvgPrice)
|
||||
preTihuanMap.put(dist.city+"##"+dist.region+"##"+dist.name, d["N"])
|
||||
preTihuanMap.put(dist.city+"##"+dist.region+"##"+dist.name, d[preMonthUnitPriceLabel])
|
||||
}
|
||||
}else{
|
||||
row << ""
|
||||
@@ -226,10 +243,10 @@ class HongXingMonthBatch extends BaseBatch{
|
||||
row << findHouse(dist)
|
||||
|
||||
}else{
|
||||
println d['AD'] +" 未找到该id的楼盘"
|
||||
println d[matchIdLabel] +" 未找到该id的楼盘"
|
||||
}
|
||||
}else{
|
||||
def dist = CommonDatautils.findDistrictById(d['AD'])
|
||||
def dist = CommonDatautils.findDistrictById(d[matchIdLabel])
|
||||
def cityMarkupObj = null
|
||||
def regionMarkupObj = null
|
||||
if(dist){
|
||||
@@ -250,13 +267,13 @@ class HongXingMonthBatch extends BaseBatch{
|
||||
regionMarkupObj = findSellShopMarkup(dist.city, dist.region, lastMonthStr, "district")
|
||||
}
|
||||
if(cityMarkupObj){
|
||||
if(d["P"]){
|
||||
def newAvgPrice = d["P"]
|
||||
if(d[currMonthUnitPriceLabel]){
|
||||
def newAvgPrice = d[currMonthUnitPriceLabel]
|
||||
row << DataUtil.getRound(newAvgPrice)
|
||||
def totalPrice = newAvgPrice * d['I']
|
||||
row << DataUtil.getRound(totalPrice)
|
||||
if(d['N']){
|
||||
row << new BigDecimal(DataUtil.getRound(2, (newAvgPrice - d['N']) * 100/ d['N']).toString())
|
||||
if(d[preMonthUnitPriceLabel]){
|
||||
row << new BigDecimal(DataUtil.getRound(2, (newAvgPrice - d[preMonthUnitPriceLabel]) * 100/ d[preMonthUnitPriceLabel]).toString())
|
||||
}else{
|
||||
row << ""
|
||||
}
|
||||
@@ -270,14 +287,14 @@ class HongXingMonthBatch extends BaseBatch{
|
||||
}
|
||||
|
||||
}else{
|
||||
def newAvgPrice = d['N'] * cityMarkupObj.mom + d['N']
|
||||
def newAvgPrice = d[preMonthUnitPriceLabel] * cityMarkupObj.mom + d[preMonthUnitPriceLabel]
|
||||
row << DataUtil.getRound(newAvgPrice)
|
||||
def totalPrice = newAvgPrice * d['I']
|
||||
row << DataUtil.getRound(totalPrice)
|
||||
row << cityMarkupObj.mom * 100
|
||||
row << ""
|
||||
if(d['N']){
|
||||
def djMarkup = (newAvgPrice - d['N'])*100/ d['N']
|
||||
if(d[preMonthUnitPriceLabel]){
|
||||
def djMarkup = (newAvgPrice - d[preMonthUnitPriceLabel])*100/ d[preMonthUnitPriceLabel]
|
||||
djMarkup = DataUtil.getRound(2, djMarkup)
|
||||
row << djMarkup.toString()
|
||||
}else{
|
||||
@@ -326,12 +343,12 @@ class HongXingMonthBatch extends BaseBatch{
|
||||
row << ""
|
||||
row << ""
|
||||
}else{
|
||||
println d['AD'] +" 未找到该id的楼盘"
|
||||
println d[matchIdLabel] +" 未找到该id的楼盘"
|
||||
}
|
||||
}
|
||||
row << d['AD']
|
||||
row << d['AB']
|
||||
row << d['AC']
|
||||
row << d[matchIdLabel]
|
||||
row << d['AF']
|
||||
row << d['AG']
|
||||
rows << row
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user