Merge branch 'script_gj' into 'master'
Script gj See merge request !405
This commit is contained in:
+4
-12
@@ -16,13 +16,15 @@ class ExportOracleData {
|
||||
"GOOJIA", "GOOJIA", "oracle.jdbc.driver.OracleDriver")
|
||||
|
||||
def cityCodeMap = CcbCommonUtils.findCityCodeValue()
|
||||
def citys = null
|
||||
|
||||
static main(args) {
|
||||
def task = new ExportOracleData()
|
||||
task.run()
|
||||
task.run(args)
|
||||
}
|
||||
|
||||
def run() {
|
||||
def run(args) {
|
||||
citys = CcbCommonUtils.getRunningCitys(args)
|
||||
// def curMonth = Integer.parseInt(DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMM"), 0, "yyyyMM"));
|
||||
def lastMonth = Integer.parseInt(DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMM"), -1, "yyyyMM"));
|
||||
def lastMonthStr = DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyy-MM"), -1, "yyyy-MM")
|
||||
@@ -131,7 +133,6 @@ class ExportOracleData {
|
||||
|
||||
|
||||
def exportBigdataPoiData() {
|
||||
def citys = CcbCommonUtils.citys_all
|
||||
def allRows = []
|
||||
for(def city : citys) {
|
||||
def cityCode = cityCodeMap.get(city)
|
||||
@@ -200,7 +201,6 @@ class ExportOracleData {
|
||||
// def citys = [ "上海","扬州","北京","重庆","天津","成都","沈阳","大连","安庆","西宁","日照","长春","武汉","西安","苏州","广州","南京","青岛","济南","宁波","长沙","石家庄","佛山","嘉兴","银川","南通","廊坊","中山","郑州","哈尔滨","烟台","徐州","绍兴","厦门","昆明","南昌","贵阳","珠海","东莞","镇江","洛阳","温州","兰州","福州","惠州","呼和浩特","常州","唐山","淮安","湖州","九江","太原","北海","株洲","淄博","盐城","乌鲁木齐","海口","南宁","常德","台州","金华","吉林","岳阳","柳州","清远","湛江","张家口","保定","深圳","杭州","合肥","无锡","泉州","遵义","肇庆","漳州","宜昌","芜湖","泰州","汕头","三亚","秦皇岛","马鞍山","连云港","沧州","拉萨","锦州","大同","文昌","保亭","陵水"]
|
||||
// def cityCodeDataMap = CcbCommonUtils.findCityCodeValue()
|
||||
def allRows = []
|
||||
def citys = CcbCommonUtils.citys_all
|
||||
for(def city : citys) {
|
||||
def cityCode = cityCodeMap.get(city)
|
||||
def sql = "select CITYID, COMMID, BUILDTYPE, REMARK, to_char(CREATETIME,'yyyy-mm-dd hh24:mi:ss') as CREATETIME, to_char(UPDATETIME,'yyyy-mm-dd hh24:mi:ss') as UPDATETIME,SOURCECODE, WORKDATE from bigdata_commbuildtype_gj where CITYID='${cityCode}'";
|
||||
@@ -233,7 +233,6 @@ class ExportOracleData {
|
||||
}
|
||||
|
||||
def exportBigdataDistrictData() {
|
||||
def citys = CcbCommonUtils.citys_all
|
||||
def allRows = []
|
||||
for(def city : citys) {
|
||||
def cityCode = cityCodeMap.get(city)
|
||||
@@ -275,7 +274,6 @@ class ExportOracleData {
|
||||
|
||||
|
||||
def exportGuidedPrice() {
|
||||
def citys = CcbCommonUtils.citys_all
|
||||
def allRows = []
|
||||
for(def city : citys) {
|
||||
def cityCode = cityCodeMap.get(city)
|
||||
@@ -314,7 +312,6 @@ class ExportOracleData {
|
||||
}
|
||||
|
||||
def exportCommunityGuidedPrice(def date) {
|
||||
def citys = CcbCommonUtils.citys_all
|
||||
def allRows = []
|
||||
for(def city : citys) {
|
||||
def cityCode = cityCodeMap.get(city)
|
||||
@@ -354,7 +351,6 @@ class ExportOracleData {
|
||||
def exportBigdataDeal(def dealDate, def new_dists) {
|
||||
|
||||
def allRows = []
|
||||
def citys = CcbCommonUtils.citys_all
|
||||
for(def city : citys) {
|
||||
def cityCode = cityCodeMap.get(city)
|
||||
if(new_dists){
|
||||
@@ -530,7 +526,6 @@ class ExportOracleData {
|
||||
}
|
||||
def headers = []
|
||||
def index = 0
|
||||
def citys = CcbCommonUtils.citys_all
|
||||
for(def city : citys) {
|
||||
def cityCode = cityCodeMap.get(city)
|
||||
def allRows = []
|
||||
@@ -588,7 +583,6 @@ class ExportOracleData {
|
||||
|
||||
def exportBigdataCommunity(){
|
||||
|
||||
def citys = CcbCommonUtils.citys_all
|
||||
def allRows = []
|
||||
for(def city : citys) {
|
||||
def cityCode = cityCodeMap.get(city)
|
||||
@@ -648,8 +642,6 @@ class ExportOracleData {
|
||||
|
||||
def exportBigdataForsale(publishDate, new_dists){
|
||||
//["北京","上海"]
|
||||
def citys = CcbCommonUtils.citys_all;
|
||||
|
||||
def curDate = DateUtils.formatDateByPattern(new Date(), "yyyyMM")+"28";
|
||||
def fileName = "/ccb/MODEL_000000_000000_BIGDATA_FORSALE_GJ_ADD_${curDate}_0001.dat"
|
||||
if(CommonDatautils.isWindow()){
|
||||
|
||||
+7
-7
@@ -73,15 +73,15 @@ class TradeStatLog {
|
||||
}
|
||||
|
||||
def run(){
|
||||
def citys = CcbCommonUtils.citys;
|
||||
def citys = CcbCommonUtils.citys_92;
|
||||
def rets = []
|
||||
rets << ["城市","6月总量","7月总量","8月总量","占比","贝壳","链家", "我爱我家","房天下","中原"]
|
||||
def sources = ["贝壳找房","链家在线", "我爱我家","房天下","中原地产"]
|
||||
rets << ["城市","7月总量","8月总量","9月总量","占比","贝壳","链家", "我爱我家","房天下","中原"]
|
||||
def sources = ["贝壳找房","链家在线","我爱我家","房天下","中原地产"]
|
||||
//def startDate = "2021-05-01"
|
||||
def startDate = "2022-06-01"
|
||||
def date = "2022-07-01"
|
||||
def endDate = "2022-08-01"
|
||||
def newDate = "2022-09-01"
|
||||
def startDate = "2022-07-01"
|
||||
def date = "2022-08-01"
|
||||
def endDate = "2022-09-01"
|
||||
def newDate = "2022-10-01"
|
||||
|
||||
for(def city : citys){
|
||||
def lastMonthCount = findTradesCount(city, null, DateUtils.parseFromTightByPattern(startDate,"yyyy-MM-dd"), DateUtils.parseFromTightByPattern(date,"yyyy-MM-dd"))
|
||||
|
||||
+2
-2
@@ -48,13 +48,13 @@ class YouDaDataParser {
|
||||
def final AtomicInteger count_ = new AtomicInteger(0)
|
||||
|
||||
|
||||
static def statDate = "2022-08-01"
|
||||
static def statDate = "2022-09-01"
|
||||
static main(args) {
|
||||
def task = new YouDaDataParser();
|
||||
// task.newHouseparse();//友达一手房存入mongo
|
||||
// task.esfParser("D:\\数据\\友达\\2022年9月\\查询1.DBF");//友达二手房存入mongo
|
||||
// task.newhouseToSaveEs();//新房保存到es
|
||||
task.esfhouseToSaveEs();//二手房保存到es
|
||||
// task.esfhouseToSaveEs();//二手房保存到es
|
||||
// task.updateFinishDateByEsfTrade();//根据二手成交的竣工时间修改seaweed库中的竣工时间
|
||||
}
|
||||
|
||||
|
||||
+6
-4
@@ -483,7 +483,7 @@ class DataStandardBatch extends BaseBatch{
|
||||
if(district){
|
||||
type = 10;
|
||||
}else if(districts.size()==1){
|
||||
district = getFilerMatchDistrict(districts[0], data.estate_type, avg_price);
|
||||
district = getFilerMatchDistrict(districts[0], data);
|
||||
if(district){
|
||||
type = 14
|
||||
}
|
||||
@@ -562,7 +562,7 @@ class DataStandardBatch extends BaseBatch{
|
||||
}
|
||||
|
||||
if(district){
|
||||
return getFilerMatchDistrict(district, data.estate_type, data.avg_price)
|
||||
return getFilerMatchDistrict(district, data)
|
||||
}
|
||||
return district;
|
||||
}
|
||||
@@ -681,7 +681,7 @@ class DataStandardBatch extends BaseBatch{
|
||||
}else{
|
||||
def priceMap = findHousePrice(dbo.city, dbo.region, dbo.name, DateUtils.format(DateUtil.add(new Date(), -180),"yyyyMMdd").toInteger())
|
||||
def price = priceMap.get(dbo.estate_type)
|
||||
if(price){
|
||||
if(price && data.avg_price && data.avg_price.toString().isNumber()){
|
||||
def pre = (data.avg_price-price)*100/price
|
||||
if(pre>=-20 && pre<=20){
|
||||
return dbo;
|
||||
@@ -713,6 +713,8 @@ class DataStandardBatch extends BaseBatch{
|
||||
key = "商住"
|
||||
}else if( data.estate_type.contains("别墅")){
|
||||
key = "别墅"
|
||||
}else{
|
||||
key = "其它"
|
||||
}
|
||||
def houses = null
|
||||
if(key){
|
||||
@@ -919,7 +921,7 @@ class DataStandardBatch extends BaseBatch{
|
||||
DBObject qdata = new BasicDBObject();
|
||||
qdata.put("s_date", SHORT_DATE)
|
||||
// qdata.put("city","北京")
|
||||
qdata.put("source","安居客")
|
||||
// qdata.put("source","安居客")
|
||||
// qdata.put("name",Pattern.compile("金隅澜湾.*"))
|
||||
qdata.put("status", new BasicDBObject(QueryOperators.EXISTS, false));
|
||||
def ret = []
|
||||
|
||||
Reference in New Issue
Block a user