Merge branch 'master' of http://gitlab.fangjia.com/dev0/main
This commit is contained in:
+257
-152
@@ -618,8 +618,9 @@ public class DataController {
|
||||
System.out.println ( "IOException." + e );
|
||||
} finally {
|
||||
try {
|
||||
if (os != null)
|
||||
if(os != null) {
|
||||
os.close();
|
||||
}
|
||||
if(fos != null){
|
||||
fos.close();
|
||||
}
|
||||
@@ -840,21 +841,40 @@ public class DataController {
|
||||
|
||||
HSSFRow onerow = s.createRow(0);
|
||||
int oneRowIndex = 0;
|
||||
Map displayMap = getFliedDisplay();
|
||||
for(String key : outfields){
|
||||
if(cat.equals("商铺")){
|
||||
if(key.equals("bedKind")){
|
||||
continue;
|
||||
}
|
||||
}
|
||||
String display = (String) displayMap.get(key);
|
||||
if(StringUtils.isNotBlank(display)){
|
||||
onerow.createCell((short)oneRowIndex).setCellValue(display);
|
||||
}else{
|
||||
onerow.createCell((short)oneRowIndex).setCellValue(key);
|
||||
}
|
||||
oneRowIndex ++;
|
||||
}
|
||||
Map displayMap = getFliedDisplay(cat);
|
||||
|
||||
/*
|
||||
以displayMap为准 移除outfields中多余字段
|
||||
*/
|
||||
Iterator<String> it = outfields.iterator();
|
||||
while(it.hasNext()) {
|
||||
|
||||
String key = it.next();
|
||||
|
||||
String display = (String) displayMap.get(key);
|
||||
|
||||
if (StringUtils.isNotBlank(display)) {
|
||||
onerow.createCell((short)oneRowIndex).setCellValue(display);
|
||||
oneRowIndex ++;
|
||||
}else{
|
||||
it.remove();
|
||||
}
|
||||
}
|
||||
//因 写字楼导出仅展示写字楼后台的字段需求 改动
|
||||
// for(String key : outfields){
|
||||
// if(cat.equals("商铺")){
|
||||
// if(key.equals("bedKind")){
|
||||
// continue;
|
||||
// }
|
||||
// }
|
||||
// String display = (String) displayMap.get(key);
|
||||
// if(StringUtils.isNotBlank(display)){
|
||||
// onerow.createCell((short)oneRowIndex).setCellValue(display);
|
||||
// }else{
|
||||
// onerow.createCell((short)oneRowIndex).setCellValue(key);
|
||||
// }
|
||||
// oneRowIndex ++;
|
||||
// }
|
||||
|
||||
for(Map<String, Object> map : list){
|
||||
HSSFRow row = s.createRow(s.getPhysicalNumberOfRows());
|
||||
@@ -891,151 +911,236 @@ public class DataController {
|
||||
return wb;
|
||||
}
|
||||
|
||||
public Map<String, String> getFliedDisplay(){
|
||||
public Map<String, String> getFliedDisplay(String cat){
|
||||
Map<String, String> map = new HashMap<String, String>(){ {
|
||||
put( "province" , "省份" );
|
||||
put( "city" , "城市" );
|
||||
put( "cityLevel" , "城市等级" );
|
||||
put( "rankingLevel" , "行政区划" );
|
||||
put( "existingDistrictCount" , "小区数量" );
|
||||
put( "districtsHasLoudong" , "有楼栋的小区数量" );
|
||||
put( "districtsHasFanghao" , "有房号的小区数量" );
|
||||
put( "existingOfficeCount" , "写字楼数量" );
|
||||
put( "existingShopCount" , "商铺数量" );
|
||||
put( "priceCoverage" , "价格覆盖率" );
|
||||
put( "priceCreditGte80Coverage", "0.8≤价格可信度");
|
||||
put( "priceCreditGte66Coverage", "0.66≤价格可信度<0.8");
|
||||
put( "priceCreditGte60Coverage", "0.6≤价格可信度<0.66");
|
||||
put( "priceCreditGte00Coverage", "价格可信度<0.6");
|
||||
put( "name" , "名称" );
|
||||
put( "region" , "区域" );
|
||||
put( "block" , "板块" );
|
||||
put( "address" , "地址" );
|
||||
put( "estateType" , "物业类型" );
|
||||
put( "householdCount" , "户数" );
|
||||
put( "openDate" , "开盘时间" );
|
||||
put( "latLng" , "mapabc经纬度" );
|
||||
put( "latLng2" , "百度经纬度" );
|
||||
put( "allArea" , "占地面积" );
|
||||
put( "buildArea" , "建筑面积" );
|
||||
put( "buildType" , "建筑类型" );
|
||||
put( "developer" , "开发商" );
|
||||
put( "estateCompany" , "物业公司" );
|
||||
put( "cubagePercent" , "容积率" );
|
||||
put( "virescencePercent" , "绿化率" );
|
||||
put( "carSite" , "停车位" );
|
||||
put( "carSiteCount" , "停车位描述" );
|
||||
put( "estateCharge" , "物业费" );
|
||||
put( "floorplanPics" , "楼层平面图" );
|
||||
put( "outPics" , "外景图" );
|
||||
put( "rentPrice" , "租金" );
|
||||
put( "bedKind" , "写字楼等级" );
|
||||
put( "houseFloor" , "楼层" );
|
||||
put( "houseHeight" , "楼高" );
|
||||
put( "houseArea" , "面积" );
|
||||
put( "room" , "室" );
|
||||
put( "hall" , "厅" );
|
||||
put( "direction" , "朝向" );
|
||||
put( "toilet" , "卫" );
|
||||
put( "noise" , "噪音" );
|
||||
put( "fitmentRank" , "装修" );
|
||||
put( "fitmentAge" , "装修年限" );
|
||||
put( "leaseTerm","租赁年限");
|
||||
put( "paymentPattern","付款方式");
|
||||
put( "rentPrice","出租价格");
|
||||
put( "sellPrice","出售价格");
|
||||
put( "mobile","电话");
|
||||
put( "floor","建筑楼层");
|
||||
put( "floorInfo","楼层状况");
|
||||
put( "bayArea","开间面积");
|
||||
put( "finishBuildingDate","竣工时间");
|
||||
put( "liveDate","开业时间");
|
||||
put( "divisible","是否可分割");
|
||||
put( "unifiedManage","是否统一管理");
|
||||
put( "metroInfo","地铁沿线");
|
||||
put( "metroNames","地铁站名");
|
||||
put( "facilities","配套设施");
|
||||
put( "propertyInfo","物业概况");
|
||||
put( "traffic","交通情况");
|
||||
put( "surrounding","周边情况");
|
||||
put( "businessStatus","经营业态");
|
||||
put( "rentType","租售类型");
|
||||
put( "price","价格");
|
||||
put( "businessQuarter","商圈");
|
||||
put( "startBuildingDate","开工时间");
|
||||
put( "liveDate","交房时间");
|
||||
put( "loopLineInfo","环线");
|
||||
put( "propertyLife","产权年限");
|
||||
put( "houseProperty","产权性质");
|
||||
put( "licence","预售许可证");
|
||||
put( "buildStructure","建筑结构");
|
||||
put( "house_count","房号总量");
|
||||
put( "exists_house_dis_count","有房号的小区数量");
|
||||
put( "house_num_rate","楼号覆盖率");
|
||||
put( "unit_num_rate","单元覆盖率");
|
||||
put( "room_num_rate","室号覆盖率");
|
||||
put( "area_rate","面积覆盖率");
|
||||
put( "room_info_rate","户型覆盖率");
|
||||
put( "hourse_structure_rate","户型结构覆盖率");
|
||||
put( "actualFloor","实际层覆盖率");
|
||||
put( "nominalFloor","名义层覆盖率");
|
||||
put( "build_type","建筑类型覆盖率");
|
||||
put( "loudong_count","楼栋总量");
|
||||
put( "exists_loudong_dis_count","有楼栋的小区数量");
|
||||
put( "loudong_num_rate","楼栋号覆盖率");
|
||||
put( "loudong_height_rate","总楼层覆盖率");
|
||||
put( "elevatornumber_rate","电梯数覆盖率");
|
||||
put( "households_rate","户数覆盖率");
|
||||
put( "address_rate","地址覆盖率");
|
||||
put( "structure_rate","建筑结构覆盖率");
|
||||
put( "build_year_rate","建筑年代覆盖率");
|
||||
put( "usage_rate","楼栋用途覆盖率");
|
||||
put( "loudong_type_rate","楼栋类型覆盖率");
|
||||
put( "floor_type_reate","建筑类型(按楼层)覆盖率");
|
||||
put( "archiNature_rate","建筑性质覆盖率");
|
||||
put( "totalAreas_rate","建筑总面积覆盖率");
|
||||
put("streetCommunity","街道社区");
|
||||
put("committee","居委会");
|
||||
put("schools","对口学校");
|
||||
put("houseStructure","房屋结构");
|
||||
put("estateType2","物业类型");
|
||||
put("buildDate","建筑年代");
|
||||
put("alias","别名");
|
||||
put("addrAlias","地址别名");
|
||||
put("mainTypeArea","主力面积");
|
||||
put("loudongCount","楼栋数");
|
||||
put("township","乡镇街道");
|
||||
put("schools","对口小学");
|
||||
put("kindergartens","对口幼儿园");
|
||||
put("elevator","电梯");
|
||||
put("landProperty","权属类别");
|
||||
put("usageCard","土地使用权证号");
|
||||
put("landUsageStart","土地使用年限");
|
||||
put("occupancyRate","入住率");
|
||||
put("mainType","主力户型");
|
||||
put("mappingAlias","映射别名");
|
||||
put("districtAliasTotalCount", "别名总量");
|
||||
put( "latLng" , "mapabc经纬度" );
|
||||
put( "latLng2" , "百度经纬度" );
|
||||
|
||||
put("undergroundCarSite", "地下车位数");
|
||||
put("landCarSite", "地上车位数");
|
||||
put("parkingFee", "车位月租金");
|
||||
put("sight", "开间面积");
|
||||
put("lobbyHeight", "大堂层高");
|
||||
put("standardHeight", "标准层高");
|
||||
put("clearHeight", "净高");
|
||||
put("standardArea", "标准层面积");
|
||||
put("foreign", "是否涉外");
|
||||
put("register", "是否可注册");
|
||||
put("divisible", "是否可分割");
|
||||
put("elevatorsCount","电梯数量");
|
||||
put("personElevatorsCount","客梯数");
|
||||
put("goodsElevatorCount","货梯数");
|
||||
put("realUsePercent","得房率");
|
||||
put("landFloor","地上层数");
|
||||
put("undergroundFloor","地下层数");
|
||||
// put( "floorplanPics" , "楼层平面图" );
|
||||
// put( "outPics" , "外景图" );
|
||||
// put( "rentPrice" , "租金" );
|
||||
// put( "houseFloor" , "楼层" );
|
||||
// put( "houseHeight" , "楼高" );
|
||||
// put( "houseArea" , "面积" );
|
||||
// put( "room" , "室" );
|
||||
// put( "hall" , "厅" );
|
||||
// put( "direction" , "朝向" );
|
||||
// put( "toilet" , "卫" );
|
||||
// put( "noise" , "噪音" );
|
||||
// put( "fitmentRank" , "装修" );
|
||||
// put( "fitmentAge" , "装修年限" );
|
||||
// put( "leaseTerm","租赁年限");
|
||||
// put( "paymentPattern","付款方式");
|
||||
// put( "sellPrice","出售价格");
|
||||
// put( "mobile","电话");
|
||||
// put( "liveDate","开业时间");
|
||||
// put( "divisible","是否可分割");
|
||||
// put( "unifiedManage","是否统一管理");
|
||||
// put( "metroInfo","地铁沿线");
|
||||
// put( "metroNames","地铁站名");
|
||||
// put( "facilities","配套设施");
|
||||
// put( "propertyInfo","物业概况");
|
||||
// put( "traffic","交通情况");
|
||||
// put( "surrounding","周边情况");
|
||||
// put( "rentType","租售类型");
|
||||
// put( "price","价格");
|
||||
// put("schools","对口学校");
|
||||
// put("estateType" , "物业类型" );
|
||||
// put("estateType2","物业类型");
|
||||
// put("buildDate","建筑年代");
|
||||
} };//
|
||||
|
||||
if(cat.equals("小区")){
|
||||
map = setDistrictFields(map);
|
||||
}else if(cat.equals("写字楼")){
|
||||
map = setOfficeFields(map);
|
||||
}else if(cat.equals("房号")){
|
||||
map = setRoomNumberFields(map);
|
||||
}else if(cat.equals("商铺")){
|
||||
map = setShopsFields(map);
|
||||
}else if(cat.equals("楼栋")){
|
||||
map = setBuildingFields(map);
|
||||
}
|
||||
|
||||
return map;
|
||||
}
|
||||
private Map setDistrictFields (Map map){
|
||||
map.put( "existingDistrictCount" , "小区数量" );
|
||||
map.put( "districtsHasLoudong" , "有楼栋的小区数量" );
|
||||
map.put( "districtsHasFanghao" , "有房号的小区数量" );
|
||||
map.put( "priceCoverage" , "价格覆盖率" );
|
||||
map.put("districtAliasTotalCount", "别名总量");
|
||||
map.put( "priceCreditGte80Coverage", "0.8≤价格可信度");
|
||||
map.put( "priceCreditGte66Coverage", "0.66≤价格可信度<0.8");
|
||||
map.put( "priceCreditGte60Coverage", "0.6≤价格可信度<0.66");
|
||||
map.put( "priceCreditGte00Coverage", "价格可信度<0.6");
|
||||
map.put( "businessQuarter","商圈");
|
||||
map.put( "startBuildingDate","开工时间");
|
||||
map.put( "liveDate","交房时间");
|
||||
map.put( "loopLineInfo","环线");
|
||||
map.put( "propertyLife","产权年限");
|
||||
map.put( "houseProperty","产权性质");
|
||||
map.put( "licence","预售许可证");
|
||||
map.put( "buildStructure","建筑结构");
|
||||
map.put( "name" , "名称" );
|
||||
map.put( "region" , "区域" );
|
||||
map.put( "block" , "板块" );
|
||||
map.put( "address" , "地址" );
|
||||
map.put( "estateType2" , "物业类型" );
|
||||
map.put( "householdCount" , "户数" );
|
||||
map.put( "openDate" , "开盘时间" );
|
||||
map.put("buildDate","建筑年代");
|
||||
map.put( "allArea" , "占地面积" );
|
||||
map.put( "buildArea" , "建筑面积" );
|
||||
map.put( "buildType" , "建筑类型" );
|
||||
map.put( "developer" , "开发商" );
|
||||
map.put( "estateCompany" , "物业公司" );
|
||||
map.put( "cubagePercent" , "容积率" );
|
||||
map.put( "virescencePercent" , "绿化率" );
|
||||
map.put( "carSite" , "停车位" );
|
||||
map.put( "estateCharge" , "物业费" );
|
||||
map.put( "finishBuildingDate","竣工时间");
|
||||
map.put("streetCommunity","街道社区");
|
||||
map.put("committee","居委会");
|
||||
map.put("schools","对口小学");
|
||||
map.put("houseStructure","房屋结构");
|
||||
map.put("alias","别名");
|
||||
map.put("addrAlias","地址别名");
|
||||
map.put("mainTypeArea","主力面积");
|
||||
map.put("loudongCount","楼栋数");
|
||||
map.put( "carSiteCount" , "停车位描述" );
|
||||
map.put("mappingAlias","映射别名");
|
||||
map.put("elevator","电梯");
|
||||
map.put("township","乡镇街道");
|
||||
map.put("kindergartens","对口幼儿园");
|
||||
map.put("mainType","主力户型");
|
||||
map.put("landProperty","权属类别");
|
||||
map.put("usageCard","土地使用权证号");
|
||||
map.put("occupancyRate","入住率");
|
||||
map.put("landUsageStart","土地使用年限");
|
||||
map.put( "rentPrice","出租价格");
|
||||
map.put("realUsePercent","得房率");
|
||||
return map;
|
||||
}
|
||||
private Map setOfficeFields (Map map){
|
||||
map.put( "existingOfficeCount" , "写字楼数量" );
|
||||
map.put( "name" , "名称" );
|
||||
map.put( "region" , "区域" );
|
||||
map.put( "block" , "板块" );
|
||||
map.put( "address" , "地址" );
|
||||
// map.put( "estateType2" , "物业类型" );
|
||||
// map.put( "openDate" , "开盘时间" );
|
||||
// map.put( "liveDate","交房时间");
|
||||
map.put( "allArea" , "占地面积" );
|
||||
map.put( "buildArea" , "建筑面积" );
|
||||
// map.put( "buildType" , "建筑类型" );
|
||||
map.put( "developer" , "开发商" );
|
||||
map.put( "estateCompany" , "物业公司" );
|
||||
map.put( "cubagePercent" , "容积率" );
|
||||
map.put( "virescencePercent" , "绿化率" );
|
||||
map.put( "carSite" , "停车位" );
|
||||
map.put( "estateCharge" , "物业费" );
|
||||
map.put( "finishBuildingDate","竣工时间");
|
||||
// map.put( "startBuildingDate","开工时间");
|
||||
// map.put( "carSiteCount" , "停车位描述" );
|
||||
map.put( "bedKind" , "写字楼等级" );
|
||||
map.put("alias","别名");
|
||||
map.put("addrAlias","地址别名");
|
||||
// map.put( "businessQuarter","商圈");
|
||||
map.put( "loopLineInfo","环线");
|
||||
// map.put( "floorInfo","楼层状况");
|
||||
map.put("undergroundCarSite", "地下车位数");
|
||||
map.put("landCarSite", "地上车位数");
|
||||
map.put("parkingFee", "车位月租金");
|
||||
map.put( "bayArea","开间面积");
|
||||
map.put( "propertyLife","产权年限");
|
||||
map.put("elevatorsCount","电梯数量");
|
||||
map.put("personElevatorsCount","客梯数");
|
||||
map.put("goodsElevatorCount","货梯数");
|
||||
map.put("standardHeight", "标准层高");
|
||||
map.put("clearHeight", "净高");
|
||||
map.put("standardArea", "标准层面积");
|
||||
map.put("foreign", "是否涉外");
|
||||
map.put("register", "是否可注册");
|
||||
map.put("lobbyHeight", "大堂层高");
|
||||
// map.put("township","乡镇街道");
|
||||
map.put("divisible", "是否可分割");
|
||||
map.put("landFloor","地上层数");
|
||||
map.put("undergroundFloor","地下层数");
|
||||
|
||||
return map;
|
||||
}
|
||||
|
||||
private Map setRoomNumberFields (Map map){
|
||||
map.put( "house_count","房号总量");
|
||||
map.put( "exists_house_dis_count","有房号的小区数量");
|
||||
map.put( "house_num_rate","楼号覆盖率");
|
||||
map.put( "unit_num_rate","单元覆盖率");
|
||||
map.put( "room_num_rate","室号覆盖率");
|
||||
map.put( "area_rate","面积覆盖率");
|
||||
map.put( "room_info_rate","户型覆盖率");
|
||||
map.put( "hourse_structure_rate","户型结构覆盖率");
|
||||
map.put( "actualFloor","实际层覆盖率");
|
||||
map.put( "nominalFloor","名义层覆盖率");
|
||||
map.put( "build_type","建筑类型覆盖率");
|
||||
return map;
|
||||
}
|
||||
|
||||
private Map setShopsFields (Map map){
|
||||
map.put( "existingShopCount" , "商铺数量" );
|
||||
map.put( "name" , "名称" );
|
||||
map.put( "region" , "区域" );
|
||||
map.put( "block" , "板块" );
|
||||
map.put( "address" , "地址" );
|
||||
map.put("alias","别名");
|
||||
map.put("addrAlias","地址别名");
|
||||
map.put( "estateType2" , "物业类型" );
|
||||
map.put( "openDate" , "开盘时间" );
|
||||
map.put( "liveDate","交房时间");
|
||||
map.put( "allArea" , "占地面积" );
|
||||
map.put( "buildArea" , "建筑面积" );
|
||||
map.put( "buildType" , "建筑类型" );
|
||||
map.put( "developer" , "开发商" );
|
||||
map.put( "estateCompany" , "物业公司" );
|
||||
map.put( "carSite" , "停车位" );
|
||||
map.put( "estateCharge" , "物业费" );
|
||||
map.put( "floor","建筑楼层");
|
||||
map.put( "finishBuildingDate","竣工时间");
|
||||
map.put( "businessQuarter","商圈");
|
||||
map.put( "startBuildingDate","开工时间");
|
||||
map.put("sight", "开间面积");
|
||||
map.put( "propertyLife","产权年限");
|
||||
map.put( "businessStatus","经营业态");
|
||||
map.put("parkingFee", "车位月租金");
|
||||
map.put("township","乡镇街道");
|
||||
map.put( "loopLineInfo","环线");
|
||||
map.put("landFloor","地上层数");
|
||||
map.put("undergroundFloor","地下层数");
|
||||
return map;
|
||||
}
|
||||
private Map setBuildingFields (Map map){
|
||||
map.put( "loudong_count","楼栋总量");
|
||||
map.put( "exists_loudong_dis_count","有楼栋的小区数量");
|
||||
map.put( "unit_num_rate","单元覆盖率");
|
||||
map.put( "loudong_num_rate","楼栋号覆盖率");
|
||||
map.put( "loudong_height_rate","总楼层覆盖率");
|
||||
map.put( "elevatornumber_rate","电梯数覆盖率");
|
||||
map.put( "households_rate","户数覆盖率");
|
||||
map.put( "address_rate","地址覆盖率");
|
||||
map.put( "structure_rate","建筑结构覆盖率");
|
||||
map.put( "build_year_rate","建筑年代覆盖率");
|
||||
map.put( "usage_rate","楼栋用途覆盖率");
|
||||
map.put( "loudong_type_rate","楼栋类型覆盖率");
|
||||
map.put( "floor_type_reate","建筑类型(按楼层)覆盖率");
|
||||
map.put( "archiNature_rate","建筑性质覆盖率");
|
||||
map.put( "totalAreas_rate","建筑总面积覆盖率");
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
public Object houseAction(DataModel model) {
|
||||
if (StringUtils.isBlank(model.getCityDisplay())) {
|
||||
|
||||
+32
@@ -1200,6 +1200,37 @@ public class DistrictController {
|
||||
model.setJsonModel(data);
|
||||
return model;
|
||||
}
|
||||
/**
|
||||
* 校验小区名是否为其他小区的别名
|
||||
*/
|
||||
public Object checkDistrictNameAction(@Param(name = "city") String city, @Param(name = "region") String region,
|
||||
@Param(name = "name") String name, @Param(name = "cat") String cat, @Param(name = "id") String id) {
|
||||
JsonModel model = new JsonModel();
|
||||
boolean exist = false;
|
||||
|
||||
List list = new ArrayList<String>();
|
||||
list.add(name);
|
||||
List<QueryParam> params = new ArrayList<QueryParam>();
|
||||
params.add(new QueryParam("category", cat));
|
||||
params.add(new QueryParam("city", city));
|
||||
params.add(new QueryParam("region", region));
|
||||
params.add(new QueryParam("alias", name));
|
||||
params.add(new QueryParam("visible", 0));
|
||||
|
||||
List<District> ds = districtService.findAllByParams(params);
|
||||
if (CollectionUtils.isNotEmpty(ds)) {
|
||||
for (District d : ds) {
|
||||
if (!d.getId().equals(id)) {
|
||||
exist = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
Map<String, Object> data = new HashMap<String, Object>();
|
||||
data.put("exist", exist);
|
||||
model.setJsonModel(data);
|
||||
return model;
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存新增小区
|
||||
@@ -2320,6 +2351,7 @@ public class DistrictController {
|
||||
params = new ArrayList<QueryParam>(2);
|
||||
params.add(new QueryParam("category", "district,new_district"));
|
||||
params.add(new QueryParam("name", a));
|
||||
params.add(new QueryParam("visible", 0));
|
||||
|
||||
ds = districtService.findAllByParams(params);
|
||||
|
||||
|
||||
@@ -196,49 +196,55 @@
|
||||
<tr>
|
||||
<td>等级</td>
|
||||
<td class="v"><#if officeDetail.bedKind??>${officeDetail.bedKind * 100}%<#else>未知</#if></td>
|
||||
<td>建筑类型</td>
|
||||
<#--<td>建筑类型</td>
|
||||
<td class="v"><#if officeDetail.buildType??>${officeDetail.buildType * 100}%<#else>未知</#if></td>
|
||||
-->
|
||||
<td>经纬度-mapabc</td>
|
||||
<td class="v"><#if officeDetail.latLng??>${officeDetail.latLng * 100}%<#else>未知</#if></td>
|
||||
<td>经纬度-百度</td>
|
||||
<td class="v"><#if officeDetail.latLng2??>${officeDetail.latLng2 * 100}%<#else>未知</#if></td>
|
||||
|
||||
|
||||
<td>开发商</td>
|
||||
<td class="v"><#if officeDetail.developer??>${officeDetail.developer * 100}%<#else>未知</#if></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>建筑面积</td>
|
||||
<td class="v"><#if officeDetail.buildArea??>${officeDetail.buildArea * 100}%<#else>未知</#if></td>
|
||||
<td>占地面积</td>
|
||||
<td class="v"><#if officeDetail.allArea??>${officeDetail.allArea * 100}%<#else>未知</#if></td>
|
||||
<td>入住时间</td>
|
||||
<#--<td>入住时间</td>
|
||||
<td class="v"><#if officeDetail.liveDate??>${officeDetail.liveDate * 100}%<#else>未知</#if></td>
|
||||
<td>外景图</td>
|
||||
<td class="v"><#if officeDetail.outPics??>${officeDetail.outPics * 100}%<#else>未知</#if></td>
|
||||
-->
|
||||
<td>容积率</td>
|
||||
<td class="v"><#if officeDetail.cubagePercent??>${officeDetail.cubagePercent * 100}%<#else>未知</#if></td>
|
||||
<td>绿化率</td>
|
||||
<td class="v"><#if officeDetail.virescencePercent??>${officeDetail.virescencePercent * 100}%<#else>未知</#if></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>开发商</td>
|
||||
<td class="v"><#if officeDetail.developer??>${officeDetail.developer * 100}%<#else>未知</#if></td>
|
||||
<td>物业公司</td>
|
||||
<td class="v"><#if officeDetail.estateCompany??>${officeDetail.estateCompany * 100}%<#else>未知</#if></td>
|
||||
<td>容积率</td>
|
||||
<td class="v"><#if officeDetail.cubagePercent??>${officeDetail.cubagePercent * 100}%<#else>未知</#if></td>
|
||||
<td>绿化率</td>
|
||||
<td class="v"><#if officeDetail.virescencePercent??>${officeDetail.virescencePercent * 100}%<#else>未知</#if></td>
|
||||
<td>物业费</td>
|
||||
<td class="v"><#if officeDetail.estateCharge??>${officeDetail.estateCharge * 100}%<#else>未知</#if></td>
|
||||
<td> </td>
|
||||
<td class="v"> </td>
|
||||
<td> </td>
|
||||
<td class="v"> </td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>物业费</td>
|
||||
<td class="v"><#if officeDetail.estateCharge??>${officeDetail.estateCharge * 100}%<#else>未知</#if></td>
|
||||
<td>物业类型</td>
|
||||
|
||||
<#--<td>物业类型</td>
|
||||
<td class="v"><#if officeDetail.estateType2??>${officeDetail.estateType2 * 100}%<#else>未知</#if></td>
|
||||
<td>周边配套</td>
|
||||
<td class="v"><#if officeDetail.facilities??>${officeDetail.facilities * 100}%<#else>未知</#if></td>
|
||||
<td>项目特色</td>
|
||||
<td class="v"><#if officeDetail.characteristic??>${officeDetail.characteristic * 100}%<#else>未知</#if></td>
|
||||
-->
|
||||
</tr>
|
||||
<tr>
|
||||
<td>均价</td>
|
||||
<#--<td>均价</td>
|
||||
<td class="v"><#if officeDetail.price??>${officeDetail.price * 100}%<#else>未知</#if></td>
|
||||
<td>租金</td>
|
||||
<td class="v"><#if officeDetail.rentPrice??>${officeDetail.rentPrice * 100}%<#else>未知</#if></td>
|
||||
@@ -246,6 +252,7 @@
|
||||
<td class="v"> </td>
|
||||
<td> </td>
|
||||
<td class="v"> </td>
|
||||
-->
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
||||
@@ -851,20 +851,20 @@ function add(){
|
||||
}
|
||||
}
|
||||
|
||||
var mappingAlias = $("#mappingAlias").val();
|
||||
if(mappingAlias){
|
||||
var aliasArr=alias.toString().split("\n");
|
||||
var set=[];
|
||||
for(var i=0;i<aliasArr.length;i++){
|
||||
var aliasName=aliasArr[i].trim();
|
||||
if(aliasName && aliasName!=''){
|
||||
if(aliasName==name){
|
||||
alert('小区名和别名不能相同!');
|
||||
return false;
|
||||
var mappingAlias = $("#mappingAlias").val();
|
||||
if(mappingAlias){
|
||||
var aliasArr=alias.toString().split("\n");
|
||||
var set=[];
|
||||
for(var i=0;i<aliasArr.length;i++){
|
||||
var aliasName=aliasArr[i].trim();
|
||||
if(aliasName && aliasName!=''){
|
||||
if(aliasName==name){
|
||||
alert('小区名和别名不能相同!');
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var region = $("#region").val();
|
||||
if (region == '') {
|
||||
@@ -902,15 +902,35 @@ function add(){
|
||||
timeout: 100000,
|
||||
success: function(model) {
|
||||
if(model.exist){
|
||||
|
||||
alert("小区名已存在")
|
||||
return false;
|
||||
alert("小区名已存在");
|
||||
flg = true;
|
||||
}
|
||||
},
|
||||
error : function() {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
if(flg){
|
||||
return false;
|
||||
}
|
||||
|
||||
jQuery.ajax({
|
||||
type: 'POST',
|
||||
async: false,
|
||||
url: '../district/checkDistrictName',
|
||||
data: {city:city,region:region,name:name,cat:"district"},
|
||||
dataType: 'json',
|
||||
timeout: 100000,
|
||||
success: function(model) {
|
||||
if(model.exist){
|
||||
alert("小区名是其他小区的别名");
|
||||
flg = true;
|
||||
}
|
||||
},
|
||||
error : function() {
|
||||
}
|
||||
});
|
||||
if(flg){
|
||||
return false;
|
||||
}
|
||||
@@ -930,13 +950,15 @@ function add(){
|
||||
success: function(model) {
|
||||
if (model.msg) {
|
||||
alert('别名中 "' + model.msg + '" 已经是其他小区的小区名,不能作为别名使用!');
|
||||
return false;
|
||||
flg = true;
|
||||
}
|
||||
},
|
||||
error : function() {
|
||||
}
|
||||
});
|
||||
|
||||
if(flg){
|
||||
return false;
|
||||
}
|
||||
var flag = $("#goPic").val()
|
||||
if(flag=="true"){
|
||||
$("#lineForm").submit();
|
||||
@@ -956,7 +978,7 @@ function add(){
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<div id = "save">
|
||||
<#assign markMap = district.markMap! />
|
||||
<form id="lineForm" action="../district/save" method = "post">
|
||||
<input type="hidden" name="district.id" value="${district.id}" />
|
||||
<input type="hidden" id = "districtId" name="district.id" value="${district.id}" />
|
||||
<input type="hidden" name="district.category" value="${district.category}" />
|
||||
<input type="hidden" name="cityDisplay" value="${cityDisplay!}" />
|
||||
<input type="hidden" name="keyword" value="${keyword!}" />
|
||||
@@ -1130,20 +1130,18 @@ $(document).ready(function(){
|
||||
alert('区域不能为空!');
|
||||
return false;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
var dLat = $("#dLat").val();
|
||||
if (dLat == '') {
|
||||
alert('经纬度不能为空!');
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
var dLng = $("#dLng").val();
|
||||
if (dLng == '') {
|
||||
alert('经纬度不能为空!');
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
var name = $("#districtName").val();
|
||||
if (name == '') {
|
||||
@@ -1183,14 +1181,56 @@ $(document).ready(function(){
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
var address = $("#address").val();
|
||||
if (address == '') {
|
||||
alert('小区地址不能为空!');
|
||||
return false;
|
||||
}
|
||||
*/
|
||||
|
||||
var id = $("#districtId").val();
|
||||
|
||||
var flg = false;
|
||||
jQuery.ajax({
|
||||
type: 'POST',
|
||||
async: false,
|
||||
url: '../district/validateDistrictName',
|
||||
data: {city:city,region:region,name:name,cat:"district", id:id},
|
||||
dataType: 'json',
|
||||
timeout: 100000,
|
||||
success: function(model) {
|
||||
if(model.exist){
|
||||
alert("小区名已存在");
|
||||
flg = true;
|
||||
}
|
||||
},
|
||||
error : function() {
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
if(flg){
|
||||
return false;
|
||||
}
|
||||
|
||||
jQuery.ajax({
|
||||
type: 'POST',
|
||||
async: false,
|
||||
url: '../district/checkDistrictName',
|
||||
data: {city:city,region:region,name:name,cat:"district",id:id},
|
||||
dataType: 'json',
|
||||
timeout: 100000,
|
||||
success: function(model) {
|
||||
if(model.exist){
|
||||
alert("小区名是其他小区的别名");
|
||||
flg = true;
|
||||
}
|
||||
},
|
||||
error : function() {
|
||||
}
|
||||
});
|
||||
if(flg){
|
||||
return false;
|
||||
}
|
||||
|
||||
jQuery.ajax({
|
||||
type: 'POST',
|
||||
@@ -1202,15 +1242,15 @@ $(document).ready(function(){
|
||||
success: function(model) {
|
||||
if (model.msg) {
|
||||
alert('别名中 "' + model.msg + '" 已经是其他小区的小区名,不能作为别名使用!');
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
flg = true;
|
||||
}
|
||||
},
|
||||
error : function() {
|
||||
}
|
||||
});
|
||||
|
||||
if(flg){
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
|
||||
|
||||
@@ -121,28 +121,30 @@
|
||||
<option value="标准写字楼">标准写字楼</option>
|
||||
<option value="创意园区">创意园区</option>
|
||||
<option value="商住两用">商住两用</option>
|
||||
<option value="综合体">综合体</option>
|
||||
<option value="其他">其他</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class = "bg" style="color:red;font-size:15px;">建筑类型</td>
|
||||
<td>
|
||||
<input type="hidden" id="build_type" name="district.buildType"/>
|
||||
<div id="standardOffice">
|
||||
<input type="checkbox" name="build_type_t" value="纯写字楼">纯写字楼
|
||||
<input type="checkbox" name="build_type_t" value="商务中心">商务中心
|
||||
<input type="checkbox" name="build_type_t" value="酒店写字楼">酒店写字楼
|
||||
<input type="checkbox" name="build_type_t" value="商住楼">商住楼
|
||||
<input type="checkbox" name="build_type_t" value="商务综合体">商务综合体
|
||||
<input type="checkbox" name="build_type_t" value="商业综合体">商业综合体
|
||||
</div>
|
||||
<div id="garden">
|
||||
<input type="checkbox" name="build_type_t" value="创意园区" >创意园区
|
||||
<input type="checkbox" name="build_type_t" value="创意产业园区" >创意产业园区
|
||||
<input type="checkbox" name="build_type_t" value="独栋写字楼">独栋写字楼
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<#-- <tr>-->
|
||||
<#-- <td class = "bg" style="color:red;font-size:15px;">建筑类型</td>-->
|
||||
<#-- <td>-->
|
||||
<#-- <input type="hidden" id="build_type" name="district.buildType"/>-->
|
||||
<#-- <div id="standardOffice">-->
|
||||
<#-- <input type="checkbox" name="build_type_t" value="纯写字楼">纯写字楼 -->
|
||||
<#-- <input type="checkbox" name="build_type_t" value="商务中心">商务中心 -->
|
||||
<#-- <input type="checkbox" name="build_type_t" value="酒店写字楼">酒店写字楼 -->
|
||||
<#-- <input type="checkbox" name="build_type_t" value="商住楼">商住楼 -->
|
||||
<#-- <input type="checkbox" name="build_type_t" value="商务综合体">商务综合体 -->
|
||||
<#-- <input type="checkbox" name="build_type_t" value="商业综合体">商业综合体 -->
|
||||
<#-- </div>-->
|
||||
<#-- <div id="garden">-->
|
||||
<#-- <input type="checkbox" name="build_type_t" value="创意园区" >创意园区 -->
|
||||
<#-- <input type="checkbox" name="build_type_t" value="创意产业园区" >创意产业园区 -->
|
||||
<#-- <input type="checkbox" name="build_type_t" value="独栋写字楼">独栋写字楼 -->
|
||||
<#-- </div>-->
|
||||
<#-- </td>-->
|
||||
<#-- </tr>-->
|
||||
<tr id="tr_block">
|
||||
<td class = "t1">板块</td>
|
||||
<td>
|
||||
@@ -150,12 +152,12 @@
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bg">商圈</td>
|
||||
<td>
|
||||
<input name="district.businessQuarter" type="text" style="width:300px" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<#-- <tr>-->
|
||||
<#-- <td class="bg">商圈</td>-->
|
||||
<#-- <td>-->
|
||||
<#-- <input name="district.businessQuarter" type="text" style="width:300px" value="" />-->
|
||||
<#-- </td>-->
|
||||
<#-- </tr>-->
|
||||
<tr>
|
||||
<td class="bg">乡镇街道</td>
|
||||
<td>
|
||||
@@ -285,12 +287,12 @@
|
||||
<input name="district.carSiteCount" type="text" style="width:300px" value="" onkeydown="return justPositiveInteger(this,event);"/>个
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="t1">车位描述</td>
|
||||
<td>
|
||||
<input name="district.carSite" type="text" style="width:300px" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<#-- <tr>-->
|
||||
<#-- <td class="t1">车位描述</td>-->
|
||||
<#-- <td>-->
|
||||
<#-- <input name="district.carSite" type="text" style="width:300px" value="" />-->
|
||||
<#-- </td>-->
|
||||
<#-- </tr>-->
|
||||
|
||||
<tr>
|
||||
<td class="t1">地上车位数</td>
|
||||
@@ -335,12 +337,12 @@
|
||||
<input name="istrict.propertyLife" type="text" style="width:300px" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="bg">楼层情况</td>
|
||||
<td>
|
||||
<input name="district.floorInfo" type="text" style="width:300px" value="" onkeydown="return justPositiveInteger(this,event);"/>
|
||||
</td>
|
||||
</tr>
|
||||
<#-- <tr>-->
|
||||
<#-- <td class="bg">楼层情况</td>-->
|
||||
<#-- <td>-->
|
||||
<#-- <input name="district.floorInfo" type="text" style="width:300px" value="" onkeydown="return justPositiveInteger(this,event);"/>-->
|
||||
<#-- </td>-->
|
||||
<#-- </tr>-->
|
||||
<tr>
|
||||
<td class="bg">净高</td>
|
||||
<td>
|
||||
@@ -456,12 +458,12 @@
|
||||
<#-- </tr>-->
|
||||
|
||||
|
||||
<tr>
|
||||
<td class="t1">开盘时间</td>
|
||||
<td>
|
||||
<input name="district.openDate" type="text" style="width:300px" value="" />
|
||||
</td>
|
||||
</tr>
|
||||
<#-- <tr>-->
|
||||
<#-- <td class="t1">开盘时间</td>-->
|
||||
<#-- <td>-->
|
||||
<#-- <input name="district.openDate" type="text" style="width:300px" value="" />-->
|
||||
<#-- </td>-->
|
||||
<#-- </tr>-->
|
||||
<tr>
|
||||
<td class="bg">竣工时间</td>
|
||||
<td>
|
||||
|
||||
@@ -203,36 +203,38 @@
|
||||
<option value="标准写字楼" <#if district.estateType2?? && district.estateType2=="标准写字楼">selected</#if>>标准写字楼</option>
|
||||
<option value="创意园区" <#if district.estateType2?? && district.estateType2=="创意园区">selected</#if>>创意园区</option>
|
||||
<option value="商住两用" <#if district.estateType2?? && district.estateType2=="商住两用">selected</#if>>商住两用</option>
|
||||
<option value="综合体" <#if district.estateType2?? && district.estateType2=="综合体">selected</#if>>综合体</option>
|
||||
<option value="其他" <#if district.estateType2?? && district.estateType2=="其他">selected</#if>>其他</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class = "t1">
|
||||
<#if markMap?? && markMap["build_type"]?? && markMap["build_type"] == 1>
|
||||
<i class="lock" name="build_type"></i>
|
||||
<#else>
|
||||
<i class="unlock" name="build_type"></i>
|
||||
</#if>
|
||||
<span style="color:red;font-size:15px;">建筑类型</span></td>
|
||||
<td>
|
||||
<input type="hidden" id="build_type" name="district.buildType" value="${district.buildType!}"/>
|
||||
<div id="standardOffice" style="<#if district.estateType2?? && (district.estateType2=='园区')>display:none;</#if>" >
|
||||
<input type="checkbox" name="build_type_t" value="纯写字楼" <#if district.buildType?? && district.estateType2?? && district.estateType2=='标准写字楼'&& district.buildType?contains("纯写字楼")>checked</#if> >纯写字楼
|
||||
<input type="checkbox" name="build_type_t" value="商务中心" <#if district.buildType?? && district.estateType2?? && district.estateType2=='标准写字楼'&& district.buildType?contains("商务中心")>checked</#if>>商务中心
|
||||
<input type="checkbox" name="build_type_t" value="酒店写字楼" <#if district.buildType?? && district.estateType2?? && district.estateType2=='标准写字楼'&& district.buildType?contains("酒店写字楼")>checked</#if>>酒店写字楼
|
||||
<input type="checkbox" name="build_type_t" value="商住楼" <#if district.buildType?? && district.estateType2?? && district.estateType2=='标准写字楼'&& district.buildType?contains("商住楼")>checked</#if>>商住楼
|
||||
<input type="checkbox" name="build_type_t" value="商务综合体" <#if district.buildType?? && district.estateType2?? && district.estateType2=='标准写字楼'&& district.buildType?contains("商务综合体")>checked</#if>>商务综合体
|
||||
<input type="checkbox" name="build_type_t" value="商业综合体" <#if district.buildType?? && district.estateType2?? && district.estateType2=='标准写字楼'&& district.buildType?contains("商业综合体")>checked</#if>>商业综合体
|
||||
</div>
|
||||
<div id="garden" style="<#if district.estateType2?? && (district.estateType2=='标准写字楼')>display:none;</#if>">
|
||||
<input type="checkbox" name="build_type_t" value="创意园区" <#if district.buildType?? && district.estateType2?? && district.estateType2=='园区'&& district.buildType?contains("创意园区")>checked</#if>>创意园区
|
||||
<input type="checkbox" name="build_type_t" value="创意产业园区" <#if district.buildType?? && district.estateType2?? && district.estateType2=='园区'&& district.buildType?contains("创意产业园区")>checked</#if>>创意产业园区
|
||||
<input type="checkbox" name="build_type_t" value="独栋写字楼" <#if district.buildType?? && district.estateType2?? && district.estateType2=='园区'&& district.buildType?contains("独栋写字楼")>checked</#if>>独栋写字楼
|
||||
</div>
|
||||
<div id="businessCenter" style="<#if district.estateType2?? && (district.estateType2=='商务中心')>display:none;</#if>">
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<#-- <tr>-->
|
||||
<#-- <td class = "t1">-->
|
||||
<#-- <#if markMap?? && markMap["build_type"]?? && markMap["build_type"] == 1>-->
|
||||
<#-- <i class="lock" name="build_type"></i>-->
|
||||
<#-- <#else>-->
|
||||
<#-- <i class="unlock" name="build_type"></i>-->
|
||||
<#-- </#if>-->
|
||||
<#-- <span style="color:red;font-size:15px;">建筑类型</span></td>-->
|
||||
<#-- <td>-->
|
||||
<#-- <input type="hidden" id="build_type" name="district.buildType" value="${district.buildType!}"/>-->
|
||||
<#-- <div id="standardOffice" style="<#if district.estateType2?? && (district.estateType2=='园区')>display:none;</#if>" >-->
|
||||
<#-- <input type="checkbox" name="build_type_t" value="纯写字楼" <#if district.buildType?? && district.estateType2?? && district.estateType2=='标准写字楼'&& district.buildType?contains("纯写字楼")>checked</#if> >纯写字楼 -->
|
||||
<#-- <input type="checkbox" name="build_type_t" value="商务中心" <#if district.buildType?? && district.estateType2?? && district.estateType2=='标准写字楼'&& district.buildType?contains("商务中心")>checked</#if>>商务中心 -->
|
||||
<#-- <input type="checkbox" name="build_type_t" value="酒店写字楼" <#if district.buildType?? && district.estateType2?? && district.estateType2=='标准写字楼'&& district.buildType?contains("酒店写字楼")>checked</#if>>酒店写字楼 -->
|
||||
<#-- <input type="checkbox" name="build_type_t" value="商住楼" <#if district.buildType?? && district.estateType2?? && district.estateType2=='标准写字楼'&& district.buildType?contains("商住楼")>checked</#if>>商住楼 -->
|
||||
<#-- <input type="checkbox" name="build_type_t" value="商务综合体" <#if district.buildType?? && district.estateType2?? && district.estateType2=='标准写字楼'&& district.buildType?contains("商务综合体")>checked</#if>>商务综合体 -->
|
||||
<#-- <input type="checkbox" name="build_type_t" value="商业综合体" <#if district.buildType?? && district.estateType2?? && district.estateType2=='标准写字楼'&& district.buildType?contains("商业综合体")>checked</#if>>商业综合体 -->
|
||||
<#-- </div>-->
|
||||
<#-- <div id="garden" style="<#if district.estateType2?? && (district.estateType2=='标准写字楼')>display:none;</#if>">-->
|
||||
<#-- <input type="checkbox" name="build_type_t" value="创意园区" <#if district.buildType?? && district.estateType2?? && district.estateType2=='园区'&& district.buildType?contains("创意园区")>checked</#if>>创意园区 -->
|
||||
<#-- <input type="checkbox" name="build_type_t" value="创意产业园区" <#if district.buildType?? && district.estateType2?? && district.estateType2=='园区'&& district.buildType?contains("创意产业园区")>checked</#if>>创意产业园区 -->
|
||||
<#-- <input type="checkbox" name="build_type_t" value="独栋写字楼" <#if district.buildType?? && district.estateType2?? && district.estateType2=='园区'&& district.buildType?contains("独栋写字楼")>checked</#if>>独栋写字楼 -->
|
||||
<#-- </div>-->
|
||||
<#-- <div id="businessCenter" style="<#if district.estateType2?? && (district.estateType2=='商务中心')>display:none;</#if>">-->
|
||||
<#-- </div>-->
|
||||
<#-- </td>-->
|
||||
<#-- </tr>-->
|
||||
<tr id="tr_block">
|
||||
<td class = "t1">
|
||||
<#if markMap?? && markMap["block"]?? && markMap["block"] == 1>
|
||||
@@ -245,21 +247,21 @@
|
||||
<input id="block" name="district.block" style="width:300px" value="${district.block!}"/>
|
||||
</td>
|
||||
</tr>
|
||||
<#-- <tr>-->
|
||||
<#-- <td class = "t1">-->
|
||||
<#-- <#if markMap?? && markMap["business_quarter"]?? && markMap["business_quarter"] == 1>-->
|
||||
<#-- <i class="lock" name="business_quarter"></i>-->
|
||||
<#-- <#else>-->
|
||||
<#-- <i class="unlock" name="business_quarter"></i>-->
|
||||
<#-- </#if>-->
|
||||
<#-- 商圈</td>-->
|
||||
<#-- <td>-->
|
||||
<#-- <input name="district.businessQuarter" type="text" style="width:300px" value="${district.businessQuarter!}" />-->
|
||||
<#-- </td>-->
|
||||
<#-- </tr>-->
|
||||
<tr>
|
||||
<td class = "t1">
|
||||
<#if markMap?? && markMap["business_quarter"]?? && markMap["business_quarter"] == 1>
|
||||
<i class="lock" name="business_quarter"></i>
|
||||
<#else>
|
||||
<i class="unlock" name="business_quarter"></i>
|
||||
</#if>
|
||||
商圈</td>
|
||||
<td>
|
||||
<input name="district.businessQuarter" type="text" style="width:300px" value="${district.businessQuarter!}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="t1">
|
||||
<#if markMap?? && markMap["township"]?? && markMap["township"]?is_number && markMap["township"] == 1>
|
||||
<#if markMap?? && markMap["township"]?? && markMap["township"] == 1>
|
||||
<i class="lock" name="township"></i>
|
||||
<#else>
|
||||
<i class="unlock" name="township"></i>
|
||||
@@ -269,7 +271,6 @@
|
||||
<input name="district.township" type="text" style="width:300px" value="${district.township!}" />
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class = "t1">
|
||||
<#if markMap?? && markMap["loop_line_info"]?? && markMap["loop_line_info"] == 1>
|
||||
@@ -490,7 +491,7 @@
|
||||
<#if markMap?? && markMap["estate_charge"]?? && markMap["estate_charge"] == 1>
|
||||
<i class="lock" name="estate_charge"></i>
|
||||
<#else>
|
||||
<i class="unlock" name="estate_charge"></i>
|
||||
<i class="unlock" name="得房率"></i>
|
||||
</#if>
|
||||
物 业 费</td>
|
||||
<td>
|
||||
@@ -510,19 +511,19 @@
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td class = "t1">
|
||||
<#if markMap?? && markMap["car_site"]?? && markMap["car_site"] == 1>
|
||||
<i class="lock" name="car_site"></i>
|
||||
<#else>
|
||||
<i class="unlock" name="car_site"></i>
|
||||
</#if>
|
||||
车位描述
|
||||
</td>
|
||||
<td>
|
||||
<input name="district.carSite" type="text" style="width:300px" value="${district.carSite!}" />
|
||||
</td>
|
||||
</tr>
|
||||
<#-- <tr>-->
|
||||
<#-- <td class = "t1">-->
|
||||
<#-- <#if markMap?? && markMap["car_site"]?? && markMap["car_site"] == 1>-->
|
||||
<#-- <i class="lock" name="car_site"></i>-->
|
||||
<#-- <#else>-->
|
||||
<#-- <i class="unlock" name="car_site"></i>-->
|
||||
<#-- </#if>-->
|
||||
<#-- 车位描述-->
|
||||
<#-- </td>-->
|
||||
<#-- <td>-->
|
||||
<#-- <input name="district.carSite" type="text" style="width:300px" value="${district.carSite!}" />-->
|
||||
<#-- </td>-->
|
||||
<#-- </tr>-->
|
||||
<tr>
|
||||
<td class = "t1">
|
||||
<#if markMap?? && markMap["land_car_site"]?? && markMap["land_car_site"] == 1>
|
||||
@@ -618,18 +619,18 @@
|
||||
<input name="district.propertyLife" type="text" style="width:300px" value="${district.propertyLife!}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class = "t1">
|
||||
<#if markMap?? && markMap["floor_info"]?? && markMap["floor_info"] == 1>
|
||||
<i class="lock" name="floor_info"></i>
|
||||
<#else>
|
||||
<i class="unlock" name="floor_info"></i>
|
||||
</#if>
|
||||
楼层情况</td>
|
||||
<td>
|
||||
<input name="district.floorInfo" type="text" style="width:300px" value="${district.floorInfo!}" />
|
||||
</td>
|
||||
</tr>
|
||||
<#-- <tr>-->
|
||||
<#-- <td class = "t1">-->
|
||||
<#-- <#if markMap?? && markMap["floor_info"]?? && markMap["floor_info"] == 1>-->
|
||||
<#-- <i class="lock" name="floor_info"></i>-->
|
||||
<#-- <#else>-->
|
||||
<#-- <i class="unlock" name="floor_info"></i>-->
|
||||
<#-- </#if>-->
|
||||
<#-- 楼层情况</td>-->
|
||||
<#-- <td>-->
|
||||
<#-- <input name="district.floorInfo" type="text" style="width:300px" value="${district.floorInfo!}" />-->
|
||||
<#-- </td>-->
|
||||
<#-- </tr>-->
|
||||
<tr>
|
||||
<td class = "t1">
|
||||
<#if markMap?? && markMap["clear_height"]?? && markMap["clear_height"] == 1>
|
||||
@@ -861,18 +862,18 @@
|
||||
<#-- <textarea alias="richarea" name="district.fitment" style="width:400px;height:100px;">${district.fitment!}</textarea>-->
|
||||
<#-- </td>-->
|
||||
<#-- </tr>-->
|
||||
<tr>
|
||||
<td class = "t1">
|
||||
<#if markMap?? && markMap["open_date"]?? && markMap["open_date"] == 1>
|
||||
<i class="lock" name="open_date"></i>
|
||||
<#else>
|
||||
<i class="unlock" name="open_date"></i>
|
||||
</#if>
|
||||
开盘时间</td>
|
||||
<td>
|
||||
<input name="district.openDate" type="text" style="width:300px" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" value="${t_util.formatDate(district.openDate!)}" />
|
||||
</td>
|
||||
</tr>
|
||||
<#-- <tr>-->
|
||||
<#-- <td class = "t1">-->
|
||||
<#-- <#if markMap?? && markMap["open_date"]?? && markMap["open_date"] == 1>-->
|
||||
<#-- <i class="lock" name="open_date"></i>-->
|
||||
<#-- <#else>-->
|
||||
<#-- <i class="unlock" name="open_date"></i>-->
|
||||
<#-- </#if>-->
|
||||
<#-- 开盘时间</td>-->
|
||||
<#-- <td>-->
|
||||
<#-- <input name="district.openDate" type="text" style="width:300px" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})" value="${t_util.formatDate(district.openDate!)}" />-->
|
||||
<#-- </td>-->
|
||||
<#-- </tr>-->
|
||||
<tr>
|
||||
<td class = "t1">
|
||||
<#if markMap?? && markMap["finish_building_date"]?? && markMap["finish_building_date"] == 1>
|
||||
|
||||
@@ -42,20 +42,23 @@
|
||||
<#include "officeHeader.ftl"/>
|
||||
<div>
|
||||
<form action="../district2/officelist" id="_search_house_form">
|
||||
城市:
|
||||
<@d_city defaultValue="${cityDisplay!}" callback="changeCity" callbackField="display" name="cityDisplay" showCountry = "1" />
|
||||
区域:
|
||||
<select id="region" name="region" style="width: 80px;">
|
||||
<option value="">不限</option>
|
||||
<#list regionList! as r>
|
||||
<option value="${r!}"<#if region! == r> selected</#if>>${r!}</option>
|
||||
</#list>
|
||||
</select>
|
||||
|
||||
类型:
|
||||
类型:
|
||||
<select name="estateType2" id="estateType2">
|
||||
<option value="">不限</option>
|
||||
<option value="标准写字楼" <#if estateType2?? & estateType2 == '标准写字楼'!>selected</#if>>标准写字楼</option>
|
||||
<option value="创意园区" <#if estateType2?? & estateType2 == '创意园区'!>selected</#if>>创意园区</option>
|
||||
<option value="商住两用" <#if estateType2?? & estateType2 == '商住两用'!>selected</#if>>商住两用</option>
|
||||
<option value="综合体" <#if estateType2?? & estateType2 == '综合体'!>selected</#if>>综合体</option>
|
||||
<option value="其他" <#if estateType2?? & estateType2 == '其他'!>selected</#if>>其他</option>
|
||||
</select>
|
||||
|
||||
<input type="text" name="keyword" value="${keyword!}" placeholder="输入关键词搜索" />
|
||||
@@ -345,6 +348,8 @@
|
||||
<option value="标准写字楼" <#if district.estateType2?? && district.estateType2=='标准写字楼'>selected</#if>>标准写字楼</option>
|
||||
<option value="创意园区" <#if district.estateType2?? && district.estateType2=='创意园区'>selected</#if>>创意园区</option>
|
||||
<option value="商住两用" <#if district.estateType2?? && district.estateType2=='商住两用'>selected</#if>>商住两用</option>
|
||||
<option value="综合体" <#if district.estateType2?? && district.estateType2=='综合体'>selected</#if>>综合体</option>
|
||||
<option value="其他" <#if district.estateType2?? && district.estateType2=='其他'>selected</#if>>其他</option>
|
||||
</select>
|
||||
</td>
|
||||
<td align="center" name="col19a" class="<#if columnIds?index_of('col19a')==-1>dn</#if>">
|
||||
|
||||
+10
-1
@@ -4,6 +4,8 @@ import java.util.Date;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
import com.fangjia.dal.sql.model.User;
|
||||
import com.fangjia.service.sql.UserService;
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.bson.types.ObjectId;
|
||||
|
||||
@@ -39,6 +41,7 @@ public class GuzhiController {
|
||||
private EvaluationService evaluationService;
|
||||
private SmsService smsService;
|
||||
private DistrictService districtService;
|
||||
private UserService userService;
|
||||
|
||||
private static final String DING_MSG_ROBOT_ID = "58c62a54d92790b58177c6d6";
|
||||
|
||||
@@ -150,7 +153,9 @@ public class GuzhiController {
|
||||
UniversalDto dto = UniversalDto.newDto();
|
||||
dto.append("caseId", model.getCaseId());
|
||||
mv.setModel(BasicModel.buildOKModel().setResult(dto));
|
||||
String msg = "【房价网-人工估值】接收到新的人工询价,请求请及时处理!城市:" + evaluation.getCity()
|
||||
|
||||
User user = userService.findById(token.getUserId());
|
||||
String msg = "【房价网-人工估值】客户: "+user.getDisplayName()+" 提交新的人工询价,请求请及时处理!城市:" + evaluation.getCity()
|
||||
+ " 区域:" + evaluation.getRegion() + " 小区名:" + evaluation.getDistrictName();
|
||||
DingDingMessageUtil.sendTextMessage("065f4a05d5f87eb39a9f9e048eeefb80c1f7560446f8926441de80453c160c60", msg);
|
||||
return mv;
|
||||
@@ -183,4 +188,8 @@ public class GuzhiController {
|
||||
public void setDistrictService(DistrictService districtService) {
|
||||
this.districtService = districtService;
|
||||
}
|
||||
|
||||
public void setUserService(UserService userService) {
|
||||
this.userService = userService;
|
||||
}
|
||||
}
|
||||
|
||||
+4
-1
@@ -1282,7 +1282,10 @@ public class WeiXinEvaluationController {
|
||||
Point point = new Point(Double.valueOf(ll[0]), Double.valueOf(ll[1]));
|
||||
points.add(point);
|
||||
}
|
||||
Point point = new Point(district.getLng2()/10000000000.0, district.getLat2()/10000000000.0);
|
||||
Point point = null;
|
||||
if(district.getLng2()!=null){
|
||||
point = new Point(district.getLng2()/10000000000.0, district.getLat2()/10000000000.0);
|
||||
}
|
||||
//boolean flag = InsidePolygon.aboutZone(point, points);
|
||||
//boolean flag = InsidePolygon.isPtInPoly(point.getLon(), point.getLat(), points);
|
||||
boolean flag = InsidePolygon2.checkIsInPolygon(point, points);
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import com.mongodb.DBCollection
|
||||
/**
|
||||
* 深圳公众号成交数据录入
|
||||
*/
|
||||
def datas = ExcelUtils.read("D:\\数据\\建行\\房产估值\\成交\\深圳5月份二手房成交数据汇总.xls", 0, 1)
|
||||
def datas = ExcelUtils.read("D:\\数据\\建行\\房产估值\\成交\\深圳6月份二手房成交数据汇总.xls", 0, 1)
|
||||
def lineUrl = "mongodb://developer:G00IDCDEV12385@192.168.0.43:28017";
|
||||
DBCollection DEAL_PRICE_COLL = MongoUtils.getCollectionByName2("fangjia", "deal_price", lineUrl)
|
||||
|
||||
|
||||
+9
-2
@@ -35,12 +35,19 @@ class BigdataCommbuildtypeBatch extends BaseBatch{
|
||||
def citys = CcbCommonUtils.getRunningCitys(args)
|
||||
def rets = []
|
||||
def cityCodeDatas = CcbCommonUtils.findCityCodeValue()
|
||||
def today = new Date().getDate()
|
||||
|
||||
for(def city : citys){
|
||||
|
||||
// def distCodeMap = CcbCommonUtils.findAllDistrictCodeValue(city)
|
||||
// def dists = CcbCommonUtils.findAllDistrictByCity(city, "district", ["city", "region", "name", "estate_type2","name_cat","build_type", "lng","c_date", "m_date"])
|
||||
// def distIds = CcbCommonUtils.findAllDistrictIdsByOracle(cityCodeDatas.get(city));
|
||||
def distIds = PgsqlCommUtils.findAllDistrictIdsByOracle(cityCodeDatas.get(city))
|
||||
def distIds = null
|
||||
if(today<=10){
|
||||
distIds = CcbCommonUtils.findAllDistrictIdsByOracle(cityCodeDatas.get(city));
|
||||
}else{
|
||||
distIds = PgsqlCommUtils.findAllDistrictIdsByOracle(cityCodeDatas.get(city))
|
||||
}
|
||||
|
||||
def rows = createDatas(cityCodeDatas.get(city), distIds)
|
||||
rets.addAll(rows)
|
||||
println city +" "+rows.size()
|
||||
|
||||
+16
-5
@@ -49,15 +49,25 @@ class BigdataCommunityBatch extends BaseBatch{
|
||||
|
||||
def cityCodeDataMap = CcbCommonUtils.findCityCodeValue()
|
||||
def index = 0
|
||||
def today = new Date().getDate()
|
||||
|
||||
println "starting 。。。。。。。。。"
|
||||
for(def city : citys){
|
||||
|
||||
index ++
|
||||
|
||||
|
||||
def distCodeMap = CcbCommonUtils.findAllDistrictCodeValue(city)
|
||||
def dists = CcbCommonUtils.findAllDistrictByCity(city, "district", ["city","region", "name", "address","lat", "lng","all_area","build_area","virescence_percent","cubage_percent","car_site_count","finish_building_date","estate_type2","household_count","status","c_date","m_date","name_cat","street","street_number"])
|
||||
|
||||
def ccbMaps = CcbCommonUtils.findCcbDistrict(cityCodeDataMap.get(city)) //融合导数时使用
|
||||
// def ccbMaps = CcbCommonUtils.findPgCcbDistrict(cityCodeDataMap.get(city)) //估值导数时使用
|
||||
|
||||
def ccbMaps = null
|
||||
if(today<=10){
|
||||
ccbMaps = CcbCommonUtils.findCcbDistrict(cityCodeDataMap.get(city)) //融合导数时使用
|
||||
}else{
|
||||
ccbMaps = CcbCommonUtils.findPgCcbDistrict(cityCodeDataMap.get(city)) //估值导数时使用
|
||||
}
|
||||
|
||||
def rets = createCityDatas(cityCodeDataMap, distCodeMap, dists)
|
||||
rets = addDeleteDist(dists, ccbMaps, rets)
|
||||
rows.addAll(rets)
|
||||
@@ -77,9 +87,10 @@ class BigdataCommunityBatch extends BaseBatch{
|
||||
FileUtils.batchCreateFile(rows, fileName,headers, "utf-8", false);
|
||||
println "txt 生成->导Oracle"
|
||||
|
||||
delPgData()
|
||||
saveToPgSql(rows)
|
||||
|
||||
if(today > 10){
|
||||
delPgData()
|
||||
saveToPgSql(rows)
|
||||
}
|
||||
// ExcelUtils.write("d:\\数据\\建行\\房产估值\\数据文件\\excel\\bigdata_community.xlsx", allDatas, "数据")
|
||||
// def datas = readTxt("d:\\数据\\建行\\房产估值\\数据文件\\txt\\BIGDATA_COMMUNITY_GJ.dat")
|
||||
// delPgData()
|
||||
|
||||
+91
-66
@@ -22,6 +22,7 @@ import java.util.concurrent.ConcurrentHashMap
|
||||
import java.util.concurrent.CountDownLatch
|
||||
import java.util.concurrent.ExecutorService
|
||||
import java.util.concurrent.Executors
|
||||
import java.util.concurrent.TimeUnit
|
||||
import java.util.concurrent.atomic.AtomicInteger
|
||||
import java.util.concurrent.atomic.AtomicLong
|
||||
import java.util.regex.Pattern
|
||||
@@ -61,61 +62,63 @@ class BigdataDealBatch extends BaseBatch{
|
||||
public void process(Object args) {
|
||||
//def weekend = DateUtils.parseFromTightByPattern("2021-07-25","yyyy-MM-dd")//DateUtils.getFirstDayOfWeek(new Date())
|
||||
// def citys = CcbCommonUtils.citys;
|
||||
// def citys = CcbCommonUtils.getRunningCitys(args)
|
||||
def citys = CcbCommonUtils.getRunningCitys(args)
|
||||
if(args && args.size()>=2){
|
||||
curDate = args[1].toString().toInteger()
|
||||
}
|
||||
println "curDate:"+curDate
|
||||
def allCitys = ["福州"] //CommonDatautils.findAllCity()
|
||||
for(def city : allCitys){
|
||||
// if(!ccbCitys.contains(city)){
|
||||
addDealPriceMatch(city);
|
||||
// }
|
||||
// def allCitys = CommonDatautils.findAllCity()
|
||||
// for(def city : allCitys){
|
||||
//// if(!ccbCitys.contains(city)){
|
||||
// addDealPriceMatch(city);
|
||||
//// }
|
||||
// }
|
||||
|
||||
|
||||
def rows = []
|
||||
def headers = []//["城市ID","成交ID","城市名称","行政区ID","行政区名称","街道","门牌号","小区ID","小区名称","楼栋ID","楼栋编号","楼栋名称","单元ID","单元编号","单元名称","户ID","详细地址","建筑年代","权属","权属年限","期数","所在楼层","层类型","总楼层数","建筑类型","建筑结构","建筑面积","套内面积","户型","室","厅","厨","卫","房屋用途","室内结构","朝向","装修情况","评估编号","成交单价","成交总价","申报总价","评估总价","网签合同编号","交易日期","交易类型","出售付款方式","成交周期","是否有电梯","赠送面积(地面花园)","赠送面积(露台)","赠送面积(阳台)","赠送面积(飘窗)","赠送面积(阁楼)","赠送面积(车库)","赠送面积(地下室)","赠送面积(其他)","房源数据来源","中介公司ID","中介公司名称","备注","创建时间","更新时间","来源公司","成交金额","数据时间"]
|
||||
def cityCodeDataMap = CcbCommonUtils.findCityCodeValue()
|
||||
def index = 0
|
||||
for(def city : citys){
|
||||
index ++
|
||||
def distCodeMap = CcbCommonUtils.findAllDistrictCodeValue(city)
|
||||
def ppeDists = [:]
|
||||
|
||||
def dealIds = findHistoryDealIds(city)
|
||||
println "历史id加载量:"+dealIds.size()
|
||||
def statMap = [:]//getDistrictStatByCity(city, weekend)
|
||||
if(city=="上海"){
|
||||
def youDataTrade = getYouDaData(statMap)
|
||||
def youdaDatas = createData(city, youDataTrade, cityCodeDataMap, distCodeMap, "youda", dealIds)
|
||||
rows.addAll(youdaDatas)
|
||||
println city +" "+youdaDatas.size()
|
||||
}
|
||||
|
||||
def trades = getCityData(city, statMap, ppeDists)
|
||||
if(trades){
|
||||
def rets = createData(city, trades, cityCodeDataMap, distCodeMap, "other", dealIds)
|
||||
rows.addAll(rets)
|
||||
println "【${index}】"+city +" 成交共:"+rets.size()
|
||||
|
||||
def cityDatas = []
|
||||
cityDatas << headers
|
||||
cityDatas.addAll(rows)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
def fileName = "/home/goojia/ccb/BIGDATA_DEAL_GJ.dat"
|
||||
if(CommonDatautils.isWindow()){
|
||||
fileName = "d:\\数据\\建行\\房产估值\\数据文件\\txt\\BIGDATA_DEAL_GJ.dat"
|
||||
}
|
||||
|
||||
// def rows = []
|
||||
// def headers = []//["城市ID","成交ID","城市名称","行政区ID","行政区名称","街道","门牌号","小区ID","小区名称","楼栋ID","楼栋编号","楼栋名称","单元ID","单元编号","单元名称","户ID","详细地址","建筑年代","权属","权属年限","期数","所在楼层","层类型","总楼层数","建筑类型","建筑结构","建筑面积","套内面积","户型","室","厅","厨","卫","房屋用途","室内结构","朝向","装修情况","评估编号","成交单价","成交总价","申报总价","评估总价","网签合同编号","交易日期","交易类型","出售付款方式","成交周期","是否有电梯","赠送面积(地面花园)","赠送面积(露台)","赠送面积(阳台)","赠送面积(飘窗)","赠送面积(阁楼)","赠送面积(车库)","赠送面积(地下室)","赠送面积(其他)","房源数据来源","中介公司ID","中介公司名称","备注","创建时间","更新时间","来源公司","成交金额","数据时间"]
|
||||
// def cityCodeDataMap = CcbCommonUtils.findCityCodeValue()
|
||||
// def index = 0
|
||||
// for(def city : citys){
|
||||
// index ++
|
||||
// def distCodeMap = CcbCommonUtils.findAllDistrictCodeValue(city)
|
||||
// def ppeDists = [:]
|
||||
//
|
||||
// def statMap = [:]//getDistrictStatByCity(city, weekend)
|
||||
// if(city=="上海"){
|
||||
// def youDataTrade = getYouDaData(statMap)
|
||||
// def youdaDatas = createData(youDataTrade, cityCodeDataMap, distCodeMap, "youda")
|
||||
// rows.addAll(youdaDatas)
|
||||
// println city +" "+youdaDatas.size()
|
||||
// }
|
||||
//
|
||||
// def trades = getCityData(city, statMap, ppeDists)
|
||||
// if(trades){
|
||||
// def rets = createData(trades, cityCodeDataMap, distCodeMap, "other")
|
||||
// rows.addAll(rets)
|
||||
// println "【${index}】"+city +" 成交共:"+rets.size()
|
||||
//
|
||||
// def cityDatas = []
|
||||
// cityDatas << headers
|
||||
// cityDatas.addAll(rows)
|
||||
// }
|
||||
//
|
||||
// }
|
||||
//
|
||||
// def fileName = "/home/goojia/ccb/BIGDATA_DEAL_GJ.dat"
|
||||
// if(CommonDatautils.isWindow()){
|
||||
// fileName = "d:\\数据\\建行\\房产估值\\数据文件\\txt\\BIGDATA_DEAL_GJ.dat"
|
||||
// }
|
||||
//
|
||||
// FileUtils.batchCreateFile(rows, fileName,headers, "utf-8", false);
|
||||
// println "txt 生成 " + rows.size()
|
||||
//
|
||||
// saveToPgSql(rows)
|
||||
FileUtils.batchCreateFile(rows, fileName,headers, "utf-8", false);
|
||||
println "txt 生成 " + rows.size()
|
||||
|
||||
saveToPgSql(rows)
|
||||
}
|
||||
|
||||
def createData(def rets, cityCodeDatas, distCodeMap, source){
|
||||
def createData(city, def rets, cityCodeDatas, distCodeMap, source, dealIds){
|
||||
def result = Collections.synchronizedList(new ArrayList());
|
||||
def totalCount = new AtomicLong()
|
||||
final CountDownLatch latch = new CountDownLatch(rets.size())
|
||||
@@ -124,29 +127,36 @@ class BigdataDealBatch extends BaseBatch{
|
||||
// def startDate = DateUtils.parseFromTightByPattern(DateUtils.addMonth(new Date(),-2),'yyyy-MM-dd')
|
||||
// def lianjiaPriceMap = getDistrictStatByCity("ÉϺ£", startDate)
|
||||
|
||||
def ccbPriceMap = getCommunityPrices("上海")
|
||||
def ccbPriceMap = null
|
||||
if(city == "上海"){
|
||||
ccbPriceMap = getCommunityPrices("上海")
|
||||
}
|
||||
|
||||
for(def i=0;i<rets.size();i++){
|
||||
final def trade = rets[i]
|
||||
|
||||
fixedThreadPool.execute(new Runnable() {
|
||||
void run() {
|
||||
try {
|
||||
totalCount.addAndGet(1)
|
||||
if(source == "youda"){
|
||||
|
||||
def ret = converYouDaData(trade, cityCodeDatas, distCodeMap, ccbPriceMap)
|
||||
if(ret){
|
||||
result << ret
|
||||
println totalCount.get() +" "+trade.city+" "+trade.region+" "+trade.fjName+" "+new Date().toLocaleString()
|
||||
}
|
||||
if(dealIds.contains(trade._id.toString())){
|
||||
println "重复:"+trade._id.toString() + " "+ trade.district_name
|
||||
}else{
|
||||
def ret = converData(trade, cityCodeDatas, distCodeMap)
|
||||
if(ret){
|
||||
result << ret
|
||||
println totalCount.get() +" "+trade.city+" "+trade.region+" "+trade.district_name+" "+new Date().toLocaleString()
|
||||
if(source == "youda"){
|
||||
def ret = converYouDaData(trade, cityCodeDatas, distCodeMap, ccbPriceMap)
|
||||
if(ret){
|
||||
result << ret
|
||||
println totalCount.get() +" 友达:"+trade.city+" "+trade.region+" "+trade.fjName+" "+new Date().toLocaleString()
|
||||
}
|
||||
}else{
|
||||
def ret = converData(trade, cityCodeDatas, distCodeMap)
|
||||
if(ret){
|
||||
result << ret
|
||||
println totalCount.get() +" 第三方:"+trade.city+" "+trade.region+" "+trade.district_name+" "+new Date().toLocaleString()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace()
|
||||
} finally {
|
||||
@@ -155,7 +165,8 @@ class BigdataDealBatch extends BaseBatch{
|
||||
};
|
||||
})
|
||||
}
|
||||
latch.await()
|
||||
println "查询完成......."
|
||||
latch.await(5, TimeUnit.MINUTES);
|
||||
return result
|
||||
}
|
||||
|
||||
@@ -623,6 +634,20 @@ class BigdataDealBatch extends BaseBatch{
|
||||
return map
|
||||
}
|
||||
|
||||
def findHistoryDealIds(def city){
|
||||
def sql = "SELECT gujia_bds_mdl_id from base.t0831_bigdata_deal_gj_h where urbn_nm='${city}' "
|
||||
def ids = []
|
||||
try{
|
||||
pgsqlInstance.eachRow(sql,{
|
||||
ids << it.gujia_bds_mdl_id
|
||||
});
|
||||
}catch(Exception e){
|
||||
|
||||
}
|
||||
|
||||
return ids
|
||||
}
|
||||
|
||||
def getPpeGTE15Datas(def city){
|
||||
def sql = "select unit_price,commid from avm_evaluation_item_gj where data_type='³É½»' and pe>=15 and pe<=20 " +
|
||||
"and cityname='"+city+"'";
|
||||
@@ -652,9 +677,9 @@ class BigdataDealBatch extends BaseBatch{
|
||||
|
||||
for(def i=0;i<trades.size();i++){
|
||||
final def t = trades[i]
|
||||
// fixedThreadPool.execute(
|
||||
// new Runnable() {
|
||||
// void run() {
|
||||
fixedThreadPool.execute(
|
||||
new Runnable() {
|
||||
void run() {
|
||||
count_.addAndGet(1)
|
||||
try{
|
||||
if(!t.match_id){
|
||||
@@ -690,9 +715,9 @@ class BigdataDealBatch extends BaseBatch{
|
||||
latch.countDown()
|
||||
}
|
||||
|
||||
// }
|
||||
// }
|
||||
// );
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
latch.await()
|
||||
println city +" "+trades.size()+" "+new Date().toString()
|
||||
|
||||
+8
-1
@@ -69,6 +69,10 @@ class BigdataForsaleBatch extends BaseBatch{
|
||||
def pgsqlInstance = Sql.newInstance("jdbc:postgresql://192.168.0.236:5432/warehouse?stringtype=unspecified",
|
||||
"postgres", "postgres", "org.postgresql.Driver")
|
||||
|
||||
|
||||
def lastMonth = DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMM"), -1, "yyyyMM");
|
||||
def curMonth = DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyyMM"), 0, "yyyyMM");
|
||||
|
||||
static main(args) {
|
||||
runBatch(new BigdataForsaleBatch(), args);
|
||||
}
|
||||
@@ -81,6 +85,9 @@ class BigdataForsaleBatch extends BaseBatch{
|
||||
|
||||
def cityCodeDataMap = CcbCommonUtils.findCityCodeValue()
|
||||
|
||||
def startDate = lastMonth+"18"
|
||||
def endDate = curMonth+"19"
|
||||
println "·¿Ô´Ê±¼ä£º"+startDate+" "+endDate
|
||||
|
||||
def houseIdsfilter = findAllHouseIdsByCity()
|
||||
|
||||
@@ -91,7 +98,7 @@ class BigdataForsaleBatch extends BaseBatch{
|
||||
def distCodeMap = CcbCommonUtils.findAllDistrictCodeValue(city)
|
||||
def districts = CcbCommonUtils.findAllDistrictByCity(city, "district", ["city", "region", "name", "lng","estate_type2","name_cat","address", "alias", "finish_building_date", "house_property", "property_life", "build_type", "build_structure"]);
|
||||
// exportSellCSV(index, city, cityCodeDataMap, distCodeMap, districts, 20230118, 20230219);
|
||||
exportSellCSV(index, city, cityCodeDataMap, distCodeMap, districts, 20230518, 20230619, houseIdsfilter);
|
||||
exportSellCSV(index, city, cityCodeDataMap, distCodeMap, districts, startDate.toInteger(), endDate.toInteger(), houseIdsfilter);
|
||||
//测试通过匹配接口配房源效果
|
||||
// exportSellCSV(index, city, cityCodeDataMap, distCodeMap, districts, 20201201, 20211118)
|
||||
}
|
||||
|
||||
+3
-3
@@ -52,7 +52,7 @@ class GuiDingPriceBatch extends BaseBatch{
|
||||
def distCodeMap = CcbCommonUtils.findAllDistrictCodeValue(city)
|
||||
|
||||
//添加自己库中的人工指导价
|
||||
def prices = CcbCommonUtils.findPersonPrice(city, "2023-05-27", "2023-06-26")
|
||||
def prices = CcbCommonUtils.findPersonPrice(city, "2023-06-26", "2023-07-20")
|
||||
// def prices = CcbCommonUtils.findPersonPrice(city, "2022-01-01", "2022-11-22")
|
||||
if(prices){
|
||||
def distMap = getDistrictMap(city)
|
||||
@@ -84,8 +84,8 @@ class GuiDingPriceBatch extends BaseBatch{
|
||||
|
||||
saveToPgSql(rows)
|
||||
//
|
||||
// //更新静态数据表
|
||||
// updateVersion(DateUtils.formatDateByPattern(new Date(), "yyyy-MM")+"-28")
|
||||
//更新静态数据表
|
||||
updateVersion(DateUtils.formatDateByPattern(new Date(), "yyyy-MM")+"-28")
|
||||
|
||||
}
|
||||
|
||||
|
||||
+5
-5
@@ -93,13 +93,13 @@ class TradeStatLog {
|
||||
def run(){
|
||||
def citys = CcbCommonUtils.citys_all;
|
||||
def rets = []
|
||||
rets << ["城市","23年3月总量","23年4月总量","23年5月总量","占比","贝壳","链家", "我爱我家","房天下","中原"]
|
||||
rets << ["城市","23年4月总量","23年5月总量","23年6月总量","占比","贝壳","链家", "我爱我家","房天下","中原"]
|
||||
def sources = ["贝壳找房","链家在线","我爱我家","房天下","中原地产"]
|
||||
//def startDate = "2021-05-01"
|
||||
def startDate = "2023-03-01"
|
||||
def date = "2023-04-01"
|
||||
def endDate = "2023-05-01"
|
||||
def newDate = "2023-06-01"
|
||||
def startDate = "2023-04-01"
|
||||
def date = "2023-05-01"
|
||||
def endDate = "2023-06-01"
|
||||
def newDate = "2023-07-01"
|
||||
|
||||
for(def city : citys){
|
||||
def lastMonthCount = findTradesCount(city, null, DateUtils.parseFromTightByPattern(startDate,"yyyy-MM-dd"), DateUtils.parseFromTightByPattern(date,"yyyy-MM-dd"))
|
||||
|
||||
+26
-5
@@ -20,6 +20,25 @@ class PocTest {
|
||||
static main(args) {
|
||||
def task = new PocTest();
|
||||
task.run();
|
||||
// task.export()
|
||||
}
|
||||
|
||||
def export(){
|
||||
ExcelUtils.modify("D:\\数据\\其它\\广州.xlsx", { row ->
|
||||
def dist = CommonDatautils.findDistrictById(row["B"])
|
||||
row['F'] = dist.address
|
||||
row['G'] = dist.lng/10000000000.0
|
||||
row['H'] = dist.lat/10000000000.0
|
||||
row['I'] = dist.estate_type2
|
||||
row['J'] = dist.build_type
|
||||
row['K'] = dist.schools
|
||||
row['L'] = dist.kindergartens
|
||||
row['M'] = dist.loudong_count
|
||||
row['N'] = dist.household_count
|
||||
row['O'] = dist.estate_charge
|
||||
row['P'] = dist.finish_building_date
|
||||
row['Q'] = dist.estate_company
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -32,9 +51,10 @@ class PocTest {
|
||||
* @return
|
||||
*/
|
||||
def run(){
|
||||
def inputfile = "D:\\数据\\重庆农商行\\poc\\test.xls"
|
||||
// def inputfile = "D:\\数据\\重庆农商行\\poc\\test.xls"
|
||||
def inputfile = "D:\\数据\\其它\\广州.xlsx"
|
||||
// match(inputfile)
|
||||
// addPrice(inputfile)
|
||||
addPrice(inputfile)
|
||||
// addArroundPrice(inputfile)
|
||||
// standard(inputfile)
|
||||
// addLoudongNum(inputfile)
|
||||
@@ -132,15 +152,16 @@ class PocTest {
|
||||
|
||||
def addPrice(path){
|
||||
ExcelUtils.multiThreadingModify(path, { row ->
|
||||
def commid = row['R']
|
||||
def commid = row['B']
|
||||
if(commid){
|
||||
def dist = CommonDatautils.findDistrictById(commid.trim())
|
||||
if(dist){
|
||||
row['Q'] = dist.name
|
||||
// row['Q'] = dist.name
|
||||
def priceObj = CommonDatautils.findDistrictPrice(dist.city, dist.region, dist.name)
|
||||
if(priceObj){
|
||||
row['F'] = priceObj.avg_price
|
||||
row['R'] = priceObj.avg_price
|
||||
}
|
||||
row['S'] = CommonDatautils.findNewSqmetreRent(dist.city, dist.region, dist.name)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
+22
-22
@@ -252,7 +252,7 @@ class CommonDatautils {
|
||||
q.put("visible", 0);
|
||||
q.put("cat", cat);
|
||||
q.put("city", city);
|
||||
// q.put("name", "³ÄÜ´óÏÃ")
|
||||
// q.put("name", "½»·¢·ç¾°")
|
||||
|
||||
DBObject keys = new BasicDBObject();
|
||||
if(fields){
|
||||
@@ -899,28 +899,28 @@ class CommonDatautils {
|
||||
DBObject q = new BasicDBObject();
|
||||
q.put("_id", new ObjectId(id.toString().replace("[","").replace("]","")));
|
||||
|
||||
DBObject keys = new BasicDBObject();
|
||||
keys.put("alias", 1);
|
||||
keys.put("addr_alias", 1);
|
||||
keys.put("city", 1);
|
||||
keys.put("region", 1);
|
||||
keys.put("name", 1);
|
||||
keys.put("estate_type2", 1);
|
||||
keys.put("address", 1);
|
||||
keys.put("build_structure", 1);
|
||||
keys.put("out_pics", 1);
|
||||
keys.put("lat", 1);
|
||||
keys.put("lng", 1);
|
||||
keys.put("lat2", 1);
|
||||
keys.put("lng2", 1);
|
||||
keys.put("name_cat", 1);
|
||||
keys.put("finish_building_date", 1)
|
||||
keys.put("mapping_alias", 1)
|
||||
keys.put("sid", 1)
|
||||
keys.put("status", 1)
|
||||
keys.put("name_cat", 1)
|
||||
// DBObject keys = new BasicDBObject();
|
||||
// keys.put("alias", 1);
|
||||
// keys.put("addr_alias", 1);
|
||||
// keys.put("city", 1);
|
||||
// keys.put("region", 1);
|
||||
// keys.put("name", 1);
|
||||
// keys.put("estate_type2", 1);
|
||||
// keys.put("address", 1);
|
||||
// keys.put("build_structure", 1);
|
||||
// keys.put("out_pics", 1);
|
||||
// keys.put("lat", 1);
|
||||
// keys.put("lng", 1);
|
||||
// keys.put("lat2", 1);
|
||||
// keys.put("lng2", 1);
|
||||
// keys.put("name_cat", 1);
|
||||
// keys.put("finish_building_date", 1)
|
||||
// keys.put("mapping_alias", 1)
|
||||
// keys.put("sid", 1)
|
||||
// keys.put("status", 1)
|
||||
// keys.put("name_cat", 1)
|
||||
try{
|
||||
DSCursor cursor = getDataStoreConnection().find(q, keys);
|
||||
DSCursor cursor = getDataStoreConnection().find(q);
|
||||
if(cursor){
|
||||
for(def obj : cursor){
|
||||
return obj;
|
||||
|
||||
+3
-15
@@ -74,29 +74,17 @@ class DistrictInfoExportBatch extends BaseBatch{
|
||||
|
||||
def createDatas(def city){
|
||||
def result = []
|
||||
def distKeys = []
|
||||
def districts = CommonDatautils.findAllDistricts(city, "district", null);
|
||||
for(def dist : districts){
|
||||
def key = dist.city +"##"+dist.region+"##"+dist.name
|
||||
if(!distKeys.contains(key)){
|
||||
distKeys << key
|
||||
}
|
||||
}
|
||||
|
||||
def removeDists = CommonDatautils.findRemoveDistricts(city, "district", null, "2022-01-01");
|
||||
// for(def dist : removeDists){
|
||||
// def key = dist.city +"##"+dist.region+"##"+dist.name
|
||||
// if(!distKeys.contains(key)){
|
||||
// distKeys << key
|
||||
// districts << dist
|
||||
// }
|
||||
// }
|
||||
|
||||
def lastDate = DateUtils.getLastDayOfMonth(new Date(), -1)
|
||||
def startDate = DateUtils.getFirstDayOfMonth(lastDate);
|
||||
|
||||
def fzAddrMap = getFzAddress();
|
||||
|
||||
//因为福州个性化问题,又不想影响自家数据库数据,所以另存一个福州小区库,用于手动添加数据
|
||||
// saveOrUpdateFzDist(districts)
|
||||
saveOrUpdateFzDist(districts)
|
||||
remarkRemoveDist(removeDists)
|
||||
def fzDistricts = getFzDistricts(city)
|
||||
|
||||
|
||||
+2
-1
@@ -33,7 +33,7 @@ class DistrictPriceExportBatch extends BaseBatch{
|
||||
|
||||
static DBCollection DISTRICT_SELL_STAT = MongoUtils.getCollectionByName("fangjia_stat", "district_sell_stat", "mongo.db.fangjia.com")
|
||||
|
||||
def specialDistsPriceMap = ["津泰新村7号、9-13号、15-17号":53620,"津泰新村14号":76230,"津泰新村1-6号、8号":32580]
|
||||
def specialDistsPriceMap = ["津泰新村9-13号、15-18号":54000,"津泰新村14号":72000,"津泰新村1-6号、8号":35000,"津泰新村7号":75000,"津泰新村19号":25000]
|
||||
static main(args) {
|
||||
runBatch(new DistrictPriceExportBatch(), args)
|
||||
}
|
||||
@@ -291,6 +291,7 @@ class DistrictPriceExportBatch extends BaseBatch{
|
||||
o.put("name", r[4])
|
||||
o.put("avg_price", r[5].toInteger())
|
||||
o.put("month", r[6].toInteger())
|
||||
o.put("c_date", new Date())
|
||||
FZ_DISTRICT_STAT_COLL.save(o)
|
||||
}
|
||||
}
|
||||
|
||||
+6
-2
@@ -62,7 +62,7 @@ class DistrictSellStatBatch extends BaseBatch {
|
||||
def calcMonthlyPrice(){
|
||||
//Ö»Óи£ÖÝʹÓÃtob¼Û¸ñ
|
||||
def citys = CommonUtils.findAllCity()
|
||||
def keys = new BasicDBObject("city", 1).append("name", 1).append("region", 1).append("estate_type2", 1)
|
||||
def keys = new BasicDBObject("city", 1).append("name", 1).append("region", 1).append("estate_type2", 1).append("status", 1)
|
||||
|
||||
def lastMonthWeekend = DateUtils.truncateDay(DateUtils.getLastSundayInWeekOfLastMonth(new Date()))
|
||||
|
||||
@@ -169,6 +169,10 @@ class DistrictSellStatBatch extends BaseBatch {
|
||||
if(lastYearPriceObj){
|
||||
yoy = DataUtil.roundDouble(((curPrice - lastYearPriceObj.avg_price)/(double)lastYearPriceObj.avg_price),4)
|
||||
}
|
||||
|
||||
if(dist.status==1){
|
||||
curPrice = 0
|
||||
}
|
||||
if(curPriceObj){
|
||||
if(curPrice!=weekendPriceObj.avg_price){
|
||||
def data = new BasicDBObject()
|
||||
@@ -232,7 +236,7 @@ class DistrictSellStatBatch extends BaseBatch {
|
||||
def priceMap = [:]
|
||||
for(def d : dbcursor){
|
||||
if(city == "¸£ÖÝ"){
|
||||
if(d.avg_price_2b){
|
||||
if(d.avg_price_2b && d.value_type!=1){
|
||||
d.avg_price = d.avg_price_2b
|
||||
}
|
||||
}
|
||||
|
||||
@@ -239,7 +239,10 @@ def findThirdPrice(city, region, name, AVERAGE_STATISTICS){
|
||||
def files = CommonDatautils.getAllFiles("D:\\数据\\福州\\原始数据")
|
||||
if(files){
|
||||
for(def filepath : files){
|
||||
def rets = read(filepath);
|
||||
def filename = filepath.getPath()
|
||||
def rets = read(filename);
|
||||
def date = filename.substring(filename.toString().lastIndexOf("_")+1, filename.toString().indexOf("."))
|
||||
println date +" "+rets.size()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ import com.mongodb.DBCollection
|
||||
//福州第三方均价统计,发送钉钉消息
|
||||
//def datas = ExcelUtils.read("d:\\数据\\福州\\福州4月2.xlsx",0,1)
|
||||
//def datas = CsvUtils.read("d:\\数据\\福州\\FJW_THIRD_PARTY_AVG_PRICE_202105.csv");
|
||||
def datas = readTxt("d:\\数据\\福州\\FJW_THIRD_PARTY_AVG_PRICE_202305.csv")
|
||||
def datas = readTxt("d:\\数据\\福州\\FJW_THIRD_PARTY_AVG_PRICE_202306.csv")
|
||||
def count0 = 0
|
||||
def count1 = 0
|
||||
def count2 = 0
|
||||
|
||||
@@ -295,6 +295,23 @@ class FiledStrand {
|
||||
return null
|
||||
}
|
||||
|
||||
static def processEstateType(estateType){
|
||||
if(estateType){
|
||||
if(estateType.contains("纯写字楼") || estateType.contains("商务中心")){
|
||||
return "标准写字楼"
|
||||
}else if(estateType.contains("SOHO") || estateType.contains("商住") || estateType.contains("商用") || estateType.contains("LOFT") || estateType.contains("酒店")){
|
||||
return "商住两用"
|
||||
}else if(estateType.contains("园区")){
|
||||
return "创意园区"
|
||||
}else if(estateType.contains("综合体")){
|
||||
return "综合体"
|
||||
}else{
|
||||
return "其他"
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
static def processStandardArea(area){
|
||||
if(area){
|
||||
area = area.toString().replace("ŁŹ",",").replace("ŠO", "").replace("m", "").replace("/","")
|
||||
@@ -684,7 +701,7 @@ class FiledStrand {
|
||||
}else{
|
||||
return null;
|
||||
}
|
||||
}else if(estateType2=="д×ÖÂ¥"){
|
||||
}else if(estateType2=="写字楼" || estateType2=="office"){
|
||||
if(estateCharege>=0.35 && estateCharege<=60){
|
||||
return estateCharege;
|
||||
}else{
|
||||
|
||||
+2
-2
@@ -48,11 +48,11 @@ class YouDaDataParser {
|
||||
def final AtomicInteger count_ = new AtomicInteger(0)
|
||||
|
||||
|
||||
static def statDate = "2023-05-01"
|
||||
static def statDate = "2023-06-01"
|
||||
static main(args) {
|
||||
def task = new YouDaDataParser();
|
||||
// task.newHouseparse();//友达一手房存入mongo
|
||||
// task.esfParser("D:\\数据\\友达\\2023年6月\\查询1.DBF");//友达二手房存入mongo
|
||||
// task.esfParser("D:\\数据\\友达\\2023年7月\\查询1.DBF");//友达二手房存入mongo
|
||||
// task.newhouseToSaveEs();//新房保存到es
|
||||
task.esfhouseToSaveEs();//二手房保存到es
|
||||
// task.updateFinishDateByEsfTrade();//根据二手成交的竣工时间修改seaweed库中的竣工时间
|
||||
|
||||
+4
-4
@@ -435,7 +435,7 @@ class OfficeProcess {
|
||||
pstmt.setString(5, d.source)
|
||||
println count+" "+d.city+" "+d.name
|
||||
pstmt.addBatch()
|
||||
if(count % 1 ==0) {
|
||||
if(count % 100 ==0) {
|
||||
try {
|
||||
pstmt.executeBatch()
|
||||
} catch (Exception e) {
|
||||
@@ -480,7 +480,7 @@ class OfficeProcess {
|
||||
}
|
||||
|
||||
def checkRegion(){
|
||||
def citys = ["杭州","苏州"]//"上海","深圳","北京","广州","重庆","成都",
|
||||
def citys = ["上海"]//"上海","深圳","北京","广州","重庆","成都",
|
||||
for(def city : citys){
|
||||
def regionPointsMap = findRegionRange(city)
|
||||
def addDatas = findAddDatasByClickhouse(city)
|
||||
@@ -492,7 +492,7 @@ class OfficeProcess {
|
||||
if(data.lng){
|
||||
def flag = isInArea(data.lng.toString().toDouble(), data.lat.toString().toDouble(), regionPointsMap.get(data.region))
|
||||
def mark = flag?'T':'F'
|
||||
// rets << ["city":data.city, "region":data.region, "name":data.name, "source":data.source, "flag":mark]
|
||||
rets << ["city":data.city, "region":data.region, "name":data.name, "source":data.source, "flag":mark]
|
||||
updateOption(data.city, data.region, data.name, data.source, mark)
|
||||
println index+" "+data.region + " "+data.name+" "+ flag
|
||||
}
|
||||
@@ -502,7 +502,7 @@ class OfficeProcess {
|
||||
}
|
||||
|
||||
def findAddDatasByClickhouse(city){
|
||||
def sql = "select city,region, name,option,lng,lat,source from office where city='${city}' and option like '%添加%'"
|
||||
def sql = "select city,region, name,option,lng,lat,source from office where city='${city}' and region_fence is null"
|
||||
def datas = []
|
||||
sqlInstance.eachRow(sql, {r->
|
||||
datas << ["city":r.city,"region":r.region,"name":r.name, "lat":r.lat, "lng":r.lng, "option":r.option,"source":r.source]
|
||||
|
||||
+21
-7
@@ -36,10 +36,10 @@ class OfficeFieldCleanBatch extends BaseBatch{
|
||||
"virescence_percent":"greening_rate","cubage_percent":"plot_ratio","build_area":"build_area","all_area":"land_area"
|
||||
,"finish_building_date":"finish_building_date","property_life":"property_life","standard_area":"standard_area","total_floor":"total_floor",
|
||||
"standard_height":"floor_height", "real_use_percent":"room_rate", "loop_line_info":"ring_location","car_site_count":"parking",
|
||||
"parking_fee":"car_fee","elevators_count":"elevator_num","bay_area":"open_area"]//key:seaweed表字段 value:es表字段
|
||||
"parking_fee":"car_fee","elevators_count":"elevator_num","bay_area":"open_area","estate_type2":"property_type"]//key:seaweed表字段 value:es表字段
|
||||
|
||||
//"安居客":"安居客app",
|
||||
def sourceMap = ["房天下":"房天下","楼盘网":"楼盘网","办办网":"办办网","点点租":"点点租"]
|
||||
//
|
||||
def sourceMap = ["安居客":"安居客app","房天下":"房天下","楼盘网":"楼盘网","办办网":"办办网","点点租":"点点租"]
|
||||
|
||||
def fieldMap = ["编号":"_id","城市":"city","区域":"region","名称":"name","别名":"alias","租金":"rent_price","板块":"block","物业公司":"estate_company","物业费":"estate_charge",
|
||||
"地址":"address","地址别名":"addr_alias","经度":"lng","纬度":"lat","类型":"estate_type2","建筑面积":"build_area","等级":"bed_kind",
|
||||
@@ -120,7 +120,7 @@ class OfficeFieldCleanBatch extends BaseBatch{
|
||||
}
|
||||
|
||||
def test(){
|
||||
def datas = ExcelUtils.read("D:\\数据\\写字楼\\写字楼价格租金.xlsx",0 , 1)
|
||||
def datas = ExcelUtils.read("D:\\数据\\写字楼\\写字楼价格(1).xlsx",0 , 1)
|
||||
def map = [:]
|
||||
for(def d : datas){
|
||||
map.put(d['A']+"#"+d['B']+'#'+d['C'], d)
|
||||
@@ -214,7 +214,7 @@ class OfficeFieldCleanBatch extends BaseBatch{
|
||||
|
||||
// if(o.estate_charge && !o.estate_charge.isNumber()){
|
||||
//// def val = o.estate_charge.toString().toDouble()
|
||||
//// if(val>40 || val < 0.01){
|
||||
//// if(val>60 || val < 0.35){
|
||||
//// println val
|
||||
// udata.put("estate_charge", null)
|
||||
//// }
|
||||
@@ -478,7 +478,12 @@ class OfficeFieldCleanBatch extends BaseBatch{
|
||||
if(esVal){
|
||||
def newVal = null
|
||||
if(seaweedfield == "estate_charge"){
|
||||
newVal = FiledStrand.processEstateCharge(c, FiledStrand.getNumber(esVal), dist.estate_type2)
|
||||
if(dist.cat == "office"){
|
||||
newVal = FiledStrand.processEstateCharge(c, FiledStrand.getNumber(esVal), "office")
|
||||
}else{
|
||||
newVal = FiledStrand.processEstateCharge(c, FiledStrand.getNumber(esVal), dist.estate_type2)
|
||||
}
|
||||
|
||||
newVal = newVal.toString()
|
||||
}
|
||||
if(seaweedfield == "build_date" || seaweedfield == "live_date"){
|
||||
@@ -532,7 +537,12 @@ class OfficeFieldCleanBatch extends BaseBatch{
|
||||
}
|
||||
|
||||
if(seaweedfield == "build_type"){
|
||||
newVal = FiledStrand.processBuildType(esVal, dist.estate_type2)
|
||||
if(dist.cat == "office") {
|
||||
newVal = FiledStrand.processBuildType(esVal, "office")
|
||||
}else{
|
||||
newVal = FiledStrand.processBuildType(esVal, dist.estate_type2)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(seaweedfield == "land_property"){
|
||||
@@ -570,6 +580,10 @@ class OfficeFieldCleanBatch extends BaseBatch{
|
||||
newVal = esVal
|
||||
}
|
||||
|
||||
if(seaweedfield == "estate_type2"){
|
||||
newVal = FiledStrand.processEstateType(esVal)
|
||||
}
|
||||
|
||||
if(newVal){
|
||||
newValues.put(seaweedfield, newVal)
|
||||
}
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ class RemoveHouse extends BaseBatch{
|
||||
def rets = []
|
||||
for(def d : dbcursor){
|
||||
rets << d._id
|
||||
if(rets.size()==200){
|
||||
if(rets.size()==50){
|
||||
def delquery = new BasicDBObject()
|
||||
delquery.put("_id", new BasicDBObject('$in', rets))
|
||||
SEABIRD_COLL.remove(delquery)
|
||||
|
||||
+14
-8
@@ -33,7 +33,7 @@ public class BeiKeCrawlByChrome {
|
||||
def DBCollection thirdPartyColl = CrawalDBUtil.getThirdPartyCol();
|
||||
def lineUrl = "mongodb://developer:G00IDCDEV12385@192.168.0.43:28017";
|
||||
DBCollection DEAL_PRICE_COLL = MongoUtils.getCollectionByName2("fangjia", "deal_price", lineUrl)
|
||||
def startMonth = DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyy-MM"), -2, "yyyy-MM")
|
||||
def startMonth = DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyy-MM"), -1, "yyyy-MM")
|
||||
|
||||
|
||||
//广州,佛山 重庆
|
||||
@@ -207,9 +207,10 @@ public class BeiKeCrawlByChrome {
|
||||
|
||||
if (!dbo) {
|
||||
parse(city, e, region, driver, null)
|
||||
}else if(dbo && !dbo.lift){
|
||||
parse(city, e, region, driver, dbo._id)
|
||||
}
|
||||
// else if(dbo && !dbo.lift){
|
||||
// parse(city, e, region, driver, dbo._id)
|
||||
// }
|
||||
}else{
|
||||
stop = true;
|
||||
break;
|
||||
@@ -295,7 +296,10 @@ public class BeiKeCrawlByChrome {
|
||||
def detailDiv1 = JQueryUtils.select(".introContent .base", detailDoc)
|
||||
def detailDiv2 = JQueryUtils.select(".introContent .transaction", detailDoc)
|
||||
|
||||
def liftStr = detailDiv1.select("li:contains(梯户比例)").text().replace("梯户比例","")
|
||||
def liftStr = null;
|
||||
if(detailDiv1){
|
||||
liftStr = detailDiv1.select("li:contains(ÌÝ»§±ÈÀý)").text().replace("ÌÝ»§±ÈÀý","")
|
||||
}
|
||||
if(liftStr){
|
||||
detail.lift = DataFormatUtils.parseLift(liftStr)
|
||||
detail.lift_household = DataFormatUtils.parseHousehold(liftStr)
|
||||
@@ -465,9 +469,9 @@ public class BeiKeCrawlByChrome {
|
||||
if(cityEles){
|
||||
for(def e : cityEles){
|
||||
def href = "https:"+e.attr("href")
|
||||
if (citys.contains(e.text())){
|
||||
// if (citys.contains(e.text())){
|
||||
list << [e.text(), href]
|
||||
}
|
||||
// }
|
||||
}
|
||||
}
|
||||
return list
|
||||
@@ -490,9 +494,11 @@ public class BeiKeCrawlByChrome {
|
||||
WebElement btn = driver.findElement(By.cssSelector("button[class='ant-btn btn-login ant-btn-primary']")); //获取点击登陆按钮。
|
||||
|
||||
|
||||
elemUsername.sendKeys("15021384995");
|
||||
// elemUsername.sendKeys("15021384995");
|
||||
// elemPassword.sendKeys("12qwaszx");
|
||||
|
||||
elemPassword.sendKeys("12qwaszx");
|
||||
elemUsername.sendKeys("16283166371");
|
||||
elemPassword.sendKeys("Goojia123456");
|
||||
|
||||
btn.submit(); // 点击行为;
|
||||
Thread.sleep(10000)
|
||||
|
||||
+6
-5
@@ -33,7 +33,7 @@ public class LianjiaCrawlByChrome {
|
||||
def DBCollection thirdPartyColl = CrawalDBUtil.getThirdPartyCol();
|
||||
def lineUrl = "mongodb://developer:G00IDCDEV12385@192.168.0.43:28017";
|
||||
DBCollection DEAL_PRICE_COLL = MongoUtils.getCollectionByName2("fangjia", "deal_price", lineUrl)
|
||||
def startMonth = DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyy-MM"), -2, "yyyy-MM")
|
||||
def startMonth = DateUtils.addMonth(DateUtils.formatDateByPattern(new Date(), "yyyy-MM"), -1, "yyyy-MM")
|
||||
|
||||
static main(args) {
|
||||
def task = new LianjiaCrawlByChrome();
|
||||
@@ -304,9 +304,10 @@ public class LianjiaCrawlByChrome {
|
||||
def dbo = findTrade(durl , "Á´¼ÒÔÚÏß")
|
||||
if (!dbo) {
|
||||
parse(city, e, regionText, driver, null)
|
||||
}else if(dbo && !dbo.lift){
|
||||
parse(city, e, regionText, driver, dbo._id)
|
||||
}
|
||||
// else if(dbo && !dbo.lift){
|
||||
// parse(city, e, regionText, driver, dbo._id)
|
||||
// }
|
||||
}else{
|
||||
stop = true;
|
||||
break;
|
||||
@@ -353,7 +354,7 @@ public class LianjiaCrawlByChrome {
|
||||
detail.region = RegionData.formatRegion(city, detail.region)
|
||||
}
|
||||
if(!detail.region){
|
||||
def str = detailDoc.toString().substring(detailDoc.toString().indexOf("resblockPosition")+1, detailDoc.toString().size()-1)
|
||||
def str = detailDoc.toString().substring(detailDoc.toString().indexOf("resblockPosition")+18, detailDoc.toString().size()-1)
|
||||
str = str.substring(0, str.indexOf("',"))
|
||||
def locArrs = str.split(",")
|
||||
def gmap = GeocodeUtils.geoconvBaiduToGoogle(locArrs[0].toString().toDouble(), locArrs[1].toString().toDouble())
|
||||
@@ -570,7 +571,7 @@ public class LianjiaCrawlByChrome {
|
||||
if(cityEles){
|
||||
for(def e : cityEles) {
|
||||
def href = e.attr("href")
|
||||
if (!href.contains("fang.lianjia") && citys.contains(e.text())){
|
||||
if (!href.contains("fang.lianjia")){
|
||||
cityList << [e.text(), href]
|
||||
}
|
||||
}
|
||||
|
||||
+10
-9
@@ -65,7 +65,7 @@ class DataStandardBatch extends BaseBatch{
|
||||
def static final statusMap = ["城市未匹配":1,"区域未匹配":2,"小区匹配失败":3,"小区匹配成功":4,"异常错误":5, "无价格":6, "无名称":7]
|
||||
|
||||
def static final websites = ["房估估","诸葛找房","安居客","搜房","中原地产","赶集", "链家","兔博士","城市房产","贝壳找房","Q房","Q房(新)","中原地产(新)","我爱我家","麦田","房途","C21","乐居","房产超市","58同城","365淘房","吉屋"]
|
||||
public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(20)
|
||||
public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(10)
|
||||
static {
|
||||
thirdPartyColl = CrawalDBUtil.getThirdPartyCol();
|
||||
matchErrorLogColl = CrawalDBUtil.getMatchErrorLogCol();
|
||||
@@ -92,7 +92,7 @@ class DataStandardBatch extends BaseBatch{
|
||||
|
||||
cityMap.each{city,alias->
|
||||
println "开始加载【${city}】"
|
||||
// if(city == "¹ãÖÝ"){
|
||||
// if(city == "ʯ¼Òׯ"){
|
||||
def detailMap = CommonDatautils.findAllCityDistrictNameAndAlias(city, "district", ["city","region","name","address","alias","addr_alias","mapping_alias","estate_type2"])
|
||||
districtMap.putAll(detailMap)
|
||||
// }
|
||||
@@ -159,6 +159,7 @@ class DataStandardBatch extends BaseBatch{
|
||||
|
||||
count++;
|
||||
}catch (Exception e){
|
||||
e.printStackTrace()
|
||||
println "处理:【${dbo.city}-${dbo.region}-${dbo.name}-${dbo.address}】发生异常,异常信息为:"+e.getMessage()
|
||||
|
||||
}finally {
|
||||
@@ -457,13 +458,13 @@ class DataStandardBatch extends BaseBatch{
|
||||
|
||||
def addr = null;
|
||||
if(data.address){
|
||||
try{
|
||||
addr = DataUtil.formateAddress(data.city, data.address)
|
||||
}catch (Exception e){
|
||||
addr = data.address;
|
||||
}
|
||||
// try{
|
||||
// addr = DataUtil.formateAddress(data.city, data.address)
|
||||
// }catch (Exception e){
|
||||
// addr = data.address;
|
||||
// }
|
||||
def copyObj = data
|
||||
copyObj.address = addr
|
||||
// copyObj.address = addr
|
||||
district = getMatchAddressFromMap(copyObj)
|
||||
if(district){
|
||||
type = 8;
|
||||
@@ -835,7 +836,7 @@ class DataStandardBatch extends BaseBatch{
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!dbo && isStandardRoad(copyObj.address)){
|
||||
if(!dbo && copyObj.address && isStandardRoad(copyObj.address)){
|
||||
result = findAddrAliasFromMap(copyObj.city, copyObj.region, copyObj.address);
|
||||
if(result.size()==1){
|
||||
dbo = result[0];
|
||||
|
||||
Reference in New Issue
Block a user