南京银行涉农,我们出开发区用我们的结果
This commit is contained in:
+29
-21
@@ -434,38 +434,46 @@ public class AddrSvcController {
|
|||||||
if (json.containsKey("result")) {
|
if (json.containsKey("result")) {
|
||||||
//我们的结果
|
//我们的结果
|
||||||
JSONObject result = json.getJSONObject("result");
|
JSONObject result = json.getJSONObject("result");
|
||||||
try {
|
//我们省级及以上有开发区,直接用我们的结果
|
||||||
//如果是江苏省或者浙江省 调用齐梁的结果
|
if (result.containsKey("devDistrictName")) {
|
||||||
if ("江苏省".equals(result.getString("province")) || "浙江省".equals(result.getString("province"))) {
|
basicModel.setResult(result);
|
||||||
|
|
||||||
//结果比较,如果涉农结果不一致
|
} else {
|
||||||
//调用齐梁 type :1 对公 0 对私
|
try {
|
||||||
//我们 type :1 对私 2 对共
|
//如果是江苏省或者浙江省 调用齐梁的结果
|
||||||
String qltype = "2".equals(type) ? "1" : "0";
|
if ("江苏省".equals(result.getString("province")) || "浙江省".equals(result.getString("province"))) {
|
||||||
Map<String, String> map = senRequest(address, qltype);
|
|
||||||
// 涉农结果不一样
|
//结果比较,如果涉农结果不一致
|
||||||
if (!map.get("verifyFlag").equals(result.get("verifyFlag"))) {
|
//调用齐梁 type :1 对公 0 对私
|
||||||
//有市辖建制镇,用我们
|
//我们 type :1 对私 2 对共
|
||||||
if ("是".equals(result.get("administrativeTowns"))) {
|
String qltype = "2".equals(type) ? "1" : "0";
|
||||||
basicModel.setResult(result);
|
Map<String, String> map = senRequest(address, qltype);
|
||||||
|
// 涉农结果不一样
|
||||||
|
if (!map.get("verifyFlag").equals(result.get("verifyFlag"))) {
|
||||||
|
//有市辖建制镇,用我们
|
||||||
|
if ("是".equals(result.get("administrativeTowns"))) {
|
||||||
|
basicModel.setResult(result);
|
||||||
|
} else {
|
||||||
|
map.put("addrVerify", result.getString("addrVerify"));
|
||||||
|
map.put("typeName", areaMap.get(map.get("typeCode")));
|
||||||
|
basicModel.setResult(map);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
map.put("addrVerify", result.getString("addrVerify"));
|
basicModel.setResult(result);
|
||||||
map.put("typeName", areaMap.get(map.get("typeCode")));
|
|
||||||
basicModel.setResult(map);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
basicModel.setResult(result);
|
basicModel.setResult(result);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
basicModel.setResult(result);
|
basicModel.setResult(result);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
basicModel.setResult(result);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
mav.setModel(basicModel);
|
mav.setModel(basicModel);
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user