From 34fe9b7f5706e1c109f1ff35f87e50534669044c Mon Sep 17 00:00:00 2001
From: gaojuan
Date: Sat, 21 Aug 2021 20:26:46 +0800
Subject: [PATCH 1/6] update
---
.../fangjia/script/ccbevaluation/BigdataCommunityBatch.groovy | 2 +-
.../com/fangjia/script/ccbevaluation/BigdataForsaleBatch.groovy | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataCommunityBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataCommunityBatch.groovy
index 560facf40..97cba74f5 100644
--- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataCommunityBatch.groovy
+++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataCommunityBatch.groovy
@@ -34,7 +34,7 @@ class BigdataCommunityBatch extends BaseBatch{
@Override
public void process(Object args) {
- def citys = CcbCommonUtils.citys;
+ def citys = ["Äþ²¨"]// CcbCommonUtils.citys;
def rows = []
def headers = ["³ÇÊÐID","ÐÐÕþÇøID","СÇøID","ÐÐÕþÇøÃû³Æ","СÇøÃû³Æ","ÏêϸµØַ","γ¶È","¾¶È","ռµØ×ÜÃæ»ý","½¨Öþ×ÜÃæ»ý","Â̻¯ÂÊ","ÈݻýÂÊ","³µλÊýÁ¿","½¨ÖþÄê´ú","·¿ÎÝÓÃ;",
diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataForsaleBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataForsaleBatch.groovy
index 72505e112..816366123 100644
--- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataForsaleBatch.groovy
+++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataForsaleBatch.groovy
@@ -64,7 +64,7 @@ class BigdataForsaleBatch extends BaseBatch{
@Override
public void process(Object args) {
- def citys = ["Áêˮ","ÎIJý","±£ͤ"]//CcbCommonUtils.citys;
+ def citys = CcbCommonUtils.citys;
def index = 0
def cityCodeDataMap = CcbCommonUtils.findCityCodeValue()
for(def city : citys){
From 125b48b17f90de6842fa64616460afbab30ef7a6 Mon Sep 17 00:00:00 2001
From: gaojuan
Date: Sat, 21 Aug 2021 20:37:58 +0800
Subject: [PATCH 2/6] update
---
.../fangjia/script/ccbevaluation/BigdataForsaleBatch.groovy | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataForsaleBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataForsaleBatch.groovy
index 816366123..d217ba79c 100644
--- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataForsaleBatch.groovy
+++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataForsaleBatch.groovy
@@ -157,10 +157,7 @@ class BigdataForsaleBatch extends BaseBatch{
FileUtils.batchCreateFile(allDatas, fileName, headers, "utf-8", true);
println "txtÎļþÉú³É "
- def rets = []
- rets << headers
- rets.addAll(allDatas)
- ExcelUtils.write("d:\\Êý¾Ý\\½¨ÐÐ\\·¿²ú¹Àֵ\\Êý¾ÝÎļþ\\bigdata_forsale_${city}.xlsx", rets, "Êý¾Ý")
+
}
From df2227edcffdbaf91f2da9e2d0d1d2040b0b9f2b Mon Sep 17 00:00:00 2001
From: gaojuan
Date: Wed, 25 Aug 2021 14:44:59 +0800
Subject: [PATCH 3/6] =?UTF-8?q?=E5=8E=BB=E5=88=AB=E5=A2=85?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../ccbevaluation/BigdataForsaleBatch.groovy | 39 +++++
.../ccbevaluation/BigdataPoiBatch.groovy | 154 ++++++++++++++----
.../script/ccbevaluation/TradeStatLog.groovy | 23 ++-
.../thirdPriceCrawl/SynchDistrictPrice.groovy | 39 +++--
4 files changed, 205 insertions(+), 50 deletions(-)
diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataForsaleBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataForsaleBatch.groovy
index d217ba79c..423b23f85 100644
--- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataForsaleBatch.groovy
+++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataForsaleBatch.groovy
@@ -13,6 +13,7 @@ import com.fangjia.script.util.FangJiaAreaMapUtils
import com.mongodb.BasicDBObject
import com.mongodb.DBObject
import groovy.sql.Sql
+import org.apache.commons.lang.StringUtils
import org.bson.types.ObjectId
import org.elasticsearch.index.query.BoolQueryBuilder
import org.elasticsearch.index.query.QueryBuilder
@@ -53,6 +54,7 @@ class BigdataForsaleBatch extends BaseBatch{
FITMENTS_TYPES_MAPS.put("ºÀװ", ["ºÀ»ªװÐÞ", "¸ߵµ", "ºÀ»ª", "ºÀװ", "¸¶װÐÞ", "¸ßװ", "ÉݳÞ"])
}
+ public static final String[] TAGS = {"¶À¶°", "ÁªÅÅ", "µþ¼Ó", "˫ƴ", "»¨Ãæ»ý", "Ӿ³Ø", "±ðÊû", "´ø»¨", "Ñó·¿", "µþƴ", "¶ÀԺ", "ÁªÌå", "Êû", "´óƽÊû"};
public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(80)
def sqlInstance = Sql.newInstance("jdbc:oracle:thin:@192.168.0.100:31521:orcl",
@@ -346,6 +348,10 @@ class BigdataForsaleBatch extends BaseBatch{
if(floor && floor.toInteger()<1){
floor = null
}
+ def vallaFlag = isVilla(seawater.area, seawater.name, seawater.height, seawater.room)
+ if(vallaFlag){
+ continue;
+ }
def rowMap = [:];
if(cat == "rent"){
@@ -410,6 +416,39 @@ class BigdataForsaleBatch extends BaseBatch{
return rets;
}
+ /**
+ * ÊǷñÊDZðÊû
+ * @return
+ */
+ public boolean isVilla(area, name, height, room) {
+ if (area == null) {
+ return false;
+ }
+
+ if (area >= 150 && StringUtils.indexOfAny(name, TAGS) > -1) {
+ return true;
+ }
+
+ boolean ret = false;
+ if (height != null && room != null) {
+ if (height <= 3) {
+ if (area > 200 && room >= 5) {
+ ret = true;
+ }
+ }
+ } else if (height == null && room != null) {
+ if (area > 360 && room >= 6) {
+ ret = true;
+ }
+ } else if (height == null && room == null) {
+ if (area > 500) {
+ ret = true;
+ }
+ }
+
+ return ret;
+ }
+
def getPublicDate(def pDate){
if(pDate>=20181001 && pDate<20200201){
diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataPoiBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataPoiBatch.groovy
index 70ec7bde0..f80fa70dc 100644
--- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataPoiBatch.groovy
+++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataPoiBatch.groovy
@@ -1,5 +1,6 @@
package com.fangjia.script.ccbevaluation
+import com.fangjia.core.RegionData
import com.fangjia.core.util.GeoUtils
import com.fangjia.script.BaseBatch
import com.fangjia.script.BatchOwner
@@ -8,12 +9,13 @@ import com.fangjia.script.commData.CommonDatautils
import com.fangjia.script.gj.ccb.FileUtils
import com.fangjia.script.util.DateUtils
import com.fangjia.script.util.ExcelUtils
+import com.fangjia.script.yinjihaun.amap.GaoDeApiUtils
import java.util.concurrent.CountDownLatch
import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors
import java.util.concurrent.atomic.AtomicLong
-
+import org.bson.types.ObjectId
/**
* ½¨ÐÐÊý¾Ýpoiͬ²½
*/
@@ -31,31 +33,35 @@ class BigdataPoiBatch extends BaseBatch{
def cityCodeDataMap = CcbCommonUtils.findCityCodeValue()
def citys = CcbCommonUtils.citys;
// def path = "D:\\Êý¾Ý\\½¨ÐÐ\\·¿²ú¹Àֵ\\poi\\¹«½».xlsx"
- def subwaydatas = ExcelUtils.read("D:\\Êý¾Ý\\½¨ÐÐ\\·¿²ú¹Àֵ\\poi\\µØÌú.xlsx", 0,1)
- def busDatas = ExcelUtils.read("D:\\Êý¾Ý\\½¨ÐÐ\\·¿²ú¹Àֵ\\poi\\¹«½».xlsx", 0,1)
- def hosptialDatas = ExcelUtils.read("D:\\Êý¾Ý\\½¨ÐÐ\\·¿²ú¹Àֵ\\poi\\ҽԺ.xlsx", 0,1)
- def bankDatas = ExcelUtils.read("D:\\Êý¾Ý\\½¨ÐÐ\\·¿²ú¹Àֵ\\poi\\ÒøÐÐ.xlsx", 0,1)
- def dealDatas = ExcelUtils.read("D:\\Êý¾Ý\\½¨ÐÐ\\·¿²ú¹Àֵ\\poi\\ɥÔá·þÎñ.xlsx", 0,1)
- def schoolDatas = ExcelUtils.read("D:\\Êý¾Ý\\½¨ÐÐ\\·¿²ú¹Àֵ\\poi\\ѧУ.xlsx", 0,1)
-
+// def subwaydatas = ExcelUtils.read("D:\\Êý¾Ý\\½¨ÐÐ\\·¿²ú¹Àֵ\\poi\\µØÌú.xlsx", 0,1)
+// def busDatas = ExcelUtils.read("D:\\Êý¾Ý\\½¨ÐÐ\\·¿²ú¹Àֵ\\poi\\¹«½».xlsx", 0,1)
+// def hosptialDatas = ExcelUtils.read("D:\\Êý¾Ý\\½¨ÐÐ\\·¿²ú¹Àֵ\\poi\\ҽԺ.xlsx", 0,1)
+// def bankDatas = ExcelUtils.read("D:\\Êý¾Ý\\½¨ÐÐ\\·¿²ú¹Àֵ\\poi\\ÒøÐÐ.xlsx", 0,1)
+// def dealDatas = ExcelUtils.read("D:\\Êý¾Ý\\½¨ÐÐ\\·¿²ú¹Àֵ\\poi\\ɥÔá·þÎñ.xlsx", 0,1)
+// def schoolDatas = ExcelUtils.read("D:\\Êý¾Ý\\½¨ÐÐ\\·¿²ú¹Àֵ\\poi\\ѧУ.xlsx", 0,1)
+ def hosptialDatas = ExcelUtils.read("D:\\Êý¾Ý\\½¨ÐÐ\\·¿²ú¹Àֵ\\poi\\ÖÐѧ.xlsx", 0,1)
def rets = []
- def rows1 = createDatas(citys, cityCodeDataMap, subwaydatas, "µØÌú")
+
+ def rows1 = createDatas(citys, cityCodeDataMap, hosptialDatas, "ѧУ")
rets.addAll(rows1)
- def rows2 = createDatas(citys, cityCodeDataMap, busDatas, "¹«½»")
- rets.addAll(rows2)
+// def rows1 = createDatas(citys, cityCodeDataMap, subwaydatas, "µØÌú")
+// rets.addAll(rows1)
//
- def rows3 = createDatas(citys, cityCodeDataMap, hosptialDatas, "ҽԺ")
- rets.addAll(rows3)
+// def rows2 = createDatas(citys, cityCodeDataMap, busDatas, "¹«½»")
+// rets.addAll(rows2)
//
- def rows4 = createDatas(citys, cityCodeDataMap, bankDatas, "ÒøÐÐ")
- rets.addAll(rows4)
-
- def rows5 = createDatas(citys, cityCodeDataMap, dealDatas, "ɥÔá·þÎñ")
- rets.addAll(rows5)
-
- def rows6 = createDatas(citys, cityCodeDataMap, schoolDatas, "ѧУ")
- rets.addAll(rows6)
+// def rows3 = createDatas(citys, cityCodeDataMap, hosptialDatas, "ҽԺ")
+// rets.addAll(rows3)
+//
+// def rows4 = createDatas(citys, cityCodeDataMap, bankDatas, "ÒøÐÐ")
+// rets.addAll(rows4)
+//
+// def rows5 = createDatas(citys, cityCodeDataMap, dealDatas, "ɥÔá·þÎñ")
+// rets.addAll(rows5)
+//
+// def rows6 = createDatas(citys, cityCodeDataMap, schoolDatas, "ѧУ")
+// rets.addAll(rows6)
def headers = ["³ÇÊÐID","ÐÐÕþÇøID","ID","PoiÃû³Æ","ÀàÐÍ","ÀàÐͱàÂë","γ¶È","¾¶È","±¸ע","´´½¨ʱ¼ä","¸üÐÂʱ¼ä","À´Դ¹«˾"]
@@ -113,7 +119,7 @@ class BigdataPoiBatch extends BaseBatch{
void run() {
try{
totalCount.addAndGet(1)
- if(citys.contains(d['D'])){
+ if(citys.contains(d['A'])){
def ret = addValue(d, cityCodeDataMap, cityDistMap, type)
if(ret){
rets << ret
@@ -133,24 +139,49 @@ class BigdataPoiBatch extends BaseBatch{
return rets;
}
- def addValue(d, cityCodeDataMap, cityDistMap, type){
+ def getRegionByLocation(lng, lat){
+ def jsonObject = GaoDeApiUtils.geocode(lng.toString()+","+lat.toString())
+
+ if(jsonObject && jsonObject.info=="OK"){
+ def compent = jsonObject.regeocode.addressComponent
+ if(compent){
+ def district = compent.district
+ return district;
+ }
+ }
+ return null
+ }
+
+ def addValue2(d, cityCodeDataMap, cityDistMap, type){
def ret = []
- def citycode = cityCodeDataMap.get(d['D'])
+ def citycode = cityCodeDataMap.get(d['E'])
ret << citycode
- def distCodeMap = cityDistMap.get(d['D'])
- if(d['E']){
- def distObj = distCodeMap.get(d['E'])
+
+ def region =getRegionByLocation(d['H'], d['I'])
+ def distCodeMap = cityDistMap.get(d['E'])
+ if(region){
+ region = RegionData.formatRegion(d['E'], region)
+ }
+ if(region){
+ def distObj = distCodeMap.get(region)
if(distObj){
ret << distObj.district_code
}else{
ret << ""
- println d['D']+" " + d['E']+" ÎÔӦµÄÇøÓò±àÂë "+d['F']
+ println d['E']+" " + region+" ÎÔӦµÄÇøÓò±àÂë "+d['F']
}
}else{
ret << ""
}
- ret << d['A']
- ret << d['F']
+
+ if(d['A']){
+ ret << d['A']
+ }else{
+ ret << new ObjectId()
+
+ }
+
+ ret << d['G']
ret << type
if(type=="µØÌú"){
@@ -192,4 +223,67 @@ class BigdataPoiBatch extends BaseBatch{
return ret;
}
+
+ def addValue(d, cityCodeDataMap, cityDistMap, type){
+ def ret = []
+ def citycode = cityCodeDataMap.get(d['A'])
+ ret << citycode
+ def distCodeMap = cityDistMap.get(d['A'])
+ def region =RegionData.formatRegion(d['A'], d['B'])
+
+ if(region){
+
+ def distObj = distCodeMap.get(region)
+ if(distObj){
+ ret << distObj.district_code
+ }else{
+ ret << ""
+ println d['A']+" " + d['B']+" ÎÔӦµÄÇøÓò±àÂë "+d['F']
+ }
+ }else{
+ ret << ""
+ }
+ ret << new ObjectId()
+ ret << d['C']
+ ret << type
+
+ if(type=="µØÌú"){
+ ret << "cz125"
+ }else if(type=="¹«½»"){
+ ret << "cz123"
+ }else if(type=="ҽԺ"){
+ ret << "hp111"
+ }else if(type == "ÒøÐÐ"){
+ ret << "se118"
+ }else if(type =="ɥÔá·þÎñ"){
+ ret << "ob101"
+ }else if(type =="ѧУ"){
+// if(d['F'].contains("ÖÐѧ")){
+ ret << "ed138"
+// }else if(d['F'].contains("Сѧ")){
+// ret << "ed114"
+// }
+ }
+ if(d['I']){
+ def lat = d['J'].toDouble()
+ def lng = d['I'].toDouble()
+ def loactionMap = GeoUtils.gcjToGps84(lat, lng)
+ if(loactionMap){
+ ret << com.fangjia.core.util.DataUtil.roundDouble(loactionMap.lat, 6)
+ ret << com.fangjia.core.util.DataUtil.roundDouble(loactionMap.lng,6)
+ }else{
+ ret << ""
+ ret << ""
+ }
+ }else{
+ ret << ""
+ ret << ""
+ }
+ ret << ""
+ ret << DateUtils.formatDateByPattern(new Date(), "yyyy-MM-dd HH:mm:ss")
+ ret << DateUtils.formatDateByPattern(new Date(), "yyyy-MM-dd HH:mm:ss")
+ ret << "FJW"
+
+ return ret;
+ }
}
diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/TradeStatLog.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/TradeStatLog.groovy
index e7bd95d9d..c2378636d 100644
--- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/TradeStatLog.groovy
+++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/TradeStatLog.groovy
@@ -23,8 +23,8 @@ class TradeStatLog {
static main(args) {
def task = new TradeStatLog()
- //task.run()
- task.thirdPartyStat()
+ task.run()
+// task.thirdPartyStat()
// println Calendar.getInstance().get(Calendar.YEAR)
}
@@ -32,33 +32,40 @@ class TradeStatLog {
def run(){
def citys = CcbCommonUtils.citys;
def rets = []
- rets << ["³ÇÊÐ","5ÔÂ×ÜÁ¿","6ÔÂ×ÜÁ¿","±´¿Ç","Á´¼Ò", "ÎҰ®ÎҼÒ","·¿ÌìÏÂ","ÖÐԭ"]
+ rets << ["³ÇÊÐ","5ÔÂ×ÜÁ¿","6ÔÂ×ÜÁ¿","7ÔÂ×ÜÁ¿","±´¿Ç","Á´¼Ò", "ÎҰ®ÎҼÒ","·¿ÌìÏÂ","ÖÐԭ"]
def sources = ["±´¿ÇÕҷ¿","Á´¼ÒÔÚÏß", "ÎҰ®ÎҼÒ","·¿ÌìÏÂ","ÖÐԭµزú"]
def startDate = "2021-05-01"
def date = "2021-06-01"
def endDate = "2021-07-01"
+ def newDate = "2021-08-01"
+
for(def city : citys){
def lastMonthCount = findTradesCount(city, null, DateUtils.parseFromTightByPattern(startDate,"yyyy-MM-dd"), DateUtils.parseFromTightByPattern(date,"yyyy-MM-dd"))
def curMonthCount = findTradesCount(city, null, DateUtils.parseFromTightByPattern(date,"yyyy-MM-dd"), DateUtils.parseFromTightByPattern(endDate,"yyyy-MM-dd"))
+ def nearMonthCount = findTradesCount(city, null, DateUtils.parseFromTightByPattern(endDate,"yyyy-MM-dd"), DateUtils.parseFromTightByPattern(newDate,"yyyy-MM-dd"))
+
def ret = []
ret << city
if(city == "ÉϺ£"){
def lastMonthYoudaCount = getYouDaData(DateUtils.parseFromTightByPattern(startDate,"yyyy-MM-dd"), DateUtils.parseFromTightByPattern(date,"yyyy-MM-dd"))
def curMonthYoudaCount = getYouDaData(DateUtils.parseFromTightByPattern(date,"yyyy-MM-dd"), DateUtils.parseFromTightByPattern(endDate,"yyyy-MM-dd"))
+ def nearMonthYoudaCount = getYouDaData(DateUtils.parseFromTightByPattern(endDate,"yyyy-MM-dd"), DateUtils.parseFromTightByPattern(newDate,"yyyy-MM-dd"))
def a = lastMonthCount.toInteger() + lastMonthYoudaCount.toInteger()
def b = curMonthCount.toInteger() + curMonthYoudaCount.toInteger()
+ def c = nearMonthCount.toInteger() + nearMonthYoudaCount.toInteger()
ret << a
ret << b
- def c = (b-a)*100/a
- def pre = DataHandleUtils.getDoubleRound(2, c)
+ ret << c
+ def d = (c-b)*100/a
+ def pre = DataHandleUtils.getDoubleRound(2, d)
ret << pre
}else{
ret << lastMonthCount
ret << curMonthCount
-
+ ret << nearMonthCount
if(lastMonthCount){
- def a = (curMonthCount-lastMonthCount)*100/lastMonthCount
+ def a = (nearMonthCount-curMonthCount)*100/curMonthCount
def pre = DataHandleUtils.getDoubleRound(2, a)
ret << pre
}else{
@@ -70,8 +77,10 @@ class TradeStatLog {
for(def source : sources){
def sourceLastMonthCount = findTradesCount(city, source, DateUtils.parseFromTightByPattern(startDate,"yyyy-MM-dd"), DateUtils.parseFromTightByPattern(date,"yyyy-MM-dd"))
def sourceCurMonthCount = findTradesCount(city, source, DateUtils.parseFromTightByPattern(date,"yyyy-MM-dd"), DateUtils.parseFromTightByPattern(endDate,"yyyy-MM-dd"))
+ def sourceNearMonthCount = findTradesCount(city, source, DateUtils.parseFromTightByPattern(endDate,"yyyy-MM-dd"), DateUtils.parseFromTightByPattern(newDate,"yyyy-MM-dd"))
ret << sourceLastMonthCount
ret << sourceCurMonthCount
+ ret << sourceNearMonthCount
}
rets << ret
println ret
diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/thirdPriceCrawl/SynchDistrictPrice.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/thirdPriceCrawl/SynchDistrictPrice.groovy
index bbd42ab13..2b8980257 100644
--- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/thirdPriceCrawl/SynchDistrictPrice.groovy
+++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/thirdPriceCrawl/SynchDistrictPrice.groovy
@@ -4,6 +4,7 @@ import com.fangjia.script.util.CommonUtils
import com.fangjia.script.util.DateUtils
import com.mongodb.BasicDBObject
import org.apache.solr.common.util.Hash
+import org.bson.types.ObjectId
/**
* ¸£ÖÝũÉÌÐÐ
@@ -16,7 +17,7 @@ class SynchDistrictPrice {
def districtDetailColl = CrawalDBUtil.getDistrictDetailColl();
// def sourceMap = ["jiwu.com":"¼ªÎÝ","58.com":"58ͬ³Ç","lianjia.com":"Á´¼Ò","ke.com":"±´¿ÇÕҷ¿","fang.com":"Ëѷ¿","fangdd.com":"·¿¶à¶à","house365.com":"365ÌԷ¿",
// "anjuke.com":"°²¾ӿÍ","cityhouse.cn":"³ÇÊз¿²ú"]
- def sourceMap = ["zhuge.com":"Öî¸ðÕҷ¿"]
+ def sourceMap = ["lianjia.com":"Á´¼Ò"]
static main(args) {
def task = new SynchDistrictPrice()
task.run()
@@ -27,11 +28,13 @@ class SynchDistrictPrice {
def citys = CommonUtils.findAllCity()
sourceMap.each { k, v ->
- for(def city : citys){
- def rets = findCrawlDistrictDetails(city, k, v)
- println city +" "+rets.size()
- synchData(city, rets, v)
+ for(def city : citys){
+ if(!["ÉϺ£","±±¾©","º£¿Ú"].contains(city)){
+ def rets = findCrawlDistrictDetails(city, k, v)
+ println city +" "+rets.size()
+ synchData(city, rets, v)
+ }
}
}
@@ -77,6 +80,7 @@ class SynchDistrictPrice {
q.put("city", city)
def count = thirdPartyColl.count(q)
def addIndex = 0
+ def updateIndex = 0
if(count==0){
try{
thirdPartyColl.insert(rets)
@@ -86,13 +90,25 @@ class SynchDistrictPrice {
println "["+source +"-"+city + "] add:"+ rets.size()+" ԭץȡ£º"+count
}else{
for(def r : rets){
- def flag = findIsExists(r.city, r.region, r.name, SHORT_DATE, source)
- if(!flag){
+ def obj= findIsExists(r.city, r.region, r.name, SHORT_DATE, source)
+ if(obj){
+ thirdPartyColl.remove(new BasicDBObject('_id',obj._id))
addIndex++
thirdPartyColl.save(r)
}
+// if(!obj){
+// addIndex++
+// thirdPartyColl.save(r)
+// }else{
+// if(r.avg_price && !obj.avg_price){
+// def udata = new BasicDBObject()
+// udata.put("avg_price", r.avg_price)
+// thirdPartyColl.update(new BasicDBObject('_id',obj._id),new BasicDBObject('$set',udata))
+// updateIndex++
+// }
+// }
}
- println "["+source +"-"+city + "] add:"+ addIndex+" ԭץȡ£º"+count
+ println "["+source +"-"+city + "] add:"+ addIndex+" ԭץȡ£º"+count +" Ðģº"+updateIndex
}
@@ -105,10 +121,7 @@ class SynchDistrictPrice {
q.put("city", city)
q.put("region", region)
q.put("name", name)
- def count = thirdPartyColl.count(q)
- if(count){
- return true
- }
- return false
+ def obj = thirdPartyColl.findOne(q)
+ return obj
}
}
From 0cbfce10a1cfa94bb2c842d90246bb4ddf7793f3 Mon Sep 17 00:00:00 2001
From: gaojuan
Date: Wed, 25 Aug 2021 15:10:09 +0800
Subject: [PATCH 4/6] update
---
.../com/fangjia/script/ccbevaluation/BigdataForsaleBatch.groovy | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataForsaleBatch.groovy b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataForsaleBatch.groovy
index 423b23f85..162503f04 100644
--- a/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataForsaleBatch.groovy
+++ b/projects/fangjia-script/src/main/groovy/com/fangjia/script/ccbevaluation/BigdataForsaleBatch.groovy
@@ -54,7 +54,7 @@ class BigdataForsaleBatch extends BaseBatch{
FITMENTS_TYPES_MAPS.put("ºÀװ", ["ºÀ»ªװÐÞ", "¸ߵµ", "ºÀ»ª", "ºÀװ", "¸¶װÐÞ", "¸ßװ", "ÉݳÞ"])
}
- public static final String[] TAGS = {"¶À¶°", "ÁªÅÅ", "µþ¼Ó", "˫ƴ", "»¨Ãæ»ý", "Ӿ³Ø", "±ðÊû", "´ø»¨", "Ñó·¿", "µþƴ", "¶ÀԺ", "ÁªÌå", "Êû", "´óƽÊû"};
+ public static final String[] TAGS = ["¶À¶°", "ÁªÅÅ", "µþ¼Ó", "˫ƴ", "»¨Ãæ»ý", "Ӿ³Ø", "±ðÊû", "´ø»¨", "Ñó·¿", "µþƴ", "¶ÀԺ", "ÁªÌå", "Êû", "´óƽÊû"];
public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(80)
def sqlInstance = Sql.newInstance("jdbc:oracle:thin:@192.168.0.100:31521:orcl",
From dc189e21d2e2ee229106019b9eae46c32840953d Mon Sep 17 00:00:00 2001
From: xuhe
Date: Wed, 25 Aug 2021 16:07:59 +0800
Subject: [PATCH 5/6] =?UTF-8?q?=E7=BD=91=E7=AB=99=E9=82=AE=E7=AE=B1?=
=?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
projects/fangjia-coresite/src/main/webapp/about/contact.ftl | 2 +-
projects/fangjia-coresite/src/main/webapp/ad/cpdb.ftl | 2 +-
.../fangjia-coresite/src/main/webapp/alidata/download.ftl | 2 +-
projects/fangjia-coresite/src/main/webapp/api/testApply.ftl | 2 +-
projects/fangjia-coresite/src/main/webapp/app/index.ftl | 4 ++--
projects/fangjia-coresite/src/main/webapp/company/about.ftl | 6 +++---
.../fangjia-coresite/src/main/webapp/diaoyudao/index.ftl | 2 +-
projects/fangjia-coresite/src/main/webapp/footer/footer.ftl | 2 +-
.../src/main/webapp/footer/introduceFooter.ftl | 2 +-
.../src/main/webapp/footer/simpleFooter.ftl | 2 +-
.../src/main/webapp/footer/simpleFooterNew.ftl | 2 +-
.../fangjia-coresite/src/main/webapp/header/v2/_footer.ftl | 2 +-
.../fangjia-coresite/src/main/webapp/header/v5/_footer.ftl | 2 +-
.../fangjia-coresite/src/main/webapp/header/v5/_footer2.ftl | 2 +-
.../src/main/webapp/header/v5/noBoxApp_footer.ftl | 2 +-
.../src/main/webapp/personalcenter/index.ftl | 2 +-
.../src/main/webapp/personalcenter/rechargeHistory.ftl | 2 +-
.../fangjia-coresite/src/main/webapp/recharge/buyList.ftl | 2 +-
.../src/main/webapp/recharge/prechargePay.ftl | 2 +-
.../src/main/webapp/recharge/rechargeList.ftl | 2 +-
.../src/main/webapp/recharge/setPassword.ftl | 2 +-
.../fangjia-coresite/src/main/webapp/recharge/statement.ftl | 2 +-
.../src/main/webapp/user/reqUserLoginPage.ftl | 2 +-
.../src/main/webapp/user/reqUserRegPage.ftl | 2 +-
.../src/main/webapp/user/reqUserResetPassPage.ftl | 2 +-
.../fangjia-coresite/src/main/webapp/xingshang/regist.ftl | 2 +-
26 files changed, 29 insertions(+), 29 deletions(-)
diff --git a/projects/fangjia-coresite/src/main/webapp/about/contact.ftl b/projects/fangjia-coresite/src/main/webapp/about/contact.ftl
index 72fecc686..da753c519 100644
--- a/projects/fangjia-coresite/src/main/webapp/about/contact.ftl
+++ b/projects/fangjia-coresite/src/main/webapp/about/contact.ftl
@@ -34,7 +34,7 @@
diff --git a/projects/fangjia-coresite/src/main/webapp/ad/cpdb.ftl b/projects/fangjia-coresite/src/main/webapp/ad/cpdb.ftl
index 3e1653ae8..39b88a6c6 100644
--- a/projects/fangjia-coresite/src/main/webapp/ad/cpdb.ftl
+++ b/projects/fangjia-coresite/src/main/webapp/ad/cpdb.ftl
@@ -158,7 +158,7 @@
diff --git a/projects/fangjia-coresite/src/main/webapp/app/index.ftl b/projects/fangjia-coresite/src/main/webapp/app/index.ftl
index 9d9cd6b9e..3d46edff9 100644
--- a/projects/fangjia-coresite/src/main/webapp/app/index.ftl
+++ b/projects/fangjia-coresite/src/main/webapp/app/index.ftl
@@ -262,9 +262,9 @@
-
+
- service@fangjia.com
+ gujia@fangjia.com
diff --git a/projects/fangjia-coresite/src/main/webapp/company/about.ftl b/projects/fangjia-coresite/src/main/webapp/company/about.ftl
index b1af2a8cc..53b3d7b12 100644
--- a/projects/fangjia-coresite/src/main/webapp/company/about.ftl
+++ b/projects/fangjia-coresite/src/main/webapp/company/about.ftl
@@ -77,7 +77,7 @@
上海
电 话: 4001883787(周一至周五 09:00-18:00)
- 邮 箱: service@fangjia.com
+ 邮 箱: gujia@fangjia.com
地 址:上海市黄浦区黄陂北路227号中区广场1207室
邮 编: 200003
@@ -85,7 +85,7 @@
-
+
+
+

+
关注估家科技客服微信号
+ Follow us on WeChat
+
+
+

+
关注官方微信公众号
+ Follow us on WeChat
+
+ <#--
+

+
关注官方微信公众号
+
Follow us on WeChat
+
-->
+
+
@@ -115,9 +134,23 @@
地 址: 上海市黄浦区黄陂北路227号中区广场1207室
邮 编: 200003
-
-
+
+
+

+
关注估家科技客服微信号
+
Follow us on WeChat
+
+
+

+
关注官方微信公众号
+
Follow us on WeChat
+
+
+
他们都在和我们合作
diff --git a/projects/fangjia-coresite/src/main/webapp/header/v5/contact.ftl b/projects/fangjia-coresite/src/main/webapp/header/v5/contact.ftl
index 7d098faa3..8bfd9856c 100644
--- a/projects/fangjia-coresite/src/main/webapp/header/v5/contact.ftl
+++ b/projects/fangjia-coresite/src/main/webapp/header/v5/contact.ftl
@@ -16,9 +16,9 @@
-
+
- market@fangjia.com
+ gujia@fangjia.com
diff --git a/projects/fangjia-coresite/src/main/webapp/header/v5/index.ftl b/projects/fangjia-coresite/src/main/webapp/header/v5/index.ftl
index f30cceb89..ca9611b59 100644
--- a/projects/fangjia-coresite/src/main/webapp/header/v5/index.ftl
+++ b/projects/fangjia-coresite/src/main/webapp/header/v5/index.ftl
@@ -1476,9 +1476,9 @@
-
+
- market@fangjia.com
+ gujia@fangjia.com
diff --git a/projects/fangjia-coresite/src/main/webapp/saleLeads/apply.ftl b/projects/fangjia-coresite/src/main/webapp/saleLeads/apply.ftl
index dc913c853..c8c45e7cc 100644
--- a/projects/fangjia-coresite/src/main/webapp/saleLeads/apply.ftl
+++ b/projects/fangjia-coresite/src/main/webapp/saleLeads/apply.ftl
@@ -243,14 +243,14 @@
@@ -110,7 +110,7 @@
您可通过在线方式联系专业顾问,他们将非常乐意为您提供更多服务。
-
立即咨询
+
立即咨询
@@ -128,9 +128,134 @@
+
+
<#include "/header/v5/_footer.ftl"/>
+