|
@@ -580,19 +580,19 @@ public class YyskAddressStandardizationServiceImpl {
|
|
public void tyaToServer(Integer startOidIndex, Integer page, Integer pageSize) {
|
|
public void tyaToServer(Integer startOidIndex, Integer page, Integer pageSize) {
|
|
System.out.println("page:" + page + ",pageSize:" + pageSize);
|
|
System.out.println("page:" + page + ",pageSize:" + pageSize);
|
|
long startTime = System.currentTimeMillis();
|
|
long startTime = System.currentTimeMillis();
|
|
- Page<YyszAddressV3All> sqlDatas = AreaService.getInstance().getTyaData3ByPage(page, pageSize);
|
|
|
|
- List<YyszAddressV3All> tYyszAddressList = sqlDatas.getContent();
|
|
|
|
|
|
+ Page<YyszAddressV3> sqlDatas = AreaService.getInstance().getTyaData2ByPage(page, pageSize);
|
|
|
|
+ List<YyszAddressV3> tYyszAddressList = sqlDatas.getContent();
|
|
JSONObject dataList = new JSONObject();
|
|
JSONObject dataList = new JSONObject();
|
|
// 操作类型 1:新增,2:更新3:删除
|
|
// 操作类型 1:新增,2:更新3:删除
|
|
dataList.put("optFlag", 1);
|
|
dataList.put("optFlag", 1);
|
|
JSONArray datas = new JSONArray();
|
|
JSONArray datas = new JSONArray();
|
|
- for (YyszAddressV3All tYyszAddress : tYyszAddressList) {
|
|
|
|
|
|
+ for (YyszAddressV3 tYyszAddress : tYyszAddressList) {
|
|
JSONObject dataItem = new JSONObject();
|
|
JSONObject dataItem = new JSONObject();
|
|
dataItem.put("oid", Long.valueOf(startOidIndex));
|
|
dataItem.put("oid", Long.valueOf(startOidIndex));
|
|
startOidIndex++;
|
|
startOidIndex++;
|
|
|
|
+// YyszAddressV3表映射
|
|
|
|
+ /*dataItem.put("sourceaddress", tYyszAddress.getAddress());
|
|
dataItem.put("address", tYyszAddress.getName());
|
|
dataItem.put("address", tYyszAddress.getName());
|
|
-// dataItem.put("address", initAddrMap.outAddrMapInAddr(tYyszAddress.getAddress()).getAddress());
|
|
|
|
- dataItem.put("sourceaddress", tYyszAddress.getAddress());
|
|
|
|
dataItem.put("city", tYyszAddress.getCityname());
|
|
dataItem.put("city", tYyszAddress.getCityname());
|
|
dataItem.put("county", tYyszAddress.getAdname());
|
|
dataItem.put("county", tYyszAddress.getAdname());
|
|
dataItem.put("town", tYyszAddress.getStreetTown());
|
|
dataItem.put("town", tYyszAddress.getStreetTown());
|
|
@@ -601,7 +601,21 @@ public class YyskAddressStandardizationServiceImpl {
|
|
dataItem.put("lat", tYyszAddress.getLocation().split(",")[1]);
|
|
dataItem.put("lat", tYyszAddress.getLocation().split(",")[1]);
|
|
dataItem.put("x",tYyszAddress.getLon());
|
|
dataItem.put("x",tYyszAddress.getLon());
|
|
dataItem.put("y",tYyszAddress.getLat());
|
|
dataItem.put("y",tYyszAddress.getLat());
|
|
- dataItem.put("address_type", tYyszAddress.getType());
|
|
|
|
|
|
+ dataItem.put("address_type", tYyszAddress.getType());*/
|
|
|
|
+
|
|
|
|
+// YyszAddressV3All表映射
|
|
|
|
+ dataItem.put("sourceaddress", tYyszAddress.getSourceaddress());
|
|
|
|
+ dataItem.put("address", initAddrMap.outAddrMapInAddr(tYyszAddress.getSourceaddress()).getAddress());
|
|
|
|
+ dataItem.put("city", tYyszAddress.getCity());
|
|
|
|
+ dataItem.put("county", tYyszAddress.getCounty());
|
|
|
|
+ dataItem.put("town", tYyszAddress.getTown());
|
|
|
|
+ dataItem.put("community", tYyszAddress.getCommunity());
|
|
|
|
+ dataItem.put("lon", tYyszAddress.getLon());
|
|
|
|
+ dataItem.put("lat", tYyszAddress.getLat());
|
|
|
|
+ dataItem.put("x",tYyszAddress.getX());
|
|
|
|
+ dataItem.put("y",tYyszAddress.getY());
|
|
|
|
+ dataItem.put("address_type", tYyszAddress.getNo1());
|
|
|
|
+
|
|
dataItem.put("createtime", getCurrentDateTime());
|
|
dataItem.put("createtime", getCurrentDateTime());
|
|
dataItem.put("updatetime", getCurrentDateTime());
|
|
dataItem.put("updatetime", getCurrentDateTime());
|
|
// dataItem.put("match_level", tYyszAddress.getMatchLevel());
|
|
// dataItem.put("match_level", tYyszAddress.getMatchLevel());
|
|
@@ -699,7 +713,7 @@ public class YyskAddressStandardizationServiceImpl {
|
|
dataItem.put("updatetime", getCurrentDateTime());
|
|
dataItem.put("updatetime", getCurrentDateTime());
|
|
dataItem.put("match_level", yyskAddressStandardization.getMatchLevel());
|
|
dataItem.put("match_level", yyskAddressStandardization.getMatchLevel());
|
|
datas.add(dataItem);
|
|
datas.add(dataItem);
|
|
- /*if (i != 0 && (i % (pageSize - 1) == 0 || i == listData.size() - 1)) {
|
|
|
|
|
|
+ if (i != 0 && (i % (pageSize - 1) == 0 || i == listData.size() - 1)) {
|
|
dataList.put("data", datas);
|
|
dataList.put("data", datas);
|
|
try {
|
|
try {
|
|
// System.out.println(AddressQueryEngine.getInstance().putDataToSJ_Big_Data(dataList));
|
|
// System.out.println(AddressQueryEngine.getInstance().putDataToSJ_Big_Data(dataList));
|
|
@@ -707,7 +721,7 @@ public class YyskAddressStandardizationServiceImpl {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
}
|
|
}
|
|
datas.clear();
|
|
datas.clear();
|
|
- }*/
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
dataList.put("data", datas);
|
|
dataList.put("data", datas);
|
|
try {
|
|
try {
|