update
This commit is contained in:
+7
-10
@@ -87,17 +87,14 @@ class NewPoiData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def calcuteDistance(){
|
def calcuteDistance(){
|
||||||
ExcelUtils.multiThreadingModify("d:\\数据\\写字楼测试-1118-新增.xlsx", { d ->
|
ExcelUtils.multiThreadingModify("C:\\Users\\JLKJ0001\\Downloads\\商铺出租信息.xlsx", { d ->
|
||||||
if(d['F']){
|
if(d['I']){
|
||||||
if(d['A'].contains("北京")){
|
def arrs = d['I'].split(",")
|
||||||
def distance = GeoHelper.GetDistance(d['F'].toString().toDouble(), d['E'].toString().toDouble(), 39.996743, 116.481075)
|
def distance = GeoHelper.GetDistance(arrs[1].toString().toDouble(),arrs[0].toDouble(), 22.512276,113.939156)
|
||||||
d['K'] = distance
|
d['X'] = distance
|
||||||
}else if(d['A'].contains("烟台")){
|
println distance
|
||||||
def distance = GeoHelper.GetDistance(d['F'].toString().toDouble(), d['E'].toString().toDouble(), 37.459645, 121.438616)
|
|
||||||
d['K'] = distance
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}, 1)
|
}, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+25
-20
@@ -2,7 +2,6 @@ package com.fangjia.script.gj.poc
|
|||||||
|
|
||||||
import com.fangjia.script.ccbevaluation.CcbCommonUtils
|
import com.fangjia.script.ccbevaluation.CcbCommonUtils
|
||||||
import com.fangjia.script.commData.CommonDatautils
|
import com.fangjia.script.commData.CommonDatautils
|
||||||
import com.fangjia.script.util.DateUtil
|
|
||||||
import com.fangjia.script.util.DateUtils
|
import com.fangjia.script.util.DateUtils
|
||||||
import com.fangjia.script.util.ExcelUtils
|
import com.fangjia.script.util.ExcelUtils
|
||||||
import com.fangjia.script.util.MongoUtils
|
import com.fangjia.script.util.MongoUtils
|
||||||
@@ -15,7 +14,6 @@ import java.util.concurrent.CountDownLatch
|
|||||||
import java.util.concurrent.ExecutorService
|
import java.util.concurrent.ExecutorService
|
||||||
import java.util.concurrent.Executors
|
import java.util.concurrent.Executors
|
||||||
import java.util.concurrent.atomic.AtomicLong
|
import java.util.concurrent.atomic.AtomicLong
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 价格对比,第三方,成交,建行价格,自已家价格
|
* 价格对比,第三方,成交,建行价格,自已家价格
|
||||||
*/
|
*/
|
||||||
@@ -23,8 +21,8 @@ class AddPriceTest {
|
|||||||
|
|
||||||
public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(50)
|
public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(50)
|
||||||
|
|
||||||
def pgsqlInstance = Sql.newInstance("jdbc:postgresql://192.168.0.236:5432/warehouse",
|
// def pgsqlInstance = Sql.newInstance("jdbc:postgresql://192.168.0.236:5432/warehouse",
|
||||||
"postgres", "postgres", "org.postgresql.Driver")
|
// "postgres", "postgres", "org.postgresql.Driver")
|
||||||
|
|
||||||
//235为房价网内部计算均价的库
|
//235为房价网内部计算均价的库
|
||||||
def pgsqlInstance235 = Sql.newInstance("jdbc:postgresql://192.168.0.235:5433/fangjia?stringtype=unspecified",
|
def pgsqlInstance235 = Sql.newInstance("jdbc:postgresql://192.168.0.235:5433/fangjia?stringtype=unspecified",
|
||||||
@@ -38,15 +36,22 @@ class AddPriceTest {
|
|||||||
task.run();
|
task.run();
|
||||||
}
|
}
|
||||||
def run(){
|
def run(){
|
||||||
def filePath = "D:\\数据\\价格\\惠州.xlsx"
|
// def districts = CommonDatautils.findAllDistrictsFromMg("西安","district", ["_id","city","region", "name", "lng","lat", "build_date", "household_count"])
|
||||||
|
// def rets = []
|
||||||
|
// rets << ["id","城市","区域","名称","经度","纬度","户数","建成年代","价格","可信度"]
|
||||||
|
// for(def d : districts){
|
||||||
|
// rets << [d._id.toString(), d.city, d.region,d.name,d.lng/10000000000.0, d.lat/10000000000.0, d.household_count, d.build_date]
|
||||||
|
// }
|
||||||
|
// ExcelUtils.write("d:\\数据\\数据建设\\西安楼盘.xlsx", rets, "西安")
|
||||||
|
def filePath = "d:\\数据\\数据建设\\西安楼盘.xlsx"
|
||||||
// addGXDPrice(filePath)
|
// addGXDPrice(filePath)
|
||||||
// addCcbPrice(filePath)
|
addCcbPrice(filePath)
|
||||||
// addThirdPrice(filePath)
|
// addThirdPrice(filePath)
|
||||||
// addFjwPrice(filePath)
|
// addFjwPrice(filePath)
|
||||||
// exportPkPrice()
|
// exportPkPrice()
|
||||||
// addRegion()
|
// addRegion()
|
||||||
// addTradePrice(filePath)
|
// addTradePrice(filePath)
|
||||||
addThirdSamplePrice("D:\\数据\\建行\\房产估值\\指导价\\级联、国信达价格导入_0313.xlsx")
|
// addThirdSamplePrice("D:\\数据\\建行\\房产估值\\指导价\\级联、国信达价格导入_0313.xlsx")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -216,25 +221,25 @@ class AddPriceTest {
|
|||||||
def addCcbPrice(filepath){
|
def addCcbPrice(filepath){
|
||||||
def cityCodeDataMap = CcbCommonUtils.findCityCodeValue()
|
def cityCodeDataMap = CcbCommonUtils.findCityCodeValue()
|
||||||
ExcelUtils.multiThreadingModify(filepath,{ d->
|
ExcelUtils.multiThreadingModify(filepath,{ d->
|
||||||
if(d['A']){
|
if(d['B']){
|
||||||
def cityId = cityCodeDataMap.get(d['B'])
|
def cityId = cityCodeDataMap.get(d['B'])
|
||||||
def map = findAvgPrice(d['A'], cityId)
|
// def map = findAvgPrice(d['A'], cityId)
|
||||||
if(map){
|
// if(map){
|
||||||
d['I'] = map.avg_price
|
// d['I'] = map.avg_price
|
||||||
d['J'] = map.month
|
// d['J'] = map.month
|
||||||
// d['H'] = map.calc_type
|
//// d['H'] = map.calc_type
|
||||||
// d['AM'] = map.credit_value
|
//// d['AM'] = map.credit_value
|
||||||
}
|
// }
|
||||||
|
|
||||||
def newPriceMap = findNewFjwAvgPrice(d['A'], cityId)
|
def newPriceMap = findNewFjwAvgPrice(d['A'], cityId)
|
||||||
if(newPriceMap){
|
if(newPriceMap){
|
||||||
d['G'] = newPriceMap.avg_price
|
d['I'] = newPriceMap.avg_price
|
||||||
d['H'] = newPriceMap.month
|
d['K'] = newPriceMap.month
|
||||||
d['H'] = map.calc_type
|
d['L'] = newPriceMap.calc_type
|
||||||
// d['AM'] = map.credit_value
|
d['J'] = newPriceMap.credit_value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
}, 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user