福州脚本修改
This commit is contained in:
+3
-3
@@ -392,12 +392,12 @@ class DealPriceDataProcess {
|
|||||||
|
|
||||||
def deleteThirdPartyData(){
|
def deleteThirdPartyData(){
|
||||||
def citys = CcbCommonUtils.citys_all
|
def citys = CcbCommonUtils.citys_all
|
||||||
def month = 202305
|
def month = 202306
|
||||||
def rows = []
|
def rows = []
|
||||||
def cityCodeDatas = CcbCommonUtils.findCityCodeValue()
|
def cityCodeDatas = CcbCommonUtils.findCityCodeValue()
|
||||||
def set = new HashSet()
|
def set = new HashSet()
|
||||||
for(def city : citys) {
|
for(def city : citys) {
|
||||||
def rets = findPeGteThirdParty2(city, 202306)
|
def rets = findPeGteThirdParty2(city, 202307)
|
||||||
def total = 0
|
def total = 0
|
||||||
println city +" "+rets.size()
|
println city +" "+rets.size()
|
||||||
if(rets){
|
if(rets){
|
||||||
@@ -437,7 +437,7 @@ class DealPriceDataProcess {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def findPeGteThirdParty2(cityName, yearmonth){
|
def findPeGteThirdParty2(cityName, yearmonth){
|
||||||
def sql = "SELECT gujia_comm_id,gujiabds_to_mkprc_mny from t_app_p9pha_plda.avm_evaluation_item_gj_h where gujiabds_clc_yrmo_val=${yearmonth} and gujia_data_tp='第三方' and urbn_nm='${cityName}' and gujia_mns_rto>25"
|
def sql = "SELECT gujia_comm_id,gujiabds_to_mkprc_mny from t_app_p9pha_plda.avm_evaluation_item_gj_h where gujiabds_clc_yrmo_val=${yearmonth} and gujia_data_tp='第三方' and urbn_nm='${cityName}' and gujia_mns_rto>20"
|
||||||
def rets = []
|
def rets = []
|
||||||
pgsqlInstance.eachRow(sql,{r->
|
pgsqlInstance.eachRow(sql,{r->
|
||||||
def map = [:]
|
def map = [:]
|
||||||
|
|||||||
+2
-2
@@ -52,7 +52,7 @@ class GuiDingPriceBatch extends BaseBatch{
|
|||||||
def distCodeMap = CcbCommonUtils.findAllDistrictCodeValue(city)
|
def distCodeMap = CcbCommonUtils.findAllDistrictCodeValue(city)
|
||||||
|
|
||||||
//添加自己库中的人工指导价
|
//添加自己库中的人工指导价
|
||||||
def prices = CcbCommonUtils.findPersonPrice(city, "2023-06-26", "2023-07-22")
|
def prices = CcbCommonUtils.findPersonPrice(city, "2023-06-26", "2023-07-26")
|
||||||
// def prices = CcbCommonUtils.findPersonPrice(city, "2022-01-01", "2022-11-22")
|
// def prices = CcbCommonUtils.findPersonPrice(city, "2022-01-01", "2022-11-22")
|
||||||
if(prices){
|
if(prices){
|
||||||
def distMap = getDistrictMap(city)
|
def distMap = getDistrictMap(city)
|
||||||
@@ -85,7 +85,7 @@ class GuiDingPriceBatch extends BaseBatch{
|
|||||||
saveToPgSql(rows)
|
saveToPgSql(rows)
|
||||||
//
|
//
|
||||||
//更新静态数据表
|
//更新静态数据表
|
||||||
updateVersion(DateUtils.formatDateByPattern(new Date(), "yyyy-MM")+"-28")
|
// updateVersion(DateUtils.formatDateByPattern(new Date(), "yyyy-MM")+"-28")
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+5
-2
@@ -292,12 +292,15 @@ class CommonDatautils {
|
|||||||
return rets;
|
return rets;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static def findRemoveDistricts(def city, def cat, def fields, def m_date){
|
public static def findRemoveDistricts(def city, def cat, def fields, def startDate, def endDate){
|
||||||
DBObject q = new BasicDBObject();
|
DBObject q = new BasicDBObject();
|
||||||
q.put("status", 1);
|
q.put("status", 1);
|
||||||
q.put("cat", cat);
|
q.put("cat", cat);
|
||||||
q.put("city", city);
|
q.put("city", city);
|
||||||
q.put("m_date", new BasicDBObject('$gte', DateUtils.parseFromTightYYYYMMDD(m_date)))
|
if(startDate){
|
||||||
|
q.put("m_date", new BasicDBObject('$gte', startDate).append('$lt',endDate))
|
||||||
|
}
|
||||||
|
|
||||||
DBObject keys = new BasicDBObject();
|
DBObject keys = new BasicDBObject();
|
||||||
if(fields){
|
if(fields){
|
||||||
for(def field : fields){
|
for(def field : fields){
|
||||||
|
|||||||
+5
-2
@@ -97,7 +97,10 @@ class DistrictInfoExportBatch extends BaseBatch{
|
|||||||
saveOrUpdateFzDist(districts)
|
saveOrUpdateFzDist(districts)
|
||||||
|
|
||||||
if(day == 15){
|
if(day == 15){
|
||||||
def removeDists = CommonDatautils.findRemoveDistricts(city, "district", null, "2022-01-01");
|
def removeDists = CommonDatautils.findRemoveDistricts(city, "district", null, DateUtils.parseFromTightYYYYMMDD("2022-01-01"), endMDate);
|
||||||
|
remarkRemoveDist(removeDists)
|
||||||
|
}else{
|
||||||
|
def removeDists = CommonDatautils.findRemoveDistricts(city, "district", null, startMDate, endMDate);
|
||||||
remarkRemoveDist(removeDists)
|
remarkRemoveDist(removeDists)
|
||||||
}
|
}
|
||||||
def fzDistricts = null
|
def fzDistricts = null
|
||||||
@@ -197,7 +200,7 @@ class DistrictInfoExportBatch extends BaseBatch{
|
|||||||
for(def rd : removeDists){
|
for(def rd : removeDists){
|
||||||
def udate = new BasicDBObject()
|
def udate = new BasicDBObject()
|
||||||
udate.put("status",1)
|
udate.put("status",1)
|
||||||
udate.put("m_date", new Date())
|
udate.put("m_date", rd.m_date)
|
||||||
FZ_DIST_COLL.update(new BasicDBObject('_id',rd.get('_id')), new BasicDBObject('$set', udate));
|
FZ_DIST_COLL.update(new BasicDBObject('_id',rd.get('_id')), new BasicDBObject('$set', udate));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -141,7 +141,7 @@ class DistrictPriceExportBatch extends BaseBatch{
|
|||||||
m << rMap.city
|
m << rMap.city
|
||||||
m << rMap.region
|
m << rMap.region
|
||||||
m << rMap.name
|
m << rMap.name
|
||||||
if(curPrice){
|
if(curPrice && rMap.status==0){
|
||||||
m << curPrice
|
m << curPrice
|
||||||
}else{
|
}else{
|
||||||
m << 0
|
m << 0
|
||||||
|
|||||||
@@ -520,7 +520,7 @@ class FiledStrand {
|
|||||||
buildStructure = "钢结构";
|
buildStructure = "钢结构";
|
||||||
}else if(val.indexOf("钢、钢筋混凝土")>-1){
|
}else if(val.indexOf("钢、钢筋混凝土")>-1){
|
||||||
buildStructure = "钢、钢筋混凝土结构";
|
buildStructure = "钢、钢筋混凝土结构";
|
||||||
}else if(val.indexOf("钢筋混凝土")>-1){
|
}else if(val.indexOf("钢筋混凝土")>-1 || val.indexOf("钢混")>-1){
|
||||||
buildStructure = "钢筋混凝土结构";
|
buildStructure = "钢筋混凝土结构";
|
||||||
}else if(val.indexOf("混合")>-1){
|
}else if(val.indexOf("混合")>-1){
|
||||||
buildStructure = "混合结构";
|
buildStructure = "混合结构";
|
||||||
|
|||||||
+1
-1
@@ -49,7 +49,7 @@ class DistrictFieldAddBatch extends BaseBatch{
|
|||||||
"virescence_percent":"greening_rate","cubage_percent":"plot_ratio","build_area":"build_area","all_area":"land_area","household_count":"households",
|
"virescence_percent":"greening_rate","cubage_percent":"plot_ratio","build_area":"build_area","all_area":"land_area","household_count":"households",
|
||||||
"car_site_count":"parking_cnt","car_site":"parking_cnt","property_life":"land_usage_period","address":"address","build_structure":"building_structure",
|
"car_site_count":"parking_cnt","car_site":"parking_cnt","property_life":"land_usage_period","address":"address","build_structure":"building_structure",
|
||||||
"build_type":"build_type", "land_property":"ownership_type","live_date":"live_date",
|
"build_type":"build_type", "land_property":"ownership_type","live_date":"live_date",
|
||||||
"loop_line_info":"loop_line"]//key:seaweed表字段 value:es表字段
|
"loop_line_info":"loop_line","loudong_count":"loudong_cnt"]//key:seaweed表字段 value:es表字段
|
||||||
|
|
||||||
def fieldsNameMap = ["estate_charge":"物业费","block":"板块","build_date":"建筑年代","estate_company":"物业公司","developer":"开发商",
|
def fieldsNameMap = ["estate_charge":"物业费","block":"板块","build_date":"建筑年代","estate_company":"物业公司","developer":"开发商",
|
||||||
"virescence_percent":"绿化率","cubage_percent":"容积率","build_area":"建筑面积","all_area":"占地面积","household_count":"户型",
|
"virescence_percent":"绿化率","cubage_percent":"容积率","build_area":"建筑面积","all_area":"占地面积","household_count":"户型",
|
||||||
|
|||||||
Reference in New Issue
Block a user