更新服务地址

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