上海银行涉农

This commit is contained in:
majintao
2025-01-13 15:23:22 +08:00
parent 774bef6b48
commit 00d777ccdc
@@ -44,10 +44,7 @@ import java.io.IOException;
import java.net.Authenticator; import java.net.Authenticator;
import java.net.PasswordAuthentication; import java.net.PasswordAuthentication;
import java.nio.charset.Charset; import java.nio.charset.Charset;
import java.util.ArrayList; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
* 地址治理 * 地址治理
@@ -752,9 +749,89 @@ public class AddrSvcController {
int code = json.getInt("msgCode"); int code = json.getInt("msgCode");
String msg = json.getString("msg"); String msg = json.getString("msg");
BasicModel basicModel = new BasicModel(code, msg); BasicModel basicModel = new BasicModel(code, msg);
HashMap<String, String> map = new HashMap<String, String>(); HashMap<String, String> map = new LinkedHashMap<String, String>();
//我们的结果 //我们的结果
// "province": "江苏省",
// "city": "苏州市",
// "district": "昆山市",
// "town": "玉山镇",
// "committee": "南星渎村委会",
// "provinceCode": "320000000000",
// "cityCode": "320500000000",
// "districtCode": "320583000000",
// "townCode": "320583100000",
// "committeeCode": "320583100222",
// "typeCode": "220",
// "typeName": "村庄",
// "verifyFlag": "非农",
// "addrVerify": "地址有效",
// "countyLevelCity": "是",
// "administrativeTowns": "否",
// "countyGov": "否",
// "devDistrict": "是",
// "devDistrictName": "昆山高新技术产业开发区",
// "devLevel": "国家级",
// "addrArea": "开发区",
// "countyGovTown": "昆山开发区"
JSONObject result = json.getJSONObject("result"); JSONObject result = json.getJSONObject("result");
if (result.containsKey("province")) {
map.put("province", result.getString("province"));
}
if (result.containsKey("city")) {
map.put("city", result.getString("city"));
}
if (result.containsKey("district")) {
map.put("district", result.getString("district"));
}
if (result.containsKey("town")) {
map.put("town", result.getString("town"));
}
if (result.containsKey("committee")) {
map.put("committee", result.getString("committee"));
}
if (result.containsKey("provinceCode")) {
map.put("provinceCode", result.getString("provinceCode"));
}
if (result.containsKey("cityCode")) {
map.put("cityCode", result.getString("cityCode"));
}
if (result.containsKey("districtCode")) {
map.put("districtCode", result.getString("districtCode"));
}
if (result.containsKey("townCode")) {
map.put("townCode", result.getString("townCode"));
}
if (result.containsKey("committeeCode")) {
map.put("committeeCode", result.getString("committeeCode"));
}
if (result.containsKey("typeCode")) {
map.put("typeCode", result.getString("typeCode"));
}
if (result.containsKey("typeName")) {
map.put("typeName", result.getString("typeName"));
}
if (result.containsKey("verifyFlag")) {
map.put("verifyFlag", result.getString("verifyFlag"));
}
if (result.containsKey("addrVerify")) {
map.put("addrVerify", result.getString("addrVerify"));
}
if (result.containsKey("countyLevelCity")) {
map.put("countyLevelCity", result.getString("countyLevelCity"));
}
if (result.containsKey("administrativeTowns")) {
map.put("administrativeTowns", result.getString("administrativeTowns"));
}
if (result.containsKey("countyGov")) {
map.put("countyGov", result.getString("countyGov"));
}
if (result.containsKey("devDistrict")) {
map.put("devDistrict", result.getString("devDistrict"));
}
if (result.containsKey("devLevel")) {
map.put("devLevel", result.getString("devLevel"));
}
if (result.containsKey("addrArea")) { if (result.containsKey("addrArea")) {
map.put("addrArea", result.getString("addrArea")); map.put("addrArea", result.getString("addrArea"));
} }
@@ -764,9 +841,6 @@ public class AddrSvcController {
if (result.containsKey("countyGovTown")) { if (result.containsKey("countyGovTown")) {
map.put("countyGovTown", result.getString("countyGovTown")); map.put("countyGovTown", result.getString("countyGovTown"));
} }
if (result.containsKey("town")) {
map.put("town", result.getString("town"));
}
basicModel.setResult(map); basicModel.setResult(map);
mav.setModel(basicModel); mav.setModel(basicModel);
} else { } else {