添加地图

This commit is contained in:
2021-04-06 15:42:28 +08:00
parent 206ccff40e
commit e4a18340bb
6 changed files with 14514 additions and 69 deletions
File diff suppressed because one or more lines are too long
@@ -14,6 +14,7 @@ import com.fangjia.script.yinjihaun.amap.GaoDeApiUtils
import com.mongodb.BasicDBObject
import com.mongodb.DBCollection
import com.mongodb.client.MongoCollection
import net.sf.json.JSONArray
import net.sf.json.JSONObject
import org.apache.commons.lang3.StringUtils
import org.dom4j.Document
@@ -253,10 +254,22 @@ import org.dom4j.io.SAXReader
//// }
//// println con.join("\t")
////}
DBCollection OPEN_URI_LOG_42 = MongoUtils.getCollectionByName("business", "open_uri_log", "log.mongo.db.fangjia.com", 52002)
def data = [["城市", "地址", "省", "市", "区", "开发区","乡镇", "路", "路号", "小区名", "楼栋号", "单元号", "室号", "标准化地址"]]
OPEN_URI_LOG_42.find(new BasicDBObject("user_id", "1007756")).each {BasicDBObject dbo->
data << [dbo.parameter_map.city, dbo.parameter_map.address, dbo.res_map.result.province, dbo.res_map.result.city, dbo.res_map.result.district, dbo.res_map.result.developmentZone, dbo.res_map.result.township, dbo.res_map.result.street,dbo.res_map.result.streetNumber,dbo.res_map.result.name,dbo.res_map.result.buildingNumber,dbo.res_map.result.unitNumber,dbo.res_map.result.roomNumber,dbo.res_map.result.formattedAddress]
//
//DBCollection OPEN_URI_LOG_42 = MongoUtils.getCollectionByName("business", "open_uri_log", "log.mongo.db.fangjia.com", 52002)
//def data = [["城市", "地址", "省", "市", "区", "开发区","乡镇", "路", "路号", "小区名", "楼栋号", "单元号", "室号", "标准化地址"]]
//OPEN_URI_LOG_42.find(new BasicDBObject("user_id", "1007756")).each {BasicDBObject dbo->
// data << [dbo.parameter_map.city, dbo.parameter_map.address, dbo.res_map.result.province, dbo.res_map.result.city, dbo.res_map.result.district, dbo.res_map.result.developmentZone, dbo.res_map.result.township, dbo.res_map.result.street,dbo.res_map.result.streetNumber,dbo.res_map.result.name,dbo.res_map.result.buildingNumber,dbo.res_map.result.unitNumber,dbo.res_map.result.roomNumber,dbo.res_map.result.formattedAddress]
//}
//ExcelUtils.write("D:\\建行测试地址.xlsx", data, "结果")
DBCollection SQMETRE_RENT_COLL = MongoUtils.getCollectionByName("fangjia", "sqmetre_rent", "mongo.db.fangjia.com")
def query = new BasicDBObject()
query.cat = "region"
query.city= "上海"
query.weekend = Date.parse("yyyyMMdd", "20210228")
def doc = []
def prices = []
SQMETRE_RENT_COLL.find(query, new BasicDBObject("region", 1).append("avg_price", 1)).each {
doc.add(new BasicDBObject("name", it.region+"区").append("value", it.avg_price))
prices << it.avg_price
}
ExcelUtils.write("D:\\建行测试地址.xlsx", data, "结果")
println(JSONArray.fromObject(doc).toString())
Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large Load Diff