+14
-14
@@ -20,23 +20,23 @@ class ExportOracleEvaluationData {
|
||||
def curMonth = Integer.parseInt(DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMM"), 0, "yyyyMM"));
|
||||
|
||||
//计算结果相关
|
||||
exportAvmEvaluationGJNB(curMonth)
|
||||
exportAVMEvaluationItemGJNB(curMonth)
|
||||
|
||||
exportCityPrice(curMonth)
|
||||
exportRegionPrice(curMonth)
|
||||
|
||||
exportCommunityBasePriceGj(curMonth)//已合下面的合并
|
||||
exportCommunityBasePrice(curMonth)
|
||||
// exportAvmEvaluationGJNB(curMonth)
|
||||
// exportAVMEvaluationItemGJNB(curMonth)
|
||||
//
|
||||
// exportCityPrice(curMonth)
|
||||
// exportRegionPrice(curMonth)
|
||||
//
|
||||
// exportCommunityBasePriceGj(curMonth)//已合下面的合并
|
||||
// exportCommunityBasePrice(curMonth)
|
||||
|
||||
exportCommunityPdescribeGj(curMonth)
|
||||
exportCommCaseDetailGj(curMonth)
|
||||
|
||||
def curDate = curMonth.toString()+"28"
|
||||
SSHHelper jschCommand = new SSHHelper();
|
||||
System.out.println(jschCommand.executeCommand("sh /home/ccb/output/gz_package.sh ${curDate}"));
|
||||
// exportCommCaseDetailGj(curMonth)
|
||||
//
|
||||
// def curDate = curMonth.toString()+"28"
|
||||
// SSHHelper jschCommand = new SSHHelper();
|
||||
// System.out.println(jschCommand.executeCommand("sh /home/ccb/output/gz_package.sh ${curDate}"));
|
||||
//ok文件
|
||||
exportOkFile()
|
||||
// exportOkFile()
|
||||
}
|
||||
|
||||
def exportAvmEvaluationGJNB(yearMonth){
|
||||
|
||||
+45
-4
@@ -1,12 +1,16 @@
|
||||
package com.fangjia.script.gj.location
|
||||
|
||||
import com.fangjia.core.util.GeoUtils
|
||||
import com.fangjia.core.util.GeocodeUtils
|
||||
import com.fangjia.script.commData.CommonDatautils
|
||||
import com.fangjia.script.common.DataHandleUtils
|
||||
import com.fangjia.script.gj.OpenApiUtils
|
||||
import com.fangjia.script.gj.district.NameProcess
|
||||
import com.fangjia.script.util.CosineSimilarAlgorithm
|
||||
import com.fangjia.script.util.DbUtils
|
||||
import com.fangjia.script.util.ExcelUtils
|
||||
import com.mongodb.BasicDBObject
|
||||
import org.codehaus.jackson.sym.NameN
|
||||
import org.elasticsearch.xpack.sql.jdbc.EsDataSource
|
||||
|
||||
import java.sql.ResultSet
|
||||
@@ -26,6 +30,7 @@ class DistrictLocationUpdate {
|
||||
def task = new DistrictLocationUpdate()
|
||||
// task.run()
|
||||
task.mapMatch()
|
||||
// task.updateLocationToDB()
|
||||
}
|
||||
def run(){
|
||||
def citys = ["福州"]//CommonDatautils.findAllCity()
|
||||
@@ -51,7 +56,7 @@ class DistrictLocationUpdate {
|
||||
def mapMatch(){
|
||||
def index = 0
|
||||
ExcelUtils.modify("D:\\数据\\小区\\经纬度\\福州V3.xlsx",{d->
|
||||
if(!d['H'] && d['C']=="凤凰小区"){
|
||||
if(!d['H'] && d['C']=="华侨城龙居御景二期"){
|
||||
index++
|
||||
// def gdData = FangjiaClientUtils.getMapData(d['A'], d['B'],d['C'], d['D'],"住宅", "高德")
|
||||
// println d['A']+" "+d['B']+" "+d['C']
|
||||
@@ -100,6 +105,34 @@ class DistrictLocationUpdate {
|
||||
},0)
|
||||
}
|
||||
|
||||
def updateLocationToDB(){
|
||||
ExcelUtils.modify("D:\\数据\\小区\\经纬度\\福州V3.xlsx",{d->
|
||||
if(d['N'] && d['N']>1000){
|
||||
if(d['M']>=0.4 && d['K']){
|
||||
def query = new BasicDBObject()
|
||||
query.put("city", d['A'])
|
||||
query.put("region", d['B'])
|
||||
query.put("name", d['C'])
|
||||
|
||||
def udata = new BasicDBObject()
|
||||
udata.put("m_date", new Date())
|
||||
|
||||
Long lng0 = d['K'].toString().toDouble()*10000000000L
|
||||
Long lat0 = d['L'].toString().toDouble()*10000000000L
|
||||
udata.put("lat", lat0)
|
||||
udata.put("lng", lng0 )
|
||||
|
||||
def gmap = GeocodeUtils.getGaodeToBaidu(d['K'].toString().toDouble(), d['L'].toString().toDouble())
|
||||
Long lng2 = gmap.get("lng")*10000000000L
|
||||
Long lat2 = gmap.get("lat")*10000000000L
|
||||
udata.put("lat2", lat2)
|
||||
udata.put("lng2", lng2)
|
||||
DbUtils.seaweed.update(query, new BasicDBObject('$set', udata))
|
||||
}
|
||||
}
|
||||
},0)
|
||||
}
|
||||
|
||||
|
||||
def findStandardObject2(def city, def region, def name, def address, def rets) {
|
||||
if (rets) {
|
||||
@@ -124,7 +157,6 @@ class DistrictLocationUpdate {
|
||||
def maxNameScore = 0
|
||||
for(def n : names){
|
||||
double score1 = CosineSimilarAlgorithm.getSimilarity(n, name);
|
||||
score1 = Eval.me(score1.toString())
|
||||
if(score1 && score1>0){
|
||||
def nameScore = (score1 * 4)/10
|
||||
if(nameScore > maxNameScore){
|
||||
@@ -134,7 +166,12 @@ class DistrictLocationUpdate {
|
||||
}
|
||||
|
||||
if(maxNameScore){
|
||||
maxNameScore = DataHandleUtils.getDoubleRound(2, maxNameScore)
|
||||
try{
|
||||
maxNameScore = DataHandleUtils.getDoubleRound(2, maxNameScore)
|
||||
}catch(Exception e){
|
||||
maxNameScore = 0
|
||||
}
|
||||
|
||||
}
|
||||
score = maxNameScore + score;
|
||||
}
|
||||
@@ -142,7 +179,11 @@ class DistrictLocationUpdate {
|
||||
if(mapObj.address && address){
|
||||
double addressScore = CosineSimilarAlgorithm.getSimilarity(mapObj.address, address);
|
||||
if(addressScore && addressScore>0){
|
||||
addressScore = DataHandleUtils.getDoubleRound(2, addressScore)
|
||||
try{
|
||||
addressScore = DataHandleUtils.getDoubleRound(2, addressScore)
|
||||
}catch(Exception e){
|
||||
addressScore = 0
|
||||
}
|
||||
score = addressScore*4/10 + score
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user