更新服务地址
This commit is contained in:
@@ -11,7 +11,7 @@ public interface Constants {
|
||||
String SEABIRD_MONGO_URI = "mongodb://192.168.0.74:57007";
|
||||
/** 线下归档数据库*/
|
||||
String SEAWATER_MONGO_URI = "mongodb://root:Goojia%40206!!#@192.168.0.206:27020";
|
||||
String MSVC_FANG_JIA_DATA_SERVICE_BASE_PATH ="http://192.168.0.100:38080/FangJiaDataService";
|
||||
String MSVC_FANG_JIA_DATA_SERVICE_BASE_PATH ="http://192.168.0.80:38080/FangJiaDataService";
|
||||
/** OpenApi测试账户生成的超级Token*/
|
||||
String SUPER_USER_TOKEN = "F54F52381C49BB9EB4A33EB1B65604AE4B71A28AEE53518A94A2F360408B9056D57553931D15CE6DDE765562DAD286BA38E05A4CDAFC51C3D527A4959BF8E75A3B95DB7108FCEA340DDE61925616DB55118E1851E67D83EAD800460D100D6B667A4ED8EE67C8F7FB";
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.apache.http.util.EntityUtils;
|
||||
public class AddressLatlng {
|
||||
|
||||
static List<String> PROXY_HOSTS = Arrays.asList("192.168.0.98", "192.168.0.102", "192.168.0.96", "192.168.0.101",
|
||||
"192.168.0.103", "192.168.0.90", "192.168.0.93", "192.168.0.99", "192.168.0.94", "192.168.0.100");
|
||||
"192.168.0.103", "192.168.0.90", "192.168.0.93", "192.168.0.99", "192.168.0.94", "192.168.0.80");
|
||||
// static int PROXY_USE_COUNT=0;
|
||||
static AtomicInteger PROXY_USE_COUNT = new AtomicInteger();
|
||||
static String AK = "FwGZrRTgZCqsKugHIRNgMwGF";
|
||||
|
||||
+38
-38
@@ -86,7 +86,7 @@ public class AddrSvcController {
|
||||
params.put("address", model.getAddress());
|
||||
params.put("addressAssessment", "true");
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/formatNinelevel", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/formatNinelevel", params, "UTF-8");
|
||||
if (json != null) {
|
||||
int code = json.getInt("status");
|
||||
String msg = json.getString("msg");
|
||||
@@ -127,7 +127,7 @@ public class AddrSvcController {
|
||||
params.put("city", model.getCity());
|
||||
params.put("address", model.getAddress());
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/villageIdentify", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/villageIdentify", params, "UTF-8");
|
||||
if (json != null) {
|
||||
int code = json.getInt("status");
|
||||
String msg = json.getString("msg");
|
||||
@@ -179,7 +179,7 @@ public class AddrSvcController {
|
||||
params.put("city", model.getCity());
|
||||
params.put("address", model.getAddress());
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/structureAndComplete", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/structureAndComplete", params, "UTF-8");
|
||||
if (json != null) {
|
||||
int code = json.getInt("status") == 0 ? 200 : 0;
|
||||
String msg = json.getString("msg");
|
||||
@@ -235,7 +235,7 @@ public class AddrSvcController {
|
||||
params.put("city", model.getCity());
|
||||
params.put("address", model.getAddress());
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/addrVerify", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/addrVerify", params, "UTF-8");
|
||||
if (json != null) {
|
||||
int code = json.getInt("status");
|
||||
String msg = json.getString("msg");
|
||||
@@ -274,7 +274,7 @@ public class AddrSvcController {
|
||||
params.put("district", model.getSuggestDistrict());
|
||||
try {
|
||||
//新匹配接口
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaNlpService/match", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaNlpService/match", params, "UTF-8");
|
||||
BasicModel basicModel = new BasicModel(200, "ok");
|
||||
if (json != null && json.size() > 0) {
|
||||
// 非超级用户不返回置信度
|
||||
@@ -318,7 +318,7 @@ public class AddrSvcController {
|
||||
params.put("page", "0");
|
||||
params.put("offset", String.valueOf(model.getMax() == 0 ? 10 : (model.getMax() > 100 ? 100 : model.getMax())));
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/v2/addressAssociation", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/v2/addressAssociation", params, "UTF-8");
|
||||
if (json != null) {
|
||||
int code = json.getInt("msgCode");
|
||||
String msg = json.getString("msg");
|
||||
@@ -358,7 +358,7 @@ public class AddrSvcController {
|
||||
params.put("city", StringUtils.isNotBlank(model.getCity()) ? model.getCity() : "");
|
||||
params.put("max", model.getMax() != 0 ? String.valueOf(model.getMax()) : "");
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/tips", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/tips", params, "UTF-8");
|
||||
if (json != null) {
|
||||
int code = json.getInt("msgCode");
|
||||
String msg = json.getString("msg");
|
||||
@@ -397,7 +397,7 @@ public class AddrSvcController {
|
||||
// params.put("district", model.getSuggestDistrict());//接口没有此参数
|
||||
try {
|
||||
//新匹配接口
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaNlpService/match", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaNlpService/match", params, "UTF-8");
|
||||
BasicModel basicModel = new BasicModel(200, "ok");
|
||||
if (json != null && json.size() > 0) {
|
||||
MatchedBuildingDto dto = new MatchedBuildingDto();
|
||||
@@ -458,10 +458,10 @@ public class AddrSvcController {
|
||||
params.put("complete", "true");
|
||||
params.put("addressAssessment", "true");
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/v3/structure", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/v3/structure", params, "UTF-8");
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/v3/structure", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/v3/structure", params, "UTF-8");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
@@ -500,10 +500,10 @@ public class AddrSvcController {
|
||||
params.put("city", StringUtils.isNotBlank(model.getCity()) ? model.getCity() : null);
|
||||
params.put("address", model.getAddress());
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaDataService/valueRate", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaDataService/valueRate", params, "UTF-8");
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaDataService/valueRate", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaDataService/valueRate", params, "UTF-8");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
@@ -560,10 +560,10 @@ public class AddrSvcController {
|
||||
String type = StringUtils.isNotBlank(model.getType()) ? model.getType() : null;
|
||||
params.put("type", type);
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/v6/villageIdentify", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/v6/villageIdentify", params, "UTF-8");
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/v6/villageIdentify", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/v6/villageIdentify", params, "UTF-8");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
@@ -711,10 +711,10 @@ public class AddrSvcController {
|
||||
String type = StringUtils.isNotBlank(model.getType()) ? model.getType() : null;
|
||||
params.put("type", type);
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/shzxVillageIdentify", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/shzxVillageIdentify", params, "UTF-8");
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/shzxVillageIdentify", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/shzxVillageIdentify", params, "UTF-8");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
@@ -813,10 +813,10 @@ public class AddrSvcController {
|
||||
String address = model.getAddress();
|
||||
params.put("address", address);
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/boscEnterpriseVillageIdentify", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/boscEnterpriseVillageIdentify", params, "UTF-8");
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/boscEnterpriseVillageIdentify", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/boscEnterpriseVillageIdentify", params, "UTF-8");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
@@ -992,10 +992,10 @@ public class AddrSvcController {
|
||||
Integer radius = model.getRadius();
|
||||
params.put("radius", (radius != null && radius != 0) ? radius.toString() : null);
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/residentialVillageIdentify", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/residentialVillageIdentify", params, "UTF-8");
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/residentialVillageIdentify", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/residentialVillageIdentify", params, "UTF-8");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
@@ -1115,10 +1115,10 @@ public class AddrSvcController {
|
||||
Integer radius = model.getRadius();
|
||||
params.put("radius", (radius != null && radius != 0) ? radius.toString() : null);
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/enterpriseVillageIdentify", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/enterpriseVillageIdentify", params, "UTF-8");
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/enterpriseVillageIdentify", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/enterpriseVillageIdentify", params, "UTF-8");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
@@ -1204,10 +1204,10 @@ public class AddrSvcController {
|
||||
Integer radius = model.getRadius();
|
||||
params.put("radius", (radius != null && radius != 0) ? radius.toString() : null);
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/villageIdentify", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/villageIdentify", params, "UTF-8");
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/villageIdentify", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/villageIdentify", params, "UTF-8");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
@@ -1364,10 +1364,10 @@ public class AddrSvcController {
|
||||
Integer radius = model.getRadius();
|
||||
params.put("radius", (radius != null && radius != 0) ? radius.toString() : null);
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/villageIdentify", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/villageIdentify", params, "UTF-8");
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/villageIdentify", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/villageIdentify", params, "UTF-8");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
@@ -1416,10 +1416,10 @@ public class AddrSvcController {
|
||||
Integer radius = model.getRadius();
|
||||
params.put("radius", (radius != null && radius != 0) ? radius.toString() : null);
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/v2/addressAssociation", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/v2/addressAssociation", params, "UTF-8");
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/v2/addressAssociation", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/v2/addressAssociation", params, "UTF-8");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
@@ -1452,10 +1452,10 @@ public class AddrSvcController {
|
||||
Map<String, String> params = new HashMap<String, String>();
|
||||
params.put("province", StringUtils.isNotBlank(model.getProvince()) ? model.getProvince() : null);
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/listCity", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/listCity", params, "UTF-8");
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/listCity", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/listCity", params, "UTF-8");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
@@ -1510,10 +1510,10 @@ public class AddrSvcController {
|
||||
HttpRequest request = new HttpRequest();
|
||||
JSONObject json = null;
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/listProvince", null, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/listProvince", null, "UTF-8");
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/listProvince", null, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/listProvince", null, "UTF-8");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
@@ -1565,10 +1565,10 @@ public class AddrSvcController {
|
||||
params.put("province", StringUtils.isNotBlank(model.getProvince()) ? model.getProvince() : null);
|
||||
params.put("city", StringUtils.isNotBlank(model.getCity()) ? model.getCity() : null);
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/listDistrict", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/listDistrict", params, "UTF-8");
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/listDistrict", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/listDistrict", params, "UTF-8");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
@@ -1627,10 +1627,10 @@ public class AddrSvcController {
|
||||
params.put("city", StringUtils.isNotBlank(model.getCity()) ? model.getCity() : null);
|
||||
params.put("district", StringUtils.isNotBlank(model.getDistrict()) ? model.getDistrict() : null);
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/listTownship", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/listTownship", params, "UTF-8");
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/listTownship", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/listTownship", params, "UTF-8");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
@@ -1695,10 +1695,10 @@ public class AddrSvcController {
|
||||
params.put("city", StringUtils.isNotBlank(model.getCity()) ? model.getCity() : null);
|
||||
params.put("address", StringUtils.isNotBlank(model.getAddress()) ? model.getAddress() : null);
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/addrLevel", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/addrLevel", params, "UTF-8");
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/addrLevel", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/addrLevel", params, "UTF-8");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
+15
-15
@@ -1840,10 +1840,10 @@ public class AddressController {
|
||||
params.put("address", model.getAddress());
|
||||
params.put("showCode", model.getShowCode());
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/structure", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/structure", params, "UTF-8");
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/structure", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/structure", params, "UTF-8");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
@@ -1878,10 +1878,10 @@ public class AddressController {
|
||||
params.put("city", StringUtils.isNotBlank(model.getCity()) ? model.getCity() : CONFIG.getDefaultCity());
|
||||
params.put("address", model.getAddress());
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/cmbTest", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/cmbTest", params, "UTF-8");
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/cmbTest", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/cmbTest", params, "UTF-8");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
@@ -1923,10 +1923,10 @@ public class AddressController {
|
||||
// 地址验证无效也输出标准化结果
|
||||
params.put("flag", "true");
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/fiveDivisionStructure", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/fiveDivisionStructure", params, "UTF-8");
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/fiveDivisionStructure", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/fiveDivisionStructure", params, "UTF-8");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
@@ -1968,10 +1968,10 @@ public class AddressController {
|
||||
// 地址验证无效也输出标准化结果
|
||||
params.put("flag", "true");
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/fiveDivisionStructure/v2", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/fiveDivisionStructure/v2", params, "UTF-8");
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/fiveDivisionStructure/v2", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/fiveDivisionStructure/v2", params, "UTF-8");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
@@ -2014,10 +2014,10 @@ public class AddressController {
|
||||
// 地址验证无效也输出标准化结果
|
||||
params.put("flag", "true");
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/divisionStructure", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/divisionStructure", params, "UTF-8");
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/divisionStructure", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/divisionStructure", params, "UTF-8");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
@@ -2059,10 +2059,10 @@ public class AddressController {
|
||||
// 地址验证无效也输出标准化结果
|
||||
params.put("flag", "true");
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/structureAndComplete", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/structureAndComplete", params, "UTF-8");
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/structureAndComplete", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/structureAndComplete", params, "UTF-8");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
@@ -2111,7 +2111,7 @@ public class AddressController {
|
||||
reqBody.put("memo", model.getMemo());
|
||||
reqBody.put("seaweedId", model.getId());
|
||||
|
||||
String result = request.postWithBody("http://192.168.0.100:32080/FangJiaAddressService/communitySummary", reqBody, headers, "UTF-8");
|
||||
String result = request.postWithBody("http://192.168.0.80:32080/FangJiaAddressService/communitySummary", reqBody, headers, "UTF-8");
|
||||
if (result != null) {
|
||||
try {
|
||||
json = JSONObject.fromObject(result);
|
||||
@@ -2224,7 +2224,7 @@ public class AddressController {
|
||||
reqBody.put("maxFloor", model.getMaxFloor());
|
||||
reqBody.put("housePurpose", model.getHousePurpose());
|
||||
reqBody.put("memo", model.getMemo());
|
||||
String result = request.postWithBody("http://192.168.0.100:32080/FangJiaAddressService/buildingRating", reqBody, headers, "UTF-8");
|
||||
String result = request.postWithBody("http://192.168.0.80:32080/FangJiaAddressService/buildingRating", reqBody, headers, "UTF-8");
|
||||
if (result != null) {
|
||||
try {
|
||||
json = JSONObject.fromObject(result);
|
||||
@@ -2279,7 +2279,7 @@ public class AddressController {
|
||||
reqBody.put("housePurpose", model.getHousePurpose());
|
||||
reqBody.put("memo", model.getMemo());
|
||||
reqBody.put("showOther", false);
|
||||
String result = request.postWithBody("http://192.168.0.100:32080/FangJiaAddressService/financialRating", reqBody, headers, "UTF-8");
|
||||
String result = request.postWithBody("http://192.168.0.80:32080/FangJiaAddressService/financialRating", reqBody, headers, "UTF-8");
|
||||
if (result != null) {
|
||||
try {
|
||||
json = JSONObject.fromObject(result);
|
||||
|
||||
+2
-2
@@ -244,10 +244,10 @@ public class AuctionController {
|
||||
params.put("city", city);
|
||||
params.put("address", address);
|
||||
try{
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/structure", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/structure", params, "UTF-8");
|
||||
} catch(Exception e){
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/structure", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/structure", params, "UTF-8");
|
||||
} catch(Exception ex){
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
+2
-2
@@ -544,10 +544,10 @@ public class CommercialController {
|
||||
}
|
||||
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:30020"+ uri, params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:30020"+ uri, params, "UTF-8");
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:30020"+ uri, params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:30020"+ uri, params, "UTF-8");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
+1
-1
@@ -283,7 +283,7 @@ public class ComprehensiveQueryController {
|
||||
// param.put("location", location);
|
||||
// param.put("area", String.valueOf(model.getSize()));
|
||||
// try {
|
||||
// jsonResult = httpRequest.getJsonContent("http://192.168.0.100:30020/avmWeb/avmAnn", param, "UTF-8");
|
||||
// jsonResult = httpRequest.getJsonContent("http://192.168.0.80:30020/avmWeb/avmAnn", param, "UTF-8");
|
||||
// if (jsonResult.containsKey("msg") && "成功".equals(jsonResult.getString("msg"))) {
|
||||
// HashMap<String, Object> resultMap = new HashMap<String, Object>();
|
||||
// resultMap.put("avgPrice", jsonResult.getString("unitPrice"));
|
||||
|
||||
+1
-1
@@ -1316,7 +1316,7 @@ public class DistrictController {
|
||||
params.put("address", address);
|
||||
params.put("category", "property");
|
||||
//新匹配接口
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaNlpService/match", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaNlpService/match", params, "UTF-8");
|
||||
District property = null;
|
||||
if (json != null && json.size() > 0) {
|
||||
MatchedBuildingDto dto = CommonDtoUtils.transformV(MatchedBuildingDto.class, json);
|
||||
|
||||
+2
-2
@@ -89,10 +89,10 @@ public class GdBankController {
|
||||
params.put("city", StringUtils.isNotBlank(model.getCity()) ? model.getCity() : null);
|
||||
params.put("address", model.getAddress());
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/cebEnterpriseVillageIdentify", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/cebEnterpriseVillageIdentify", params, "UTF-8");
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/cebEnterpriseVillageIdentify", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/cebEnterpriseVillageIdentify", params, "UTF-8");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
+1
-1
@@ -369,7 +369,7 @@ public class HouseController {
|
||||
params.put("address", address);
|
||||
params.put("category", "property");
|
||||
//新匹配接口
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaNlpService/match", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaNlpService/match", params, "UTF-8");
|
||||
if (json != null && json.size() > 0) {
|
||||
MatchedBuildingDto dto = CommonDtoUtils.transformV(MatchedBuildingDto.class, json);
|
||||
District property = districtService.findByNameAndAlias(dto.getCity(), dto.getDistrict(), dto.getName(), cat);
|
||||
|
||||
+2
-2
@@ -35,10 +35,10 @@ public class MeishubaoController {
|
||||
params.put("city", model.getCity());
|
||||
params.put("address", model.getAddress());
|
||||
try{
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/meishubao/financialRating", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/meishubao/financialRating", params, "UTF-8");
|
||||
} catch(Exception e){
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/meishubao/financialRating", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/meishubao/financialRating", params, "UTF-8");
|
||||
} catch(Exception ex){
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -251,10 +251,10 @@ public class PoiController {
|
||||
params.put("page", page.toString());
|
||||
}
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/poi/search", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/poi/search", params, "UTF-8");
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/poi/search", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/poi/search", params, "UTF-8");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
+1
-1
@@ -1776,7 +1776,7 @@ public class PropertyController {
|
||||
param.put("location", location);
|
||||
param.put("area", String.valueOf(model.getSize()));
|
||||
try {
|
||||
json = httpRequest.getJsonContent("http://192.168.0.100:30020/avmWeb/avmAnn", param, "UTF-8");
|
||||
json = httpRequest.getJsonContent("http://192.168.0.80:30020/avmWeb/avmAnn", param, "UTF-8");
|
||||
if (json.containsKey("msg") && "成功".equals(json.getString("msg"))) {
|
||||
HashMap<String, Long> resultMap = new HashMap<String, Long>();
|
||||
Long totalPrice = getRatioPrice(request, Long.valueOf(json.getString("totalPrice")));
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ class InvokeHttpRequest {
|
||||
// "192.168.0.90",
|
||||
// "192.168.0.93",
|
||||
// "192.168.0.94",
|
||||
// "192.168.0.100"
|
||||
// "192.168.0.80"
|
||||
]
|
||||
|
||||
private final static DBCollection HTTP_DB_CONN = MongoUtils.getCollectionByName("artemis", "http_adsl", MongoUtils.MongoDB_Domain_artemis, 27017);
|
||||
|
||||
+1
-1
@@ -427,7 +427,7 @@ class CcbCommonUtils {
|
||||
rows << map
|
||||
});
|
||||
}catch(Exception e){
|
||||
sqlInstance = Sql.newInstance("jdbc:oracle:thin:@192.168.0.100:31521:orcl",
|
||||
sqlInstance = Sql.newInstance("jdbc:oracle:thin:@192.168.0.80:31521:orcl",
|
||||
"GOOJIA", "GOOJIA", "oracle.jdbc.driver.OracleDriver")
|
||||
findAllDistrictsByOracle(cityid)
|
||||
println "错误:"+e.getMessage()
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ import java.util.concurrent.atomic.AtomicLong
|
||||
import java.util.regex.*;
|
||||
|
||||
|
||||
//def sqlInstance = Sql.newInstance("jdbc:oracle:thin:@192.168.0.100:31521:orcl",
|
||||
//def sqlInstance = Sql.newInstance("jdbc:oracle:thin:@192.168.0.80:31521:orcl",
|
||||
// "GOOJIA", "GOOJIA", "oracle.jdbc.driver.OracleDriver")
|
||||
|
||||
def sqlInstance236 = Sql.newInstance("jdbc:oracle:thin:@192.168.0.236:1521:orcl",
|
||||
|
||||
+2
-2
@@ -15,10 +15,10 @@ class TestRepeat {
|
||||
|
||||
ExecutorService fixedThreadPool = Executors.newFixedThreadPool(80)
|
||||
|
||||
// def sqlInstance = Sql.newInstance("jdbc:oracle:thin:@192.168.0.100:31521:orcl",
|
||||
// def sqlInstance = Sql.newInstance("jdbc:oracle:thin:@192.168.0.80:31521:orcl",
|
||||
// "GOOJIA", "GOOJIA", "oracle.jdbc.driver.OracleDriver")
|
||||
|
||||
private DSCollection seabird = new DataStore("192.168.0.100", 37017).getCollection("fangjia.seabird")
|
||||
private DSCollection seabird = new DataStore("192.168.0.80", 37017).getCollection("fangjia.seabird")
|
||||
|
||||
static main(args) {
|
||||
def task = new TestRepeat()
|
||||
|
||||
+1
-1
@@ -27,7 +27,7 @@ def sqlInstance = Sql.newInstance("jdbc:oracle:thin:@192.168.0.236:1521:orcl",
|
||||
"GOOJIA", "GOOJIA", "oracle.jdbc.driver.OracleDriver")
|
||||
|
||||
|
||||
def ZS_MONGODB_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
def ZS_MONGODB_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
DBCollection COMMUNITY_CONN = MongoUtils.getCollectionByName2("fangjia", "community", ZS_MONGODB_URL)
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ class MatchMapData {
|
||||
|
||||
def thirdPartyColl = com.fangjia.script.thirdPriceCrawl.CrawalDBUtil.getThirdPartyCol();
|
||||
|
||||
public static final def ZS_MONGODB_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
public static final def ZS_MONGODB_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
public static final DBCollection ZS_LEVEL_CONN = MongoUtils.getCollectionByName2("fangjia", "district_analy", ZS_MONGODB_URL)
|
||||
|
||||
static main(args) {
|
||||
|
||||
+2
-2
@@ -86,7 +86,7 @@ class CommonDatautils {
|
||||
|
||||
public static final DBCollection TOWN_POLYLINECOLL = MongoUtils.getCollectionByAuth20190102("fangjia_crawl", "town_polyline")
|
||||
|
||||
public static final def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
public static final def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
public static final DBCollection SEAWEED_CONN = MongoUtils.getCollectionByName2("fangjia", "seaweed", MONGO100_URL)
|
||||
public static final DBCollection administrative_division_100_CONN = MongoUtils.getCollectionByName2("fangjia", "administrative_division", MONGO100_URL)
|
||||
|
||||
@@ -101,7 +101,7 @@ class CommonDatautils {
|
||||
FITMENTS_TYPES_MAPS.put("豪装", ["豪华装修", "高档", "豪华", "豪装", "高级装修", "高装", "奢侈"])
|
||||
}
|
||||
|
||||
public static final DBCollection COMMUNITY_CONN = MongoUtils.getCollectionByName2("fangjia", "community", "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009")
|
||||
public static final DBCollection COMMUNITY_CONN = MongoUtils.getCollectionByName2("fangjia", "community", "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009")
|
||||
public static final DBCollection ADMINISTRATIVE_MAPPING_COLL = MongoUtils.getCollectionByName("business", "administrative_mapping", "mongo.db.fangjia.com", 28017)
|
||||
public static final DBCollection OPERATION_LOG_COLL = MongoUtils.getCollectionByName("fangjia", "operation_log", "mongo.db.fangjia.com")
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ class GongShu {
|
||||
}
|
||||
|
||||
def run() {
|
||||
String path1 = "D:\\数据\\福州\\福州200个小区抽样价格核验202602.xlsx";
|
||||
String path1 = "D:\\数据\\福州\\福州200个小区抽样价格核验202603.xlsx";
|
||||
// String path1 = "D:\\数据\\福州\\价格比对_20240915.xlsx";
|
||||
String path2 = "E:\\goojia\\file\\excel文件\\福州\\福州202410小区价格.xlsx";
|
||||
// String path2 = "E:\\goojia\\file\\excel文件\\福州\\福州202410小区价格.xlsx";
|
||||
@@ -329,7 +329,7 @@ class GongShu {
|
||||
def city = "福州"
|
||||
def region = d['B']
|
||||
def name = d['C']
|
||||
def valusMap = CommonDatautils.findThirdPartyPrice(city, region, name, 202511, 202601)
|
||||
def valusMap = CommonDatautils.findThirdPartyPrice(city, region, name, 202512, 202603)
|
||||
if (valusMap) {
|
||||
def dataMap = valusMap.get(city + "##" + region + "##" + name)
|
||||
if (dataMap.get("anjuke_esf_price")) {
|
||||
|
||||
@@ -794,7 +794,7 @@ class OpenApiUtils {
|
||||
|
||||
static def addrVerifyXiameng(city, address, type){
|
||||
address = URLEncoder.encode(address, "utf-8");
|
||||
def url = "http://192.168.0.100:32080/FangJiaAddressService/v7/villageIdentify?address=${address}&type=${type}&token=F54F52381C49BB9EB4A33EB1B65604AE4B71A28AEE53518A94A2F360408B9056D57553931D15CE6DDE765562DAD286BA38E05A4CDAFC51C3D527A4959BF8E75A3B95DB7108FCEA340DDE61925616DB55118E1851E67D83EAD800460D100D6B667A4ED8EE67C8F7FB"
|
||||
def url = "http://192.168.0.80:32080/FangJiaAddressService/v7/villageIdentify?address=${address}&type=${type}&token=F54F52381C49BB9EB4A33EB1B65604AE4B71A28AEE53518A94A2F360408B9056D57553931D15CE6DDE765562DAD286BA38E05A4CDAFC51C3D527A4959BF8E75A3B95DB7108FCEA340DDE61925616DB55118E1851E67D83EAD800460D100D6B667A4ED8EE67C8F7FB"
|
||||
// def url = "http://localhost:8080/fangjia-open/addrSvc/njcbVillageIdentify?address=${address}&type=${type}&token=F54F52381C49BB9EB4A33EB1B65604AE4B71A28AEE53518A94A2F360408B9056D57553931D15CE6DDE765562DAD286BA38E05A4CDAFC51C3D527A4959BF8E75A3B95DB7108FCEA340DDE61925616DB55118E1851E67D83EAD800460D100D6B667A4ED8EE67C8F7FB"
|
||||
if(city){
|
||||
url = url + "&city=${city}"
|
||||
@@ -812,7 +812,7 @@ class OpenApiUtils {
|
||||
|
||||
static def addrVerifyShBank(city, address){
|
||||
address = URLEncoder.encode(address, "utf-8");
|
||||
def url = "http://192.168.0.100:32080/FangJiaAddressService/boscEnterpriseVillageIdentify?address=${address}&token=F54F52381C49BB9EB4A33EB1B65604AE4B71A28AEE53518A94A2F360408B9056D57553931D15CE6DDE765562DAD286BA38E05A4CDAFC51C3D527A4959BF8E75A3B95DB7108FCEA340DDE61925616DB55118E1851E67D83EAD800460D100D6B667A4ED8EE67C8F7FB"
|
||||
def url = "http://192.168.0.80:32080/FangJiaAddressService/boscEnterpriseVillageIdentify?address=${address}&token=F54F52381C49BB9EB4A33EB1B65604AE4B71A28AEE53518A94A2F360408B9056D57553931D15CE6DDE765562DAD286BA38E05A4CDAFC51C3D527A4959BF8E75A3B95DB7108FCEA340DDE61925616DB55118E1851E67D83EAD800460D100D6B667A4ED8EE67C8F7FB"
|
||||
// def url = "http://localhost:8080/fangjia-open/addrSvc/njcbVillageIdentify?address=${address}&type=${type}&token=F54F52381C49BB9EB4A33EB1B65604AE4B71A28AEE53518A94A2F360408B9056D57553931D15CE6DDE765562DAD286BA38E05A4CDAFC51C3D527A4959BF8E75A3B95DB7108FCEA340DDE61925616DB55118E1851E67D83EAD800460D100D6B667A4ED8EE67C8F7FB"
|
||||
if(city){
|
||||
url = url + "&city=${city}"
|
||||
@@ -830,7 +830,7 @@ class OpenApiUtils {
|
||||
|
||||
static def addrVerifyGuangda(city, address){
|
||||
address = URLEncoder.encode(address, "utf-8");
|
||||
def url = "http://192.168.0.100:32080/FangJiaAddressService/cebEnterpriseVillageIdentify?address=${address}"
|
||||
def url = "http://192.168.0.80:32080/FangJiaAddressService/cebEnterpriseVillageIdentify?address=${address}"
|
||||
// def url = "http://localhost:8080/FangJiaAddressService/cebEnterpriseVillageIdentify?address=${address}"
|
||||
if(city){
|
||||
url = url + "&city=${city}"
|
||||
@@ -851,7 +851,7 @@ class OpenApiUtils {
|
||||
|
||||
static def addrVerifyBase(city, address){
|
||||
address = URLEncoder.encode(address, "utf-8");
|
||||
def url = "http://192.168.0.100:32080/FangJiaAddressService/enterpriseVillageIdentify?address=${address}"
|
||||
def url = "http://192.168.0.80:32080/FangJiaAddressService/enterpriseVillageIdentify?address=${address}"
|
||||
// def url = "http://localhost:8080/fangjia-open/addrSvc/njcbVillageIdentify?address=${address}&type=${type}&token=F54F52381C49BB9EB4A33EB1B65604AE4B71A28AEE53518A94A2F360408B9056D57553931D15CE6DDE765562DAD286BA38E05A4CDAFC51C3D527A4959BF8E75A3B95DB7108FCEA340DDE61925616DB55118E1851E67D83EAD800460D100D6B667A4ED8EE67C8F7FB"
|
||||
if(city){
|
||||
url = url + "&city=${city}"
|
||||
@@ -930,7 +930,7 @@ class OpenApiUtils {
|
||||
|
||||
|
||||
static def lactionEvaluation(area, lng, lat){
|
||||
def url = "http://192.168.0.100:30020/avmWeb/avmAnn?area=${area}&location=lng"+","+lat
|
||||
def url = "http://192.168.0.80:30020/avmWeb/avmAnn?area=${area}&location=lng"+","+lat
|
||||
String content = new HttpRequest().get(url, "utf-8");
|
||||
if(content){
|
||||
def doc = new JsonSlurper().parseText(content)
|
||||
|
||||
@@ -27,7 +27,7 @@ import java.util.concurrent.atomic.AtomicLong
|
||||
// }
|
||||
//})
|
||||
|
||||
def URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
def URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
DBCollection seaweed_coll = MongoUtils.getCollectionByName2("fangjia", "seaweed", URL)
|
||||
def q = new BasicDBObject()
|
||||
q.put("city", "上海市")
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ class AnjukeDetailCrawl {
|
||||
def url = "https://chongqing.anjuke.com/"
|
||||
WebDriver driver = new ChromeDriver()
|
||||
// DesiredCapabilities capabilities = DesiredCapabilities.chrome();
|
||||
// URL urlInstance = new URL("http://192.168.0.100:30025"); //指定URL
|
||||
// URL urlInstance = new URL("http://192.168.0.80:30025"); //指定URL
|
||||
// WebDriver driver = new RemoteWebDriver(urlInstance, capabilities);
|
||||
|
||||
driver.manage().deleteAllCookies()
|
||||
|
||||
+1
-1
@@ -24,7 +24,7 @@ class AddDevShapeData {
|
||||
|
||||
DBCollection DEVELOPMENT_ZONE_43_COLL = MongoUtils.getCollectionByName("fangjia_base", "development_zone", "mongo.db.fangjia.com")
|
||||
|
||||
public static final def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
public static final def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
DBCollection dev_mapping_CONN = MongoUtils.getCollectionByName2("fangjia", "dev_mapping", MONGO100_URL)
|
||||
|
||||
public static final DBCollection administrative_mapping_coll = MongoUtils.getCollectionByName("business", "administrative_mapping", "mongo.db.fangjia.com")
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ class AddDistrictAddress extends BaseBatch{
|
||||
//
|
||||
// public static final DBCollection administrative_mapping_coll = MongoUtils.getCollectionByName("business", "administrative_mapping", "mongo.db.fangjia.com")
|
||||
//
|
||||
// def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
// def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
// DBCollection seaweed_fence100_CONN = MongoUtils.getCollectionByName2("fangjia", "seaweed_fence", MONGO100_URL)
|
||||
//
|
||||
// public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(10)
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ class AddDistrictShapeBatch extends BaseBatch{
|
||||
|
||||
public static final DBCollection administrative_mapping_coll = MongoUtils.getCollectionByName("business", "administrative_mapping", "mongo.db.fangjia.com")
|
||||
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
DBCollection seaweed_fence100_CONN = MongoUtils.getCollectionByName2("fangjia", "seaweed_fence", MONGO100_URL)
|
||||
|
||||
public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(10)
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import com.mongodb.DBCollection
|
||||
|
||||
class CommunityShapeProcess {
|
||||
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
DBCollection community_CONN = MongoUtils.getCollectionByName2("fangjia", "community", MONGO100_URL)
|
||||
|
||||
static main(args) {
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ import java.util.regex.Pattern
|
||||
|
||||
class DevProcess {
|
||||
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
DBCollection development_zone_CONN = MongoUtils.getCollectionByName2("fangjia", "development_zone", MONGO100_URL)
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ import org.elasticsearch.common.xcontent.XContentType
|
||||
|
||||
class DevUpdateTestBatch {
|
||||
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
DBCollection development_zone_43_CONN = MongoUtils.getCollectionByName("fangjia_base", "development_zone", "mongo.db.fangjia.com")
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ import java.util.regex.Pattern
|
||||
class MinglujiData {
|
||||
|
||||
DBCollection mlj_COLL = MongoUtils.getCollectionByName("crawl", "kfq_mingluji_com", "192.168.0.206",27020)
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
|
||||
DBCollection development_zone_CONN = MongoUtils.getCollectionByName("fangjia_base", "development_zone", "mongo.db.fangjia.com")
|
||||
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ import java.util.regex.Pattern
|
||||
|
||||
class PoiLocation {
|
||||
|
||||
def MAP_POI_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
def MAP_POI_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
DBCollection MAPPOI_CONN = MongoUtils.getCollectionByName2("fangjia", "map_poi", MAP_POI_URL)
|
||||
public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(10)
|
||||
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ import org.elasticsearch.index.query.QueryBuilders
|
||||
import java.util.concurrent.CopyOnWriteArrayList
|
||||
|
||||
class SynchAdministrativeMappingDataBatch extends BaseBatch{
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
DBCollection ADMINISTRATIVE_MAPPING_COLL_100 = MongoUtils.getCollectionByName2("fangjia", "administrative_mapping", MONGO100_URL)
|
||||
|
||||
DBCollection ADMINISTRATIVE_MAPPING_COLL = MongoUtils.getCollectionByName("business", "administrative_mapping", "mongo.db.fangjia.com")
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ import java.util.concurrent.CopyOnWriteArrayList
|
||||
*/
|
||||
class SynchDevDataBatch extends BaseBatch{
|
||||
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
DBCollection development_zone_CONN = MongoUtils.getCollectionByName2("fangjia", "development_zone", MONGO100_URL)
|
||||
|
||||
DBCollection DEVELOPMENT_ZONE_43_COLL = MongoUtils.getCollectionByName("fangjia_base", "development_zone", "mongo.db.fangjia.com")
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import java.util.regex.Pattern
|
||||
class TownMiddleProcess {
|
||||
|
||||
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
DBCollection COMMUNITY_CONN = MongoUtils.getCollectionByName2("fangjia", "community", MONGO100_URL)
|
||||
DBCollection ADMINISTRATIVE_DIVISION_CONN = MongoUtils.getCollectionByName2("fangjia", "administrative_division_2023", MONGO100_URL)
|
||||
DBCollection ADMINISTRATIVE_MAPPING_COLL_100 = MongoUtils.getCollectionByName2("fangjia", "administrative_mapping_0526", MONGO100_URL)
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ import java.util.regex.Pattern
|
||||
class TownshipPrcoess {
|
||||
|
||||
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
DBCollection community_CONN = MongoUtils.getCollectionByName2("fangjia", "community", MONGO100_URL)
|
||||
|
||||
static main(args) {
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ class TownshipStrandUpdate {
|
||||
|
||||
|
||||
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
DBCollection dev_MAPPING_COLL_100 = MongoUtils.getCollectionByName2("fangjia", "dev_mapping", MONGO100_URL)
|
||||
|
||||
static main(args) {
|
||||
|
||||
+11
-11
@@ -43,7 +43,7 @@ class FangjiaClientUtils {
|
||||
}
|
||||
|
||||
public static def sendDistrictPriceCalculate(def city, def region, def name, def count){
|
||||
// def url = "http://192.168.0.100:38080/FangJiaDataService/districtPriceCalculate?category=sell&city="+city+"&count="+count+"&name="+name+"®ion="+region+"&retainHistory=true"
|
||||
// def url = "http://192.168.0.80:38080/FangJiaDataService/districtPriceCalculate?category=sell&city="+city+"&count="+count+"&name="+name+"®ion="+region+"&retainHistory=true"
|
||||
def url = "http://192.168.10.216:8080/FangJiaDataService/districtPriceCalculate?category=sell&city="+city+"&count="+count+"&name="+name+"®ion="+region+"&retainHistory=true"
|
||||
def content = null;
|
||||
try{
|
||||
@@ -99,7 +99,7 @@ class FangjiaClientUtils {
|
||||
try {
|
||||
if(address){
|
||||
address = address.replace("{","")
|
||||
def url = "http://192.168.0.100:32080/FangJiaAddressService/structure/v2?address="+URLEncoder.encode(address,"UTF-8")
|
||||
def url = "http://192.168.0.80:32080/FangJiaAddressService/structure/v2?address="+URLEncoder.encode(address,"UTF-8")
|
||||
if(city){
|
||||
url = url +"&city="+URLEncoder.encode(city,"UTF-8")
|
||||
}
|
||||
@@ -160,7 +160,7 @@ class FangjiaClientUtils {
|
||||
try {
|
||||
address = address.replace("{","")
|
||||
// def url = "http://192.168.0.19:39080/FangJiaNlpService/ner?address="+URLEncoder.encode(address,"UTF-8")
|
||||
def url = "http://192.168.0.100:38080/FangJiaDataService/evaluate?address="+URLEncoder.encode(address,"UTF-8")+"&city="+URLEncoder.encode(city,"UTF-8")+"&maxNum=10&radius=1000&size=100"
|
||||
def url = "http://192.168.0.80:38080/FangJiaDataService/evaluate?address="+URLEncoder.encode(address,"UTF-8")+"&city="+URLEncoder.encode(city,"UTF-8")+"&maxNum=10&radius=1000&size=100"
|
||||
// def url = "http://192.168.0.19:39080/FangJiaAddressService/structure?address="+URLEncoder.encode(address,"UTF-8")
|
||||
content = new HttpRequest().newGet(url, null, "utf-8")
|
||||
jsonObj = JSONObject.fromObject(content)
|
||||
@@ -173,13 +173,13 @@ class FangjiaClientUtils {
|
||||
|
||||
public static def saveToEsDistrict(def data){
|
||||
String jsonStr = com.alibaba.fastjson.JSONObject.toJSONString(data)
|
||||
HttpUtils.postForJson("http://192.168.0.100:38080/FangJiaDataService/community", jsonStr)
|
||||
HttpUtils.postForJson("http://192.168.0.80:38080/FangJiaDataService/community", jsonStr)
|
||||
}
|
||||
|
||||
|
||||
public static def saveToEsPaimai(def data){
|
||||
String jsonStr = com.alibaba.fastjson.JSONObject.toJSONString(data)
|
||||
HttpUtils.postForJson("http://192.168.0.100:38080/FangJiaDataService/paiMai", jsonStr)
|
||||
HttpUtils.postForJson("http://192.168.0.80:38080/FangJiaDataService/paiMai", jsonStr)
|
||||
// HttpUtils.postForJson("http://localhost:8084/FangJiaDataService/paiMai", jsonStr)
|
||||
}
|
||||
|
||||
@@ -201,10 +201,10 @@ class FangjiaClientUtils {
|
||||
|
||||
public static def saveOrUpdateDistrict(data) {
|
||||
String jsonStr = com.alibaba.fastjson.JSONObject.toJSONString(data)
|
||||
// def json = HttpUtils.postForJson("http://192.168.0.100:38080/FangJiaDataService/saveData", jsonStr)
|
||||
// def json = HttpUtils.postForJson("http://192.168.0.80:38080/FangJiaDataService/saveData", jsonStr)
|
||||
// def json = HttpUtils.postForJson("http://localhost:8080/FangJiaDataService/saveData", jsonStr)
|
||||
|
||||
com.alibaba.fastjson.JSONObject json = HttpUtils.doPost2("http://192.168.0.100:38080/FangJiaDataService/saveData", jsonStr)
|
||||
com.alibaba.fastjson.JSONObject json = HttpUtils.doPost2("http://192.168.0.80:38080/FangJiaDataService/saveData", jsonStr)
|
||||
if (json.status == 0) {
|
||||
return "成功"
|
||||
}else if(json.status == 1){
|
||||
@@ -247,7 +247,7 @@ class FangjiaClientUtils {
|
||||
def url = null;
|
||||
try {
|
||||
// address = address.replace("{","").replace("\\","")
|
||||
url = "http://192.168.0.100:32080/FangJiaNlpService/match?address="+URLEncoder.encode(address,"UTF-8")+"&useMap=${useMap}"
|
||||
url = "http://192.168.0.80:32080/FangJiaNlpService/match?address="+URLEncoder.encode(address,"UTF-8")+"&useMap=${useMap}"
|
||||
// url = "http://192.168.20.242:5001/match?address="+URLEncoder.encode(address,"UTF-8")+"&useMap=${useMap}"
|
||||
// url = "http://192.168.0.19:31080/FangJiaNlpService/match?address="+URLEncoder.encode(address,"UTF-8")+"&useMap=${useMap}"
|
||||
if(city){
|
||||
@@ -297,7 +297,7 @@ class FangjiaClientUtils {
|
||||
def content = null
|
||||
try {
|
||||
address = address.replace("{","").replace("\\","")
|
||||
def url = "http://192.168.0.100:32080/FangJiaAddressService/v2/structure?address="+URLEncoder.encode(address,"UTF-8")
|
||||
def url = "http://192.168.0.80:32080/FangJiaAddressService/v2/structure?address="+URLEncoder.encode(address,"UTF-8")
|
||||
|
||||
if(city){
|
||||
url = url + "&city="+URLEncoder.encode(city,"UTF-8")
|
||||
@@ -355,7 +355,7 @@ class FangjiaClientUtils {
|
||||
address = address.toString().replace("{","")
|
||||
int retryCount = 0
|
||||
while (retryCount < 3) {
|
||||
url = "http://192.168.0.100:32080/FangJiaNlpService/formatNinelevel?address="+URLEncoder.encode(address,"UTF-8")+"&complete=false&useMap=false&addressAssessment=true&fields=dev_confi"
|
||||
url = "http://192.168.0.80:32080/FangJiaNlpService/formatNinelevel?address="+URLEncoder.encode(address,"UTF-8")+"&complete=false&useMap=false&addressAssessment=true&fields=dev_confi"
|
||||
if(city){
|
||||
url = url +"&city="+URLEncoder.encode(city,"UTF-8")
|
||||
}
|
||||
@@ -402,7 +402,7 @@ class FangjiaClientUtils {
|
||||
def content = null
|
||||
try {
|
||||
|
||||
def url = "http://192.168.0.100:30020/avmWeb/shopSell?location="+location+"&area="+area+"&estateType="+estateType
|
||||
def url = "http://192.168.0.80:30020/avmWeb/shopSell?location="+location+"&area="+area+"&estateType="+estateType
|
||||
content = new HttpRequest().newGet(url, null, "utf-8")
|
||||
jsonObj = JSONObject.fromObject(content)
|
||||
println jsonObj
|
||||
|
||||
+129
-92
@@ -11,6 +11,7 @@ import com.fangjia.script.util.DbUtils
|
||||
import com.fangjia.script.util.ElasticUtils
|
||||
import com.fangjia.script.util.ExcelUtils
|
||||
import com.fangjia.script.util.MongoUtils
|
||||
import com.fangjia.script.wenyan.taobao.BidRecordsParseBatch
|
||||
import com.mongodb.BasicDBObject
|
||||
import com.mongodb.DBCollection
|
||||
|
||||
@@ -35,55 +36,64 @@ class HongXingMonthBatch extends BaseBatch{
|
||||
// createTestFile();
|
||||
// mergeFile()
|
||||
// mergeMatchId()
|
||||
// def stat = [:]
|
||||
// ExcelUtils.read("C:\\Users\\wenyan\\Desktop\\宏信2月价格监测核实(价格有偏差核查).xlsx").each{List item->
|
||||
// if(item["U"]){
|
||||
// stat.put(item["C"], item["U"])
|
||||
// }
|
||||
// }
|
||||
def fileName = "C:\\Users\\wenyan\\Desktop\\宏信交付数据\\宏信楼盘4月监测20260420交付.xlsx"
|
||||
def stat = [:]
|
||||
//获取上个月的交付价格
|
||||
def lastMonthPriceRowId = "N" //上个月均价所在列号
|
||||
ExcelUtils.read(fileName).each{List item->
|
||||
if(item[lastMonthPriceRowId]){
|
||||
stat.put(item["C"], item[lastMonthPriceRowId])
|
||||
}
|
||||
}
|
||||
|
||||
// ExcelUtils.modify("C:\\Users\\wenyan\\Desktop\\宏信楼盘3月监测20260320交付跑数.xlsx",{List item->
|
||||
// if(stat.containsKey(item["C"])){
|
||||
// item["O"] = stat[item["C"]].toString().toDouble().toInteger()
|
||||
// }
|
||||
// })
|
||||
// def lastMonthStr = DateUtils.formatDateByPattern(DateUtils.parseFromTightYYYYMMDD(DateUtils.addMonth(new Date(), -1)),"yyyyMM");
|
||||
// def count = findCurMonthPrice(lastMonthStr)
|
||||
// if(count > 0){
|
||||
// def datas = ExcelUtils.read("C:\\Users\\wenyan\\Desktop\\宏信楼盘3月监测20260320交付跑数.xlsx")
|
||||
// def newDatas = createDatas(datas, lastMonthStr)
|
||||
//
|
||||
// def curDateStr = DateUtils.formatDateByPattern(new Date(),"yyyyMMdd")
|
||||
// ExcelUtils.write("C:\\Users\\wenyan\\Desktop\\宏信楼盘3月监测20260320交付跑数1.xlsx", newDatas,"结果")
|
||||
// }
|
||||
ExcelUtils.multiThreadingModify("C:\\Users\\wenyan\\Desktop\\宏信楼盘3月监测20260320交付跑数V3(mu).xlsx",{ List d->
|
||||
if (!["商铺","办公楼"].contains(d['A'])){
|
||||
def tihuanMap = [:]
|
||||
def preTihuanMap = [:]
|
||||
def dist = CommonDatautils.findDistrictById(d['AA'])
|
||||
if(dist){
|
||||
tihuanMap.put(dist.city+"##"+dist.region+"##"+dist.name, d["N"])
|
||||
preTihuanMap.put(dist.city+"##"+dist.region+"##"+dist.name, d["L"])
|
||||
def resMap = getDistSortNumber(dist.city, dist.region, "202602", tihuanMap)
|
||||
def preResMap = getDistSortNumber(dist.city, dist.region, "202601", preTihuanMap)
|
||||
if(resMap){
|
||||
d["V"] = resMap.num+"/"+resMap.total
|
||||
}else{
|
||||
d["V"] = null
|
||||
}
|
||||
if(preResMap){
|
||||
d["U"] = preResMap.num+"/"+preResMap.total
|
||||
}else{
|
||||
d["U"] = null
|
||||
}
|
||||
if(resMap && preResMap){
|
||||
d["W"] = resMap.num - preResMap.num
|
||||
}else{
|
||||
d["W"] = null
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}, 1,"V3")
|
||||
|
||||
def lastMonthStr = DateUtils.formatDateByPattern(DateUtils.parseFromTightYYYYMMDD(DateUtils.addMonth(new Date(), -1)),"yyyyMM");
|
||||
def count = findCurMonthPrice(lastMonthStr)
|
||||
if(count > 0){
|
||||
def datas = ExcelUtils.read(fileName)
|
||||
def newDatas = createDatas(datas, lastMonthStr)
|
||||
def curDateStr = DateUtils.formatDateByPattern(new Date(),"yyyyMMdd")
|
||||
ExcelUtils.write(fileName, newDatas,"结果${curDateStr}")
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// ExcelUtils.multiThreadingModify("C:\\Users\\wenyan\\Desktop\\宏信楼盘3月监测20260320交付跑数V3(mu).xlsx",{ List d->
|
||||
// if (!["商铺","办公楼"].contains(d['A'])){
|
||||
// def tihuanMap = [:]
|
||||
// def preTihuanMap = [:]
|
||||
// def dist = CommonDatautils.findDistrictById(d['AA'])
|
||||
// if(dist){
|
||||
// tihuanMap.put(dist.city+"##"+dist.region+"##"+dist.name, d["N"])
|
||||
// preTihuanMap.put(dist.city+"##"+dist.region+"##"+dist.name, d["L"])
|
||||
// def resMap = getDistSortNumber(dist.city, dist.region, "202602", tihuanMap)
|
||||
// def preResMap = getDistSortNumber(dist.city, dist.region, "202601", preTihuanMap)
|
||||
// if(resMap){
|
||||
// d["V"] = resMap.num+"/"+resMap.total
|
||||
// }else{
|
||||
// d["V"] = null
|
||||
// }
|
||||
// if(preResMap){
|
||||
// d["U"] = preResMap.num+"/"+preResMap.total
|
||||
// }else{
|
||||
// d["U"] = null
|
||||
// }
|
||||
// if(resMap && preResMap){
|
||||
// d["W"] = resMap.num - preResMap.num
|
||||
// }else{
|
||||
// d["W"] = null
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// }, 1,"V3")
|
||||
// ExcelUtils.modify("C:\\Users\\wenyan\\Desktop\\宏信楼盘3月监测20260320交付跑数V3(mu).xlsx",{List item->
|
||||
//// if(item["O"]){
|
||||
//// item["N"] = item["O"].toString().toDouble().toInteger()
|
||||
@@ -102,19 +112,14 @@ class HongXingMonthBatch extends BaseBatch{
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
def createDatas(datas, lastMonthStr){
|
||||
def rows = []
|
||||
rows << ["物业类型","名称","地址","期房/现房","处置状态","省份","城市","城市排名","面积","1月供数单价(元)","1月供数总价(元)","2月供数单价(元)","2月供数总价(元)","3月评估单价", "3月评估总价(元)"
|
||||
,"环比涨跌幅(%)","计算方式","定基涨跌幅(相比首月波动)","3月区域均价","3月区域均价涨跌幅(%)","2月楼盘所在区域价格的排名(仅针对住宅)","3月楼盘所在区域价格的排名(仅针对住宅)","楼盘所在区域排名变化(仅针对住宅)","近3个月内成交量","近6个月成交量","3个月挂牌量","匹配ID-新","备注","报告负责人", "情况说明"]
|
||||
rows << ["物业类型","名称","地址","期房/现房","处置状态","省份","城市","城市排名","面积","1月评估单价(元)","1月评估总价(元)","2月评估单价(元)","2月评估总价(元)","3月评估单价", "3月评估总价(元)","4月评估单价", "4月评估总价(元)"
|
||||
,"环比涨跌幅(%)","计算方式","定基涨跌幅(相比首月波动)","4月区域均价","4月区域均价涨跌幅(%)","3月楼盘所在区域价格的排名(仅针对住宅)","4月楼盘所在区域价格的排名(仅针对住宅)","楼盘所在区域排名变化(仅针对住宅)","近3个月内成交量","近6个月成交量","3个月挂牌量","匹配ID-新","备注","情况说明"]
|
||||
def index = 1
|
||||
for(def d : datas){
|
||||
println d['B']
|
||||
index++
|
||||
if(d['E'] == "已处置"){
|
||||
continue
|
||||
}
|
||||
def row = []
|
||||
row << d['A']
|
||||
row << d['B']
|
||||
@@ -129,41 +134,57 @@ class HongXingMonthBatch extends BaseBatch{
|
||||
row << d['K']
|
||||
row << d['L']
|
||||
row << d['M']
|
||||
|
||||
row << d['N']
|
||||
row << d['O']
|
||||
if(d['E'] == "已处置"){
|
||||
rows << row
|
||||
continue
|
||||
}
|
||||
if(!["商铺","办公楼"].contains(d['A'])){
|
||||
def dist = CommonDatautils.findDistrictById(d['Z'])
|
||||
def dist = CommonDatautils.findDistrictById(d['AD'])
|
||||
if(dist){
|
||||
def priceObj = findDistrictMonthPrice(dist.city, dist.region, dist.name, lastMonthStr)
|
||||
def tihuanMap = [:]
|
||||
def preTihuanMap = [:]
|
||||
if(priceObj){
|
||||
if(d["N"]){
|
||||
def newAvgPrice = d["N"]
|
||||
if(d["P"]){
|
||||
def newAvgPrice = d["P"]
|
||||
row << DataUtil.getRound(newAvgPrice)
|
||||
def totalPrice = newAvgPrice * d['I']
|
||||
row << DataUtil.getRound(totalPrice)
|
||||
row << new BigDecimal(DataUtil.getRound(2,(newAvgPrice - d['L']) * 100/ d['L']).toString())
|
||||
if(d["N"]){
|
||||
row << new BigDecimal(DataUtil.getRound(2,(newAvgPrice - d["N"]) * 100/ d["N"]).toString())
|
||||
preTihuanMap.put(dist.city+"##"+dist.region+"##"+dist.name, d["N"])
|
||||
}else{
|
||||
row << ""
|
||||
}
|
||||
row << ""
|
||||
def djMarkup = (newAvgPrice - d['J'])*100/ d['J']
|
||||
djMarkup = DataUtil.getRound(2, djMarkup)
|
||||
row << djMarkup.toString()
|
||||
if(d['J']){
|
||||
def djMarkup = (newAvgPrice - d['J'])*100/ d['J']
|
||||
djMarkup = DataUtil.getRound(2, djMarkup)
|
||||
row << djMarkup.toString()
|
||||
}else{
|
||||
row << ""
|
||||
}
|
||||
tihuanMap.put(dist.city+"##"+dist.region+"##"+dist.name, newAvgPrice)
|
||||
preTihuanMap.put(dist.city+"##"+dist.region+"##"+dist.name, d["L"])
|
||||
}else{
|
||||
def markup = priceObj.mom
|
||||
def curPrice = d['L']
|
||||
def curPrice = d['N']
|
||||
def newAvgPrice = curPrice * markup + curPrice
|
||||
row << DataUtil.getRound(newAvgPrice)
|
||||
def totalPrice = newAvgPrice * d['I']
|
||||
row << DataUtil.getRound(totalPrice)
|
||||
row << markup*100
|
||||
row << getPriceWay(priceObj.value_type)
|
||||
println(row)
|
||||
def djMarkup = (newAvgPrice - d['J'])*100/ d['J']
|
||||
djMarkup = DataUtil.getRound(2, djMarkup)
|
||||
row << djMarkup.toString()
|
||||
if(d['J']){
|
||||
def djMarkup = (newAvgPrice - d['J'])*100/ d['J']
|
||||
djMarkup = DataUtil.getRound(2, djMarkup)
|
||||
row << djMarkup.toString()
|
||||
}else{
|
||||
row << ""
|
||||
}
|
||||
tihuanMap.put(dist.city+"##"+dist.region+"##"+dist.name, newAvgPrice)
|
||||
preTihuanMap.put(dist.city+"##"+dist.region+"##"+dist.name, d["L"])
|
||||
preTihuanMap.put(dist.city+"##"+dist.region+"##"+dist.name, d["N"])
|
||||
}
|
||||
}else{
|
||||
row << ""
|
||||
@@ -184,19 +205,21 @@ class HongXingMonthBatch extends BaseBatch{
|
||||
}
|
||||
|
||||
def resMap = getDistSortNumber(dist.city, dist.region, lastMonthStr, tihuanMap)
|
||||
def preResMap = getDistSortNumber(dist.city, dist.region, "202601", preTihuanMap)
|
||||
if(resMap){
|
||||
row << resMap.num+"/"+resMap.total
|
||||
}else{
|
||||
row << ""
|
||||
}
|
||||
def preResMap = getDistSortNumber(dist.city, dist.region, "202602", preTihuanMap)
|
||||
if(preResMap){
|
||||
row << preResMap.num+"/"+preResMap.total
|
||||
}else{
|
||||
row << ""
|
||||
}
|
||||
if(resMap){
|
||||
row << resMap.num+"/"+resMap.total
|
||||
}else{
|
||||
row << ""
|
||||
}
|
||||
if(resMap && preResMap){
|
||||
row << resMap.num - preResMap.num
|
||||
}else{
|
||||
row << ""
|
||||
}
|
||||
row << findTrades(dist, 3)
|
||||
row << findTrades(dist, 6)
|
||||
@@ -206,7 +229,7 @@ class HongXingMonthBatch extends BaseBatch{
|
||||
println d['AD'] +" 未找到该id的楼盘"
|
||||
}
|
||||
}else{
|
||||
def dist = CommonDatautils.findDistrictById(d['Z'])
|
||||
def dist = CommonDatautils.findDistrictById(d['AD'])
|
||||
def cityMarkupObj = null
|
||||
def regionMarkupObj = null
|
||||
if(dist){
|
||||
@@ -227,26 +250,39 @@ class HongXingMonthBatch extends BaseBatch{
|
||||
regionMarkupObj = findSellShopMarkup(dist.city, dist.region, lastMonthStr, "district")
|
||||
}
|
||||
if(cityMarkupObj){
|
||||
if(d["N"]){
|
||||
def newAvgPrice = d["N"]
|
||||
if(d["P"]){
|
||||
def newAvgPrice = d["P"]
|
||||
row << DataUtil.getRound(newAvgPrice)
|
||||
def totalPrice = newAvgPrice * d['I']
|
||||
row << DataUtil.getRound(totalPrice)
|
||||
row << new BigDecimal(DataUtil.getRound(2, (newAvgPrice - d['L']) * 100/ d['L']).toString())
|
||||
if(d['N']){
|
||||
row << new BigDecimal(DataUtil.getRound(2, (newAvgPrice - d['N']) * 100/ d['N']).toString())
|
||||
}else{
|
||||
row << ""
|
||||
}
|
||||
row << ""
|
||||
def djMarkup = (newAvgPrice - d['J'])*100/ d['J']
|
||||
djMarkup = DataUtil.getRound(2, djMarkup)
|
||||
row << djMarkup.toString()
|
||||
if(d['J']){
|
||||
def djMarkup = (newAvgPrice - d['J'])*100/ d['J']
|
||||
djMarkup = DataUtil.getRound(2, djMarkup)
|
||||
row << djMarkup.toString()
|
||||
}else{
|
||||
row << ""
|
||||
}
|
||||
|
||||
}else{
|
||||
def newAvgPrice = d['L'] * cityMarkupObj.mom + d['L']
|
||||
def newAvgPrice = d['N'] * cityMarkupObj.mom + d['N']
|
||||
row << DataUtil.getRound(newAvgPrice)
|
||||
def totalPrice = newAvgPrice * d['I']
|
||||
row << DataUtil.getRound(totalPrice)
|
||||
row << cityMarkupObj.mom * 100
|
||||
row << ""
|
||||
def djMarkup = (newAvgPrice - d['L'])*100/ d['L']
|
||||
djMarkup = DataUtil.getRound(2, djMarkup)
|
||||
row << djMarkup.toString()
|
||||
if(d['N']){
|
||||
def djMarkup = (newAvgPrice - d['N'])*100/ d['N']
|
||||
djMarkup = DataUtil.getRound(2, djMarkup)
|
||||
row << djMarkup.toString()
|
||||
}else{
|
||||
row << ""
|
||||
}
|
||||
}
|
||||
}else{
|
||||
row << ""
|
||||
@@ -269,8 +305,15 @@ class HongXingMonthBatch extends BaseBatch{
|
||||
}
|
||||
}else{
|
||||
if(regionMarkupObj){
|
||||
row << (int)regionMarkupObj.avg_price
|
||||
row << regionMarkupObj.mom*100
|
||||
if(Math.abs(regionMarkupObj.mom) * 100 > 10){
|
||||
def preAvgPrice = regionMarkupObj.avg_price * (1 - regionMarkupObj.mom)
|
||||
def newAvgPrice = ((preAvgPrice + regionMarkupObj.avg_price)/2).toInteger()
|
||||
row << newAvgPrice
|
||||
row << new BigDecimal(DataUtil.getRound(2, (newAvgPrice - preAvgPrice) * 100/ preAvgPrice).toString())
|
||||
}else{
|
||||
row << (int)regionMarkupObj.avg_price
|
||||
row << regionMarkupObj.mom*100
|
||||
}
|
||||
}else{
|
||||
row << ""
|
||||
row << ""
|
||||
@@ -286,8 +329,7 @@ class HongXingMonthBatch extends BaseBatch{
|
||||
println d['AD'] +" 未找到该id的楼盘"
|
||||
}
|
||||
}
|
||||
row << d['Z']
|
||||
row << d['AA']
|
||||
row << d['AD']
|
||||
row << d['AB']
|
||||
row << d['AC']
|
||||
rows << row
|
||||
@@ -346,7 +388,7 @@ class HongXingMonthBatch extends BaseBatch{
|
||||
|
||||
def tihuanMap2 = [:]
|
||||
tihuanMap2.put(dist.city+"##"+dist.region+"##"+dist.name, d['J'])
|
||||
def resMap2 = getDistSortNumber(dist.city, dist.region, "202601", tihuanMap)
|
||||
def resMap2 = getDistSortNumber(dist.city, dist.region, "202602", tihuanMap)
|
||||
if(resMap2){
|
||||
def str = resMap2.num+"/"+resMap2.total
|
||||
d['Q'] = str
|
||||
@@ -456,11 +498,6 @@ class HongXingMonthBatch extends BaseBatch{
|
||||
ret << d['U']
|
||||
ret << ""//2月供数单价
|
||||
ret << ""//人工核实价格
|
||||
if(d["O"]=="1882266062917259264"){
|
||||
ret << "金水"
|
||||
}else{
|
||||
ret << "曹"
|
||||
}
|
||||
ret << d['Q']
|
||||
ret << d['R']
|
||||
ret << d['S']
|
||||
|
||||
@@ -24,7 +24,7 @@ import java.util.regex.Pattern
|
||||
|
||||
DBCollection coll = MongoUtils.getCollectionByName("seeds_db", "city_seeds", "192.168.0.235", 27018)
|
||||
|
||||
def ZS_MONGODB_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
def ZS_MONGODB_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
DBCollection TOWNSHIP_CONN = MongoUtils.getCollectionByName2("fangjia", "township", ZS_MONGODB_URL)
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ class StreetProcess {
|
||||
|
||||
final DBCollection TOWNSHIP = MongoUtils.getCollectionByName("fangjia", "township", "mongo.db.fangjia.com")
|
||||
|
||||
public static final def MONGODB_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
public static final def MONGODB_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
public static final DBCollection TOWNSHIP100 = MongoUtils.getCollectionByName2("fangjia", "township", MONGODB_URL)
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ import org.apache.commons.lang.StringUtils
|
||||
|
||||
import java.util.regex.Pattern
|
||||
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
DBCollection development_zone_CONN = MongoUtils.getCollectionByName2("fangjia", "development_zone", MONGO100_URL)
|
||||
|
||||
DBCollection community_CONN = MongoUtils.getCollectionByName2("fangjia", "community", MONGO100_URL)
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ class NanjiangVillage {
|
||||
}
|
||||
|
||||
def run(){
|
||||
ExcelUtils.multiThreadingModify("D:\\数据\\南京\\是否农村.xlsx",{d->
|
||||
ExcelUtils.multiThreadingModify("C:\\Users\\wenyan\\Desktop\\南京银行是否农村0409.xlsx",{d->
|
||||
|
||||
if(d['A'] && !d['F']){
|
||||
def dto = OpenApiUtils.addrVerifyNanjing(null, d['A'], 2)
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ import com.mongodb.DBCollection
|
||||
|
||||
DBCollection TOWN_POLYLINECOLL = MongoUtils.getCollectionByAuth20190102("fangjia_crawl", "town_polyline")
|
||||
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
DBCollection COMMUNITY_CONN = MongoUtils.getCollectionByName2("fangjia", "community", MONGO100_URL)
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import com.mongodb.DBCollection
|
||||
import com.rabbitmq.client.impl.AMQImpl
|
||||
import org.bson.types.ObjectId
|
||||
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
DBCollection COMMUNITY_CONN = MongoUtils.getCollectionByName2("fangjia", "community_new_2023", MONGO100_URL)
|
||||
|
||||
filePath = "D:\\数据\\涉农\\18万最终-id.xlsx"
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ class GaoDePoiDataProcess extends BaseBatch{
|
||||
public final static DBCollection COMPANY_206_COLL = MongoUtils.getCollectionByName("business", "company_huzhou", "192.168.0.206",27020)
|
||||
|
||||
|
||||
def MAP_POI_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
def MAP_POI_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
DBCollection MAPPOI_CONN = MongoUtils.getCollectionByName2("fangjia", "map_poi", MAP_POI_URL)
|
||||
|
||||
DBCollection MAPPOI_CONN_TEST = MongoUtils.getCollectionByName2("fangjia", "map_poi_all_8", MAP_POI_URL)
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ import java.util.concurrent.atomic.AtomicLong
|
||||
class NetworkDistanceBatch extends BaseBatch{
|
||||
|
||||
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
DBCollection SEAWEED_CONN = MongoUtils.getCollectionByName2("fangjia", "seaweed", MONGO100_URL)
|
||||
|
||||
public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(20)
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.concurrent.atomic.AtomicLong
|
||||
|
||||
class PoiWash {
|
||||
|
||||
def MAP_POI_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
def MAP_POI_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
DBCollection MAPPOI_CONN = MongoUtils.getCollectionByName2("fangjia", "map_poi", MAP_POI_URL)
|
||||
|
||||
// DBCollection MAPPOI_CONN2 = MongoUtils.getCollectionByName2("fangjia", "map_poi_all", MAP_POI_URL)
|
||||
|
||||
+1
-1
@@ -12,7 +12,7 @@ class PostCodeSynchBatch extends BaseBatch{
|
||||
|
||||
public static final DBCollection post_code_coll = MongoUtils.getCollectionByName("crawl", "post_code", "192.168.0.206", 27020)
|
||||
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
DBCollection POST_CODE_CONN = MongoUtils.getCollectionByName2("fangjia", "postcode", MONGO100_URL)
|
||||
|
||||
def fullCityMap = null
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ class SeaweedDataSynch extends BaseBatch{
|
||||
static def targetUrl = "http://192.168.0.89:9200/seaweed/"
|
||||
public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(20)
|
||||
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
DBCollection SEAWEED_CONN = MongoUtils.getCollectionByName2("fangjia", "seaweed_dishu", MONGO100_URL)
|
||||
DBCollection administrative_division_100_CONN = MongoUtils.getCollectionByName2("fangjia", "administrative_division_2023", MONGO100_URL)
|
||||
DBCollection administrative_division_2022_CONN = MongoUtils.getCollectionByName2("fangjia", "administrative_division", MONGO100_URL)
|
||||
|
||||
+1
-1
@@ -23,7 +23,7 @@ class SuggestionDataSynch extends BaseBatch{
|
||||
static def targetUrl = "http://192.168.0.12:9200/seaweed/"
|
||||
public static ExecutorService fixedThreadPool = Executors.newFixedThreadPool(100)
|
||||
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
def MONGO100_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
DBCollection SEAWEED_CONN = MongoUtils.getCollectionByName2("fangjia", "seaweed", MONGO100_URL)
|
||||
DBCollection administrative_division_100_CONN = MongoUtils.getCollectionByName2("fangjia", "administrative_division", MONGO100_URL)
|
||||
DBCollection SUGGESTION_CONN = MongoUtils.getCollectionByName2("fangjia", "suggestion_new", MONGO100_URL)
|
||||
|
||||
+3
-2
@@ -48,6 +48,7 @@ class XiaMenVillageBatch extends BaseBatch{
|
||||
rows << row
|
||||
}
|
||||
}
|
||||
ExcelUtils.write("C:\\Users\\wenyan\\IdeaProjects\\main\\projects\\fangjia-script\\src\\main\\groovy\\com\\fangjia\\script\\gj\\xiamen\\xmbank_2026-05_result.xlsx", rows, "结果")
|
||||
uploadExcel(rows, outFileName)
|
||||
println "新增文件,上传已完成 "+DateUtil.formatByPattern(new Date(), "yyyy-MM-dd HH:mm:ss")
|
||||
println "*******************************************************************************************"
|
||||
@@ -69,7 +70,6 @@ class XiaMenVillageBatch extends BaseBatch{
|
||||
println "数据为空,无法生成Excel"
|
||||
return false
|
||||
}
|
||||
|
||||
try {
|
||||
// 1. 生成Excel内容
|
||||
byte[] excelBytes = ExcelUtils.createExcelBytes(data, sheetName)
|
||||
@@ -89,7 +89,8 @@ class XiaMenVillageBatch extends BaseBatch{
|
||||
def existsFlag = false
|
||||
if(files){
|
||||
for(def file : files){
|
||||
if(file.filename == fileName){
|
||||
// 0 字节视为无效(上次上传失败的残留),需要重新上传
|
||||
if(file.filename == fileName && file.attrs.size > 0){
|
||||
existsFlag = true
|
||||
break
|
||||
}
|
||||
|
||||
+13
-16
@@ -95,29 +95,26 @@ class XmBankVillageFtpUtils {
|
||||
* @return 上传是否成功
|
||||
*/
|
||||
private static boolean uploadExcelBytes(byte[] excelBytes, String fileName) {
|
||||
sftpChannel = reConnect()
|
||||
|
||||
try {
|
||||
// 构建完整的远程路径
|
||||
String remoteFilePath = "${ftpPath}/${fileName}"
|
||||
|
||||
println "开始上传Excel文件到: ${remoteFilePath}"
|
||||
println "开始上传Excel文件到: ${ftpPath}/${fileName}"
|
||||
println "文件大小: ${excelBytes.length} 字节"
|
||||
|
||||
// 确保远程目录存在
|
||||
sftp.createDir(ftpPath, sftpChannel)
|
||||
// 重建连接,避免长时间处理后连接超时
|
||||
ChannelSftp channel = sftp.connect(ftpServer, ftpPort, ftpUser, ftpPassword)
|
||||
|
||||
// 将字节数组转换为输入流
|
||||
// 确保目录存在
|
||||
sftp.createDir(ftpPath, channel)
|
||||
|
||||
// 删除服务端可能存在的 0 字节残留(避免服务端对 TRUNC 操作返回 Failure)
|
||||
try { channel.rm("${ftpPath}/${fileName}") } catch (ignored) {}
|
||||
|
||||
// cd 进目标目录,使用文件名(相对路径)上传
|
||||
channel.cd(ftpPath)
|
||||
InputStream inputStream = new ByteArrayInputStream(excelBytes)
|
||||
|
||||
// 上传文件
|
||||
sftpChannel.put(inputStream, remoteFilePath)
|
||||
|
||||
// 关闭流
|
||||
channel.put(inputStream, fileName)
|
||||
inputStream.close()
|
||||
|
||||
println "Excel文件上传成功: ${remoteFilePath}"
|
||||
|
||||
println "Excel文件上传成功: ${ftpPath}/${fileName}"
|
||||
return true
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ public class Anshan {
|
||||
// new String[]{"192.168.0.96", "3234"},
|
||||
// new String[]{"192.168.0.98", "3234"},
|
||||
// new String[]{"192.168.0.99", "3234"},
|
||||
// new String[]{"192.168.0.100", "3234"},
|
||||
// new String[]{"192.168.0.80", "3234"},
|
||||
// new String[]{"192.168.0.101", "3234"},
|
||||
// new String[]{"192.168.0.102", "3234"},
|
||||
// new String[]{"192.168.0.103", "3234"}
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ ExcelUtils.singleThreadingModify(excelFilePath, { List items ->
|
||||
|
||||
String address = items['B']
|
||||
|
||||
String url = "http://192.168.0.100:32080/FangJiaAddressService/villageIdentify";
|
||||
String url = "http://192.168.0.80:32080/FangJiaAddressService/villageIdentify";
|
||||
|
||||
HttpRequest httpRequest = new HttpRequest();
|
||||
map = new HashMap<String, String>()
|
||||
|
||||
+2
-2
@@ -24,7 +24,7 @@ ExcelUtils.multiThreadingModify(excelFilePath, { List items ->
|
||||
String address = items['A']
|
||||
<<<<<<< HEAD
|
||||
// if (province == null) {
|
||||
String url = "http://192.168.0.100:32080/FangJiaAddressService/villageIdentify";
|
||||
String url = "http://192.168.0.80:32080/FangJiaAddressService/villageIdentify";
|
||||
|
||||
HttpRequest httpRequest = new HttpRequest();
|
||||
map = new HashMap<String, String>()
|
||||
@@ -130,7 +130,7 @@ ExcelUtils.multiThreadingModify(excelFilePath, { List items ->
|
||||
=======
|
||||
String province = items['B']
|
||||
if (province == null) {
|
||||
String url = "http://192.168.0.100:32080/FangJiaAddressService/villageIdentify";
|
||||
String url = "http://192.168.0.80:32080/FangJiaAddressService/villageIdentify";
|
||||
|
||||
HttpRequest httpRequest = new HttpRequest();
|
||||
map = new HashMap<String, String>()
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ ExcelUtils.singleThreadingModify(excelFilePath, { List items ->
|
||||
println("已处理:"+count)
|
||||
}
|
||||
|
||||
String url = "http://192.168.0.100:32080/FangJiaAddressService/villageIdentify";
|
||||
String url = "http://192.168.0.80:32080/FangJiaAddressService/villageIdentify";
|
||||
|
||||
HttpRequest httpRequest = new HttpRequest();
|
||||
map = new HashMap<String, String>()
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@ ExcelUtils.singleThreadingModify(excelFilePath, { List items ->
|
||||
String address = items['A']
|
||||
String tt = items['Y']
|
||||
if (flag == null&&"地址有效".equals(tt)) {
|
||||
String url = "http://192.168.0.100:32080/FangJiaAddressService/villageIdentify";
|
||||
String url = "http://192.168.0.80:32080/FangJiaAddressService/villageIdentify";
|
||||
|
||||
HttpRequest httpRequest = new HttpRequest();
|
||||
map = new HashMap<String, String>()
|
||||
|
||||
+1
-1
@@ -15,7 +15,7 @@ ExcelUtils.singleThreadingModify(excelFilePath, { List items ->
|
||||
println("已处理:"+count)
|
||||
}
|
||||
|
||||
String url = "http://192.168.0.100:32080/FangJiaAddressService/villageIdentify";
|
||||
String url = "http://192.168.0.80:32080/FangJiaAddressService/villageIdentify";
|
||||
|
||||
HttpRequest httpRequest = new HttpRequest();
|
||||
map = new HashMap<String, String>()
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ class InvokeHttpRequest {
|
||||
"192.168.0.93",
|
||||
"192.168.0.99",
|
||||
"192.168.0.94",
|
||||
"192.168.0.100"
|
||||
"192.168.0.80"
|
||||
];
|
||||
// static int PROXY_USE_COUNT=0;
|
||||
static AtomicInteger PROXY_USE_COUNT=new AtomicInteger();
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import com.mongodb.DBCollection
|
||||
import org.apache.commons.collections.CollectionUtils
|
||||
import org.apache.commons.lang.StringUtils
|
||||
|
||||
def ZS_MONGODB_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
def ZS_MONGODB_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
final DBCollection ZS_REGION_CONN = MongoUtils.getCollectionByName2("fangjia", "region_block", ZS_MONGODB_URL)
|
||||
|
||||
ZS_REGION_CONN.find(new BasicDBObject()).batchSize(1000).each {obj ->
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@ import java.util.stream.Collectors
|
||||
class GetPoiFromCommunity {
|
||||
|
||||
static final ExecutorService executorService = Executors.newFixedThreadPool(10)
|
||||
static final def URL = "http://192.168.0.100:38080/FangJiaDataService/saveAmapPoiDetail"
|
||||
static final def URL = "http://192.168.0.80:38080/FangJiaDataService/saveAmapPoiDetail"
|
||||
// 住宅类
|
||||
static final String typecodes = "120000|120100|120200|120201|120202|120203|120300|120301|120302|120303|120304";
|
||||
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ import java.util.concurrent.atomic.AtomicLong
|
||||
class GetPoiFromExcel {
|
||||
|
||||
static final ExecutorService executorService = Executors.newFixedThreadPool(10)
|
||||
static final def URL = "http://192.168.0.100:38080/FangJiaDataService/saveAmapPoiDetail"
|
||||
static final def URL = "http://192.168.0.80:38080/FangJiaDataService/saveAmapPoiDetail"
|
||||
// 住宅类
|
||||
static final String typecodes = "120000|120100|120200|120201|120202|120203|120300|120301|120302|120303|120304";
|
||||
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import java.util.concurrent.Executors
|
||||
class SeaweedAroundCommittee {
|
||||
|
||||
static DBCollection conn136 = MongoUtils.getCollectionByName("fangjia", "seaweed_poi_sync", "192.168.0.136", 27017)
|
||||
static final def URL = "http://192.168.0.100:38080/FangJiaDataService/saveAmapPoi"
|
||||
static final def URL = "http://192.168.0.80:38080/FangJiaDataService/saveAmapPoi"
|
||||
static ExecutorService executorService = Executors.newFixedThreadPool(30)
|
||||
|
||||
static void main(String[] args) {
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@ import java.util.concurrent.Executors
|
||||
class SeaweedAroundPoi extends BaseBatch {
|
||||
|
||||
static DBCollection conn136 = MongoUtils.getCollectionByName("fangjia", "seaweed_poi_sync", "192.168.0.235", 27018)
|
||||
static final def URL = "http://192.168.0.100:38080/FangJiaDataService/saveAmapPoi"
|
||||
static final def URL = "http://192.168.0.80:38080/FangJiaDataService/saveAmapPoi"
|
||||
//static ExecutorService executorService = Executors.newFixedThreadPool(2)
|
||||
|
||||
static void main(String[] args) {
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ class SeaweedAroundPoiFromExcel {
|
||||
List<AmapPoi> pois = GaoDeUtils.searchNearDtoByPoi(city, types, lng, lat, 1000, "")
|
||||
if (CollectionUtils.isNotEmpty(pois)) {
|
||||
String jsonStr = JSONObject.toJSONString(pois)
|
||||
HttpUtils.postForJson("http://192.168.0.100:38080/FangJiaDataService/saveAmapPoi", jsonStr)
|
||||
HttpUtils.postForJson("http://192.168.0.80:38080/FangJiaDataService/saveAmapPoi", jsonStr)
|
||||
}
|
||||
Thread.sleep(1000)
|
||||
print(lng + " " + lat)
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ import java.util.concurrent.Executors
|
||||
class SeaweedAroundPoiSingal {
|
||||
|
||||
static def conn136 = MongoUtils.getCollectionByName3("fangjia", "seaweed_poi_sync", "mongodb://developer:G00IDCDEV12385@192.168.0.136:28017")
|
||||
static final def URL = "http://192.168.0.100:38080/FangJiaDataService/saveAmapPoi"
|
||||
static final def URL = "http://192.168.0.80:38080/FangJiaDataService/saveAmapPoi"
|
||||
|
||||
static void main(String[] args) {
|
||||
getNewSeaweed()
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ import java.util.concurrent.Executors
|
||||
class SeaweedPoiDetail {
|
||||
|
||||
static def conn136 = MongoUtils.getCollectionByName3("fangjia", "seaweed_poi_sync", "mongodb://developer:G00IDCDEV12385@192.168.0.136:28017")
|
||||
static final def URL = "http://192.168.0.100:38080/FangJiaDataService/saveAmapPoiDetail"
|
||||
static final def URL = "http://192.168.0.80:38080/FangJiaDataService/saveAmapPoiDetail"
|
||||
// 住宅类
|
||||
static final String typecodes = "120000|120100|120200|120201|120202|120203|120300|120301|120302|120303|120304";
|
||||
static final ExecutorService executorService = Executors.newFixedThreadPool(20)
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ import org.apache.commons.collections.CollectionUtils
|
||||
*/
|
||||
class YinlianLngLatAndAround {
|
||||
|
||||
static final def URL = "http://192.168.0.100:38080/FangJiaDataService/saveAmapPoi"
|
||||
static final def URL = "http://192.168.0.80:38080/FangJiaDataService/saveAmapPoi"
|
||||
|
||||
static void main(String[] args) {
|
||||
this.getAround()
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ class GaoDeUtils {
|
||||
static String getGaodeKey(String type) {
|
||||
// Map<String, String> params = new HashMap<>();
|
||||
// params.put("type", type)
|
||||
// JSONObject json = HttpRequestUtil.getJsonContent("http://192.168.0.100:38080/FangJiaDataService/getAmapKey", params)
|
||||
// JSONObject json = HttpRequestUtil.getJsonContent("http://192.168.0.80:38080/FangJiaDataService/getAmapKey", params)
|
||||
// if (json.status == 0 && json.result != null) {
|
||||
// return json.result
|
||||
// }
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ class BaiduMapUtils {
|
||||
return description;
|
||||
}
|
||||
|
||||
private static def PROXIES = ["192.168.0.90","192.168.0.93","192.168.0.94","192.168.0.96","192.168.0.98","192.168.0.99","192.168.0.100","192.168.0.101","192.168.0.102","192.168.0.103"]
|
||||
private static def PROXIES = ["192.168.0.90","192.168.0.93","192.168.0.94","192.168.0.96","192.168.0.98","192.168.0.99","192.168.0.80","192.168.0.101","192.168.0.102","192.168.0.103"]
|
||||
|
||||
private static def getContentFromUrl(urlStr) throws Exception{
|
||||
def result = null;
|
||||
|
||||
@@ -170,7 +170,7 @@ public class CommonUtils {
|
||||
|
||||
static void sendMessage(String queueName, byte[] bytes){
|
||||
ConnectionFactory factory = new ConnectionFactory();
|
||||
factory.setUri("amqp://guest:guest@192.168.0.100:35677/%2f");
|
||||
factory.setUri("amqp://guest:guest@192.168.0.80:35677/%2f");
|
||||
Connection conn = factory.newConnection();
|
||||
Channel channel = conn.createChannel();
|
||||
channel.queueDeclare(queueName, true, false, false, null);
|
||||
@@ -194,7 +194,7 @@ public class CommonUtils {
|
||||
}
|
||||
|
||||
static void recalcAverage(String city, String region, String name, Integer count =1 , String category="sell", Boolean retainHistory=true){
|
||||
def url = "http://192.168.0.100:38080/FangJiaDataService/districtPriceCalculate";
|
||||
def url = "http://192.168.0.80:38080/FangJiaDataService/districtPriceCalculate";
|
||||
def params = new HashMap<String,String>();
|
||||
params.city = city;
|
||||
params.region = region;
|
||||
|
||||
@@ -55,7 +55,7 @@ class HttpClient {
|
||||
new InetSocketAddress("192.168.0.94", 3234),
|
||||
new InetSocketAddress("192.168.0.90", 3234),
|
||||
new InetSocketAddress("192.168.0.99", 3234),
|
||||
new InetSocketAddress("192.168.0.100", 3234),
|
||||
new InetSocketAddress("192.168.0.80", 3234),
|
||||
new InetSocketAddress("192.168.0.101", 3234),
|
||||
new InetSocketAddress("192.168.0.102", 3234),
|
||||
new InetSocketAddress("192.168.0.103", 3234)
|
||||
@@ -68,7 +68,7 @@ class HttpClient {
|
||||
new InetSocketAddress("192.168.0.94", 4234),
|
||||
new InetSocketAddress("192.168.0.90", 4234),
|
||||
new InetSocketAddress("192.168.0.99", 4234),
|
||||
new InetSocketAddress("192.168.0.100", 4234),
|
||||
new InetSocketAddress("192.168.0.80", 4234),
|
||||
new InetSocketAddress("192.168.0.101", 4234),
|
||||
new InetSocketAddress("192.168.0.102", 4234),
|
||||
new InetSocketAddress("192.168.0.103", 4234)
|
||||
|
||||
+1
-1
@@ -374,7 +374,7 @@ public class OpenApiClient {
|
||||
params.put("token", TOKEN);
|
||||
// params.put("__refresh_cache","1")
|
||||
|
||||
//192.168.0.100:30115
|
||||
//192.168.0.80:30115
|
||||
String content = new HttpRequest().get("http://open.fangjia.com/address/standard", params, "utf-8")
|
||||
JSONObject result = JSONObject.fromObject(content);
|
||||
while (result == null) {
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@ class HttpClient {
|
||||
new InetSocketAddress("192.168.0.94", 3234),
|
||||
new InetSocketAddress("192.168.0.90", 3234),
|
||||
new InetSocketAddress("192.168.0.99", 3234),
|
||||
new InetSocketAddress("192.168.0.100", 3234),
|
||||
new InetSocketAddress("192.168.0.80", 3234),
|
||||
new InetSocketAddress("192.168.0.101", 3234),
|
||||
new InetSocketAddress("192.168.0.102", 3234),
|
||||
new InetSocketAddress("192.168.0.103", 3234)
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ class BasicInfoDataSynch extends BaseBatch{
|
||||
// final static DBCollection REGION_BLOCK_CONN = MongoUtils.getCollectionByName("fangjia", "region_block", MongoUtils.MongoDB_Domain_mongo)
|
||||
|
||||
|
||||
public static final def ZS_MONGODB_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
public static final def ZS_MONGODB_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
public static final DBCollection ZS_CITYS_CONN = MongoUtils.getCollectionByName2("fangjia", "server_area", ZS_MONGODB_URL)
|
||||
public static final DBCollection ZS_REGION_CONN = MongoUtils.getCollectionByName2("fangjia", "region_block", ZS_MONGODB_URL)
|
||||
public static final DBCollection ZS_TOWN_CONN = MongoUtils.getCollectionByName2("fangjia", "town", ZS_MONGODB_URL)
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import java.util.concurrent.atomic.AtomicLong
|
||||
@BatchOwner(Watcher.GaoJuan)
|
||||
class DistrictLevelBatch extends BaseBatch{
|
||||
|
||||
// public static final def ZS_MONGODB_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.100:30009";
|
||||
// public static final def ZS_MONGODB_URL = "mongodb://admin:G00MONGOADMIN@192.168.0.80:30009";
|
||||
// public static final DBCollection ZS_LEVEL_CONN = MongoUtils.getCollectionByName2("fangjia", "district_analy", ZS_MONGODB_URL)
|
||||
public static final zsDistLevelMap = [:]
|
||||
public static final DBCollection ZS_LEVEL_CONN = MongoUtils.getCollectionByName("fangjia_stat", "district_analy_data", "mongo.db.fangjia.com")
|
||||
|
||||
+3
-3
@@ -599,7 +599,7 @@ public class AddressMatchProxyServiceImpl extends AbstractHttpApiService impleme
|
||||
params.put("city", city);
|
||||
params.put("address", address);
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaAddressService/formatNinelevel", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaAddressService/formatNinelevel", params, "UTF-8");
|
||||
if (json != null && json.containsKey("msgCode") && json.getInt("msgCode") == 200) {
|
||||
if (json.containsKey("result")) {
|
||||
return (JSONObject) json.get("result");
|
||||
@@ -879,10 +879,10 @@ public class AddressMatchProxyServiceImpl extends AbstractHttpApiService impleme
|
||||
|
||||
params.put("useMap", String.valueOf(useMap));
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaNlpService/match", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaNlpService/match", params, "UTF-8");
|
||||
} catch (Exception e) {
|
||||
try {
|
||||
json = request.getJsonContent("http://192.168.0.100:32080/FangJiaNlpService/match", params, "UTF-8");
|
||||
json = request.getJsonContent("http://192.168.0.80:32080/FangJiaNlpService/match", params, "UTF-8");
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ public class InvokeHttpRequest {
|
||||
static boolean useProxy = true;
|
||||
|
||||
static String[] PROXY_HOSTS = new String[] { "192.168.0.98", "192.168.0.102", "192.168.0.96", "192.168.0.101",
|
||||
"192.168.0.103", "192.168.0.90", "192.168.0.93", "192.168.0.99", "192.168.0.94", "192.168.0.100" };
|
||||
"192.168.0.103", "192.168.0.90", "192.168.0.93", "192.168.0.99", "192.168.0.94", "192.168.0.80" };
|
||||
// static int PROXY_USE_COUNT=0;
|
||||
static AtomicInteger PROXY_USE_COUNT = new AtomicInteger();
|
||||
|
||||
|
||||
+3
-3
@@ -149,7 +149,7 @@ public class EfundMatchServiceImpl implements EfundMatchService {
|
||||
param.put("location", location);
|
||||
param.put("area", "100");
|
||||
try {
|
||||
json = httpRequest.getJsonContent("http://192.168.0.100:30020/avmWeb/avmAnn", param, "UTF-8");
|
||||
json = httpRequest.getJsonContent("http://192.168.0.80:30020/avmWeb/avmAnn", param, "UTF-8");
|
||||
if (json.containsKey("msg") && "成功".equals(json.getString("msg"))) {
|
||||
result.put("residential 1km _price", json.getInt("unitPrice"));
|
||||
result.append("update_time", DateUtil.formatByPattern(DateUtil.getFirstDayOfWeek(new Date()), "yyyy-MM-dd"));
|
||||
@@ -169,7 +169,7 @@ public class EfundMatchServiceImpl implements EfundMatchService {
|
||||
param.put("location", location);
|
||||
param.put("area", "100");
|
||||
try {
|
||||
json = httpRequest.getJsonContent("http://192.168.0.100:30020/avmWeb/avmAnn", param, "UTF-8");
|
||||
json = httpRequest.getJsonContent("http://192.168.0.80:30020/avmWeb/avmAnn", param, "UTF-8");
|
||||
if (json.containsKey("msg") && "成功".equals(json.getString("msg"))) {
|
||||
result.put("residential_1km_price", json.getInt("unitPrice"));
|
||||
result.append("update_time", DateUtil.formatByPattern(DateUtil.getFirstDayOfWeek(new Date()), "yyyy-MM-dd"));
|
||||
@@ -338,7 +338,7 @@ public class EfundMatchServiceImpl implements EfundMatchService {
|
||||
param.put("location", json.getString("gcj02"));
|
||||
param.put("area", "100");
|
||||
try {
|
||||
JSONObject avmJson = httpRequest.getJsonContent("http://192.168.0.100:30020/avmWeb/avmAnn", param, "UTF-8");
|
||||
JSONObject avmJson = httpRequest.getJsonContent("http://192.168.0.80:30020/avmWeb/avmAnn", param, "UTF-8");
|
||||
if (avmJson.containsKey("msg") && "成功".equals(avmJson.getString("msg"))) {
|
||||
result.put("residential_1km_price", avmJson.getInt("unitPrice"));
|
||||
result.append("update_time", DateUtil.formatByPattern(DateUtil.getFirstDayOfWeek(new Date()), "yyyy-MM-dd"));
|
||||
|
||||
Reference in New Issue
Block a user