diff --git a/projects/fangjia-coresite/src/main/webapp/industry/bank.ftl b/projects/fangjia-coresite/src/main/webapp/industry/bank.ftl
index 858f366db..676b36ebb 100644
--- a/projects/fangjia-coresite/src/main/webapp/industry/bank.ftl
+++ b/projects/fangjia-coresite/src/main/webapp/industry/bank.ftl
@@ -4,7 +4,7 @@
银行洞察客户、网点布局、业务营销_选房价网 - 房价网 fangjia.com
-
+
<#include "../jsconstants.ftl" />
diff --git a/projects/fangjia-coresite/src/main/webapp/jsconstants.ftl b/projects/fangjia-coresite/src/main/webapp/jsconstants.ftl
index bf723dca2..5363a5992 100644
--- a/projects/fangjia-coresite/src/main/webapp/jsconstants.ftl
+++ b/projects/fangjia-coresite/src/main/webapp/jsconstants.ftl
@@ -21,4 +21,5 @@ var Constants = {
#if>
+
<#include "baidu_analysis.ftl" />
diff --git a/projects/fangjia-coresite/src/main/webapp/trend/trend.ftl b/projects/fangjia-coresite/src/main/webapp/trend/trend.ftl
index d0962de10..8a7c2935c 100644
--- a/projects/fangjia-coresite/src/main/webapp/trend/trend.ftl
+++ b/projects/fangjia-coresite/src/main/webapp/trend/trend.ftl
@@ -18,8 +18,8 @@
<#assign _currentCityDisplay>${cityName}#assign>
#if>
- <#assign PAGE_TITLE>${affectValue}房价走势 - 房价网 fangjia.com#assign>
- <#assign PAGE_KEYWORDS>${affectValue}房价走势,${affectValue}房产数据,${affectValue}房价#assign>
+ <#assign PAGE_TITLE>${affectValue}房价走势 - ${cityName}房产网 fangjia.com#assign>
+ <#assign PAGE_KEYWORDS>${affectValue}房价走势,${affectValue}房产数据,${affectValue}房价,二手房均价查询,楼盘估值,在线评估#assign>
<#assign headDesc>房价网提供${affectValue}及时、权威的房价走势图,免费查询最新季度房价、最近半年房价走势、去年同期房价走势、以及${affectValue}房价历史走势等信息。#assign>
<#assign PAGE_DESCRIPTION>${headDesc}#assign>
@@ -80,7 +80,7 @@
-
+
房产数据覆盖全国367个城市地区、80万楼盘、8000万房号库、70万楼盘字段、5000万POI数据。
@@ -389,10 +389,12 @@
timeout: 100000,
success: function(model) {
// $("#evalCount").text(toThousands(model.evalCount));
- var startNum = document.getElementById("evalCount").innerHTML;
+ // var startNum = document.getElementById("evalCount").innerHTML;
+ var startNum = toThousands(model.evalCount - 10000)
if (startNum == ''){
$("#evalCount").text(toThousands(model.evalCount));
}else{
+ $("#evalCount").text(startNum);
numScroll(startNum,model.evalCount);
}
},
diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/commData/CommonDatautils.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/commData/CommonDatautils.groovy
index 9db36e3d8..42b0e3dc2 100644
--- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/commData/CommonDatautils.groovy
+++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/commData/CommonDatautils.groovy
@@ -597,9 +597,9 @@ class CommonDatautils {
keys.put("region", 1);
keys.put("name", 1);
keys.put("_id", 1);
- DSCursor cursor = getDataStoreConnection().find(q, keys).batchSize(2000);
+ DSCursor cursor = DbUtils.seaweed.find(q, keys).batchSize(2000);
Iterator
iters = cursor.iterator()
- def result = [];
+ def result = new HashSet();
try{
while(iters.hasNext()) {
DBObject obj = iters.next()
diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/AddDistrictAddress.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/AddDistrictAddress.groovy
new file mode 100644
index 000000000..d85eefdca
--- /dev/null
+++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/data_handle/AddDistrictAddress.groovy
@@ -0,0 +1,323 @@
+package com.fangjia.script.gj.data_handle
+
+import com.fangjia.core.util.HttpRequest
+import com.fangjia.script.BaseBatch
+import com.fangjia.script.commData.CommonDatautils
+import com.fangjia.script.common.DataHandleUtils
+import com.fangjia.script.linxsh.util.AddressUtil
+import com.fangjia.script.lixue.util.DBUtils
+import com.fangjia.script.util.DbUtils
+import com.fangjia.script.util.ExcelUtils
+import com.fangjia.script.util.MongoUtils
+import com.mongodb.BasicDBObject
+import com.mongodb.DBCollection
+import groovy.json.JsonSlurper
+import net.sf.json.JSONObject
+
+import java.util.concurrent.CopyOnWriteArrayList
+import java.util.concurrent.CountDownLatch
+import java.util.concurrent.ExecutorService
+import java.util.concurrent.Executors
+import java.util.concurrent.atomic.AtomicLong
+
+//²¹³ä¿âÖÐûÓÐÏêϸµØַµÄСÇø
+class AddDistrictAddress extends BaseBatch{
+
+ def fullCityMap = CommonDatautils.queryFullNameCity()
+ def mcaDistMap = CommonDatautils.queryDistNameCityByMapping()
+
+ DBCollection BAIDU_POI_COLL = MongoUtils.getCollectionByName("crawl", "poi_wap_spider", "192.168.0.206",27020)
+ public static final DBCollection seaweed_fence_coll = MongoUtils.getCollectionByName("fangjia_base", "seaweed_fence", "mongo.db.fangjia.com")
+
+
+ public static final DBCollection administrative_mapping_coll = MongoUtils.getCollectionByName("business", "administrative_mapping", "mongo.db.fangjia.com")
+
+ def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
+ DBCollection seaweed_fence100_CONN = MongoUtils.getCollectionByName2("fangjia", "seaweed_fence", MONGO100_URL)
+
+ public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(10)
+
+ static main(args) {
+ runBatch(new AddDistrictAddress(), args)
+ }
+
+ @Override
+ public void process(Object args) {
+// def citys = CommonDatautils.findAllCity()
+// def index = 0
+// def allrets = []
+// for(def c : citys){
+// index ++
+// def districts = CommonDatautils.findAllDistricts(c, "district", ["city", "region", "name", "estate_type2", "address"])
+// def noRoadInfoDists = noDetailRoadInfoDistricts(districts)
+// println c +" "+index +" ԭʼСÇøÁ¿£º"+districts.size() +" ÐèÐÂÔöµØַÁ¿£º"+noRoadInfoDists.size()
+// noRoadInfoDists = baiduMatch(c, noRoadInfoDists)
+// noRoadInfoDists = gaodeMatch(c, noRoadInfoDists)
+//
+// def rets = []
+// rets << ["id", "³ÇÊÐ", "ÇøÓò", "Ãû³Æ", "µØַ", "°ٶÈԭµØַ", "°ٶȱêµØַ", "¸ߵÂԭµØַ", "¸ߵ±êµØַ"]
+// for(def d : noRoadInfoDists){
+// rets << [d._id.toString(), d.city, d.region, d.name, d.address, d.baidu_old_addr?d.baidu_old_addr:'',d.baidu_address?d.baidu_address:'', d.gaode_old_addr?d.gaode_old_addr:'', d.gaode_addr?d.gaode_addr:""]
+// }
+// allrets.addAll(rets)
+// if(allrets.size()>50000){
+// ExcelUtils.write("D:\\Êý¾Ý\\СÇø\\СÇøģºýµØַ²¹³ä"+index+".xlsx", allrets, "ÐÂÔöµØַ")
+// allrets.clear()
+// }
+// }
+
+ updateDistAddr()
+
+ }
+
+ def updateDistAddr(){
+ ExcelUtils.multiThreadingModify("D:\\Êý¾Ý\\СÇø\\´ýÐÂÔöСÇøµØַ.xlsx",{d->
+ def dist = CommonDatautils.findDistrictById(d['A'])
+ if(dist){
+ def udata = new BasicDBObject()
+ udata.put("address", d['J'])
+ def addr_alias = dist.addr_alias
+ if(!dist.addr_alias){
+ addr_alias = []
+ }
+ if(d['K'] && !addr_alias.contains(d['K'])){
+ addr_alias << d['K']
+ }
+
+ if(addr_alias){
+ udata.put("addr_alias", addr_alias)
+ }
+ DbUtils.seaweed.update(new BasicDBObject('_id', dist._id),new BasicDBObject('$set',udata))
+ d['L'] = "ÒѸüÐÂ"
+ }
+ })
+ }
+
+ def noDetailRoadInfoDistricts(districts){
+ def rets = []
+ for(def d : districts){
+ if(d.address){
+ def flag = DataHandleUtils.isStandardRoad(d.address)
+ if(!flag){
+ rets << d
+ }
+ }else{
+ rets << d
+ }
+ }
+ return rets;
+ }
+
+ def baiduMatch(city,districts){
+ def data = fullCityMap.get(city)
+ def fullCityName = null
+ if(data){
+ fullCityName = data.city
+ }
+ final CountDownLatch latch = new CountDownLatch(districts.size())
+
+ if(fullCityName){
+ def totalCount = new AtomicLong()
+ for(def i=0;i=100){
+ def delquery = new BasicDBObject()
+ delquery.put("_id", new BasicDBObject('$in', delRets))
+ RENT_DIST_STAT_COLL.remove(delquery)
+ delRets.clear()
+ }
+ }
+ }
+
+
+}
diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/images/AddDistImagesBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/images/AddDistImagesBatch.groovy
index fca5e855b..60824f8d5 100644
--- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/images/AddDistImagesBatch.groovy
+++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/gj/images/AddDistImagesBatch.groovy
@@ -38,8 +38,8 @@ class AddDistImagesBatch extends BaseBatch{
@Override
public void process(Object args) {
-// def mdate = DateUtils.formatDateByPattern(DateUtils.getFirstDayOfMonth(new Date(), -1), "yyyy-MM-dd")
- def mdate = DateUtils.getFirstDayOfMonth(new Date(), -1)
+ def mdate = DateUtils.formatDateByPattern(DateUtils.getFirstDayOfMonth(new Date(), -1), "yyyy-MM-dd")
+// def mdate = DateUtils.getFirstDayOfMonth(new Date(), -1)
def citys = CommonUtils.findAllCity()
citys.each {city->
def communitys = findAllEsData2(city, mdate)
@@ -47,10 +47,9 @@ class AddDistImagesBatch extends BaseBatch{
//µÚÈý·½ƥÅäСÇø
matchCommunitys(communitys)
}
+
+// statImgCount()
}
-
-
-
def findAllEsData2(city, mdate){
QueryBuilder date_range = QueryBuilders.rangeQuery("m_date").from(mdate.getTime()).includeLower(true)
@@ -106,8 +105,8 @@ class AddDistImagesBatch extends BaseBatch{
def total = communitys.size()
for(def i=0;i
+ floor_count = floor_count + v.size()
+ }
+ }
+ }
+ println out_pics_count
+ println floor_count
+ }
+
+
}