添加sdklog忽略文件
This commit is contained in:
@@ -21,3 +21,4 @@ deliverables/*/.idea
|
||||
/projects/fangjia-open/.idea
|
||||
*.idea*
|
||||
classes
|
||||
**/sdklog/*
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
package com.fangjia.script.wenyan
|
||||
|
||||
import com.fangjia.core.ProvinceData
|
||||
import com.fangjia.core.RegionData
|
||||
import com.fangjia.core.util.DateUtil
|
||||
import com.fangjia.core.util.Mongo3Utils
|
||||
import com.fangjia.script.util.CommonUtils
|
||||
import com.fangjia.script.util.DbUtils
|
||||
import com.fangjia.script.util.ElasticUtils
|
||||
import com.fangjia.script.util.ExcelUtils
|
||||
import com.mongodb.BasicDBObject
|
||||
import org.bson.Document
|
||||
import org.elasticsearch.action.get.GetRequest
|
||||
import org.elasticsearch.action.get.GetResponse
|
||||
import org.elasticsearch.client.RequestOptions
|
||||
import org.elasticsearch.client.RestHighLevelClient
|
||||
|
||||
////def data = []
|
||||
////data << ["ID","城市","区域","名称","地址", "财力评级"]
|
||||
//RestHighLevelClient client = ElasticUtils.getClient89("192.168.0.89")
|
||||
//district_analy_data_client = Mongo3Utils.getDbCollection("fangjia_stat", "district_analy_data")
|
||||
//level_map = ["1": "S", "2": "A", "3": "B", "4": "C", "5": "D"]
|
||||
//level_maps = new HashMap<>()
|
||||
//for(def key in level_map.keySet()){
|
||||
// level_maps.put(level_map[key], key)
|
||||
//}
|
||||
//ExcelUtils.modify("C:\\Users\\goojia\\Desktop\\财力评级-厦门.xlsx",{List item->
|
||||
//// GetResponse response = client.get(new GetRequest("community_summary", item["A"] as String), RequestOptions.DEFAULT)
|
||||
//// def query = new Document("city", item['B'].toString().replace("市", ""))
|
||||
//// query.append("region", item['C'].replace("区", ""))
|
||||
//// query.append("district_name", item["D"])
|
||||
//// def stat = district_analy_data_client.find(query).first()
|
||||
//// println(query)
|
||||
//// item["F"] = response.getSourceAsMap()?.consumption_rating
|
||||
//// item["G"] = stat?.community_rating
|
||||
// item["G"] = level_maps.get(item["G"], null)
|
||||
//// println(item)
|
||||
//})
|
||||
//System.exit(0)
|
||||
////for (def region in ["思明", "翔安", "湖里"]) {
|
||||
//// DbUtils.seaweed.find(new BasicDBObject("city", "厦门").append("region", region).append("cat", "district").append("status", 0)).each { BasicDBObject dbo ->
|
||||
//// println("${dbo._id.toString()}\t${dbo.city}市\t${dbo.region}区\t${dbo.name}\t${dbo.address}")
|
||||
//// }
|
||||
////}
|
||||
|
||||
ExcelUtils.read("C:\\Users\\goojia\\Desktop\\海南省城市均价.xlsx",1).each {List item->
|
||||
def yearMonth = DateUtil.formatByPattern(item[0], "yyyyMM").toInteger()
|
||||
|
||||
println(item)
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package com.fangjia.script.wenyan.xiamen
|
||||
|
||||
import com.fangjia.core.util.DataUtil
|
||||
import com.fangjia.core.util.GeoUtils
|
||||
import com.fangjia.script.util.ExcelUtils
|
||||
|
||||
ExcelUtils.multiThreadingModify("D:\\本地化部署\\厦门银行数据\\网点经纬度业务选择网点.xlsx",{List item ->
|
||||
def location = item['E']
|
||||
if(location){
|
||||
def lng = location.toString().split(",")[0].toDouble()
|
||||
def lat = location.toString().split(",")[1].toDouble()
|
||||
def bounds = GeoUtils.getAround(lat, lng, 3000)
|
||||
item["G"] = "${DataUtil.getRound(6, bounds[2])},${DataUtil.getRound(6,bounds[0])},${DataUtil.getRound(6,bounds[3])},${DataUtil.getRound(6,bounds[1])}"
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user