diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/house/ExportArroundHouse.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/house/ExportArroundHouse.groovy new file mode 100644 index 000000000..9ba0891ab --- /dev/null +++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/house/ExportArroundHouse.groovy @@ -0,0 +1,72 @@ +package com.fangjia.script.gj.house + +import com.fangjia.core.util.GeoUtils +import com.fangjia.script.commData.CommonDatautils +import com.fangjia.script.util.CommonUtils +import com.fangjia.script.util.ExcelUtils + +/** + * 导出某小区周边房源 + */ +class ExportArroundHouse { + + static main(args) { + def task = new ExportArroundHouse() + task.run() + } + + def run(){ + def name = "南山雨果" + def lng = 121.270784 + def lat = 31.160661 + def districts = CommonDatautils.getDistrictArround("上海", lng, lat) + def startPrice = 45000 + def endPrice = 50000 + def lastHouses = [] + for(def d : districts){ + def distance = GeoUtils.calculateDistance(lng, lat, d.lng/10000000000.0, d.lat/10000000000.0); + println d.name +" 相距:"+distance + def houses = CommonDatautils.findHouses(d.city, d.region, "sell", 20240829, 20250901, d.name, d.alias, d.estate_type2) + for(def h : houses){ + if(h.avg_price>startPrice && h.avg_price