+1
-1
@@ -402,7 +402,7 @@ class BigdataDealBatch extends BaseBatch{
|
||||
startDate = DateUtils.getFirstDayOfMonth(DateUtils.parseFromTightByPattern("20210601", "yyyyMMdd"))//DateUtils.getFirstDayOfMonth(DateUtils.parseFromTightByPattern(curDate.toString(), "yyyyMMdd"))
|
||||
}
|
||||
|
||||
def endDate = DateUtils.getLastDayOfMonth(DateUtils.parseFromTightByPattern("20210601", "yyyyMMdd"))//DateUtils.getFirstDayOfMonth(new Date())
|
||||
def endDate = DateUtils.getLastDayOfMonth(DateUtils.parseFromTightByPattern("20210701", "yyyyMMdd"))//DateUtils.getFirstDayOfMonth(new Date())
|
||||
for(def i=0;i<dists.size();i++){
|
||||
final def dist = dists[i]
|
||||
fixedThreadPool.execute(new Runnable() {
|
||||
|
||||
+33
-31
@@ -84,11 +84,13 @@ class TradeStatLog {
|
||||
def thirdPartyStat(){
|
||||
def citys = CcbCommonUtils.citys;
|
||||
def rets = []
|
||||
// def cityCodeDataMap = CcbCommonUtils.findCityCodeValue()
|
||||
rets << ["城市","小区总量","有第三方的总量","1家占比","2家占比","3家占比","4家占比","5家占比","6家占比","7家占比","8家占比","9家占比","10家占比","11家占比","12家占比","13家占比","14家占比"]
|
||||
for(def city : citys){
|
||||
def districts = CcbCommonUtils.findAllDistrictByCity(city, "district", ["city", "region", "name", "estate_type2"]);
|
||||
def districts = CcbCommonUtils.findAllDistrictByCity(city, "district", ["city", "region", "name", "estate_type2", "name_cat"]);
|
||||
def m = getThirdPartyPricePrecent(city)
|
||||
rets << [city, districts.size(), m.total, m.count1, m.count2, m.count3, m.count4, m.count5, m.count6, m.count7, m.count8, m.count9, m.count10, m.count11, m.count12, m.count13, m.count14]
|
||||
println rets.get(rets.size()-1)
|
||||
}
|
||||
ExcelUtils.write("D:\\数据\\建行\\房产估值\\数据文件\\第三方均价统计.xlsx", rets, "数据")
|
||||
println "表格生成完成"
|
||||
@@ -115,8 +117,8 @@ class TradeStatLog {
|
||||
}
|
||||
|
||||
|
||||
def getThirdPartyPricePrecent(def cityid){
|
||||
def sql = "SELECT * FROM third_party_price WHERE cityid = '"+cityid+"'";
|
||||
def getThirdPartyPricePrecent(def city){
|
||||
def sql = "SELECT * FROM third_party_price WHERE cityname = '"+city+"'";
|
||||
|
||||
def count0 = 0
|
||||
def count1 = 0
|
||||
@@ -137,56 +139,56 @@ class TradeStatLog {
|
||||
sqlInstance.eachRow(sql,{third->
|
||||
total++
|
||||
def ret = []
|
||||
if(third.zhugezhaofang_esf_price){
|
||||
ret << third.zhugezhaofang_esf_price
|
||||
if(third.zhuge_avg_price){
|
||||
ret << third.zhuge_avg_price
|
||||
}
|
||||
if(third.anjuke_esf_price){
|
||||
ret << third.anjuke_esf_price
|
||||
if(third.anjuke_avg_price){
|
||||
ret << third.anjuke_avg_price
|
||||
}
|
||||
if(third.soufang_esf_price){
|
||||
ret << third.soufang_esf_price
|
||||
if(third.fang_avg_price){
|
||||
ret << third.fang_avg_price
|
||||
}
|
||||
|
||||
if(third.lianjia_esf_price){
|
||||
ret << third.lianjia_esf_price
|
||||
if(third.lianjia_avg_price){
|
||||
ret << third.lianjia_avg_price
|
||||
}
|
||||
|
||||
if(third.cityhouse_esf_price){
|
||||
ret << third.cityhouse_esf_price
|
||||
if(third.cityhouse_avg_price){
|
||||
ret << third.cityhouse_avg_price
|
||||
}
|
||||
|
||||
if(third.maitian_esf_price){
|
||||
ret << third.maitian_esf_price
|
||||
if(third.maitian_avg_price){
|
||||
ret << third.maitian_avg_price
|
||||
}
|
||||
|
||||
if(third.beike_esf_price){
|
||||
ret << third.beike_esf_price
|
||||
if(third.ke_avg_price){
|
||||
ret << third.ke_avg_price
|
||||
}
|
||||
|
||||
if(third.get("365house_esf_price")){
|
||||
ret << third.get("365house_esf_price")
|
||||
if(third.taofang_avg_price){
|
||||
ret << third.taofang_avg_price
|
||||
}
|
||||
|
||||
if(third.zhongyuan_esf_price){
|
||||
ret << third.zhongyuan_esf_price
|
||||
if(third.zhongyuan_avg_price){
|
||||
ret << third.zhongyuan_avg_price
|
||||
}
|
||||
|
||||
if(third.tuboshi_esf_price){
|
||||
ret << third.tuboshi_esf_price
|
||||
if(third.tbs_avg_price){
|
||||
ret << third.tbs_avg_price
|
||||
}
|
||||
if(third.qfang_esf_price){
|
||||
ret << third.qfang_esf_price
|
||||
if(third.qfang_avg_price){
|
||||
ret << third.qfang_avg_price
|
||||
}
|
||||
|
||||
if(third.fangtan_esf_price){
|
||||
ret << third.fangtan_esf_price
|
||||
if(third.fangtan_avg_price){
|
||||
ret << third.fangtan_avg_price
|
||||
}
|
||||
|
||||
if(third.fangduoduo_esf_price){
|
||||
ret << third.fangduoduo_esf_price
|
||||
if(third.fangduoduo_avg_price){
|
||||
ret << third.fangduoduo_avg_price
|
||||
}
|
||||
if(third.get("5i5j_esf_price")){
|
||||
ret << third.get("5i5j_esf_price")
|
||||
if(third.wiwj_avg_price){
|
||||
ret << third.wiwj_avg_price
|
||||
}
|
||||
|
||||
if(ret.size()==0){
|
||||
|
||||
+2
-2
@@ -350,7 +350,7 @@ class LocationTest {
|
||||
mapName = r.name
|
||||
address = r.address
|
||||
|
||||
if(r.district.contains(dist.region)){
|
||||
if(r.district && r.district.contains(dist.region)){
|
||||
score = 9
|
||||
}else {
|
||||
score = 5
|
||||
@@ -385,7 +385,7 @@ class LocationTest {
|
||||
region = r.district
|
||||
mapName = r.name
|
||||
address = r.address
|
||||
if(r.district.contains(dist.region)){
|
||||
if(r.district && r.district.contains(dist.region)){
|
||||
score = 7
|
||||
}else {
|
||||
score = 5
|
||||
|
||||
+13
-9
@@ -35,17 +35,21 @@ class InsidePolygon {
|
||||
|
||||
|
||||
public static List<Point> createPoint2(String points){
|
||||
String[] array = points.split(";");
|
||||
|
||||
List<Point> list = new ArrayList<Point>();
|
||||
for(int i =0 ;i<array.length-1;i++){
|
||||
def pointArrs = array[i].split("[,|\\|]")
|
||||
Point point = new Point();
|
||||
double x = Double.parseDouble(pointArrs[0]);
|
||||
double y = Double.parseDouble(pointArrs[1]);
|
||||
point.setLon(x);
|
||||
point.setLat(y);
|
||||
list.add(point);
|
||||
if(points){
|
||||
String[] array = points.split(";");
|
||||
for(int i =0 ;i<array.length-1;i++){
|
||||
def pointArrs = array[i].split("[,|\\|]")
|
||||
Point point = new Point();
|
||||
double x = Double.parseDouble(pointArrs[0]);
|
||||
double y = Double.parseDouble(pointArrs[1]);
|
||||
point.setLon(x);
|
||||
point.setLat(y);
|
||||
list.add(point);
|
||||
}
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user