Commit b3c5c7e5 by yangyang

内蒙时空相关接口对接(内蒙)

parent fc9caf2b
......@@ -163,49 +163,54 @@ public class PeopleServiceImpl implements PeopleService {
public List getXnXxInfo(String objectType, String objectValue) {
/*手机信息目录*/
List childrenList = new ArrayList();
HttpEntity<JSONObject> jsonObject = restTemplate.getForEntity("http://26.3.13.120:8501/nmsj/getMyWxQqZcXxFw?xnhm=" + objectValue, JSONObject.class);
// qq 微信等
/* HttpEntity<JSONObject> jsonObject = restTemplate.getForEntity("http://26.3.13.120:8501/nmsj/getMyWxQqZcXxFw?xnhm=" + objectValue, JSONObject.class);
if (StringUtils.isNotEmpty(String.valueOf(jsonObject.getBody()))) {
if (jsonObject.getBody().containsKey("data")) {
LinkedHashMap resultJson = (LinkedHashMap) jsonObject.getBody().get("data");//获取返回的数据结果
List<LinkedHashMap> array = (List<LinkedHashMap>) resultJson.get("rows");
for (int i = 0; i < array.size(); i++) {
LinkedHashMap object = array.get(i);
String bshxx = (String) object.get("bshxx");
String bshlx = (String) object.get("bshlx");
PeopleInfo peopleInfo1 = new PeopleInfo();
if ("06".equals(bshlx)) {
peopleInfo1.setObjectType("06");
peopleInfo1.setObjectValue(bshxx);
childrenList.add(peopleInfo1);
} else if ("07".equals(bshlx)) {
peopleInfo1.setObjectType("07");
peopleInfo1.setObjectValue(bshxx);
childrenList.add(peopleInfo1);
if(null!=array){
for (int i = 0; i < array.size(); i++) {
LinkedHashMap object = array.get(i);
String bshxx = (String) object.get("bshxx");
String bshlx = (String) object.get("bshlx");
PeopleInfo peopleInfo1 = new PeopleInfo();
if ("06".equals(bshlx)) {
peopleInfo1.setObjectType("06");
peopleInfo1.setObjectValue(bshxx);
childrenList.add(peopleInfo1);
} else if ("07".equals(bshlx)) {
peopleInfo1.setObjectType("07");
peopleInfo1.setObjectValue(bshxx);
childrenList.add(peopleInfo1);
}
}
}
}
}
}*/
// 四码信息
HttpEntity<JSONObject> jsonObject2 = restTemplate.getForEntity("http://26.3.13.120:8501/nmsj/getSjXx?sjhm=" + objectValue, JSONObject.class);
if (StringUtils.isNotEmpty(String.valueOf(jsonObject2.getBody()))) {
if (jsonObject2.getBody().containsKey("data")) {
JSONObject resultJson = jsonObject2.getBody().getJSONObject("data");//获取返回的数据结果
JSONArray array = resultJson.getJSONObject("rows").getJSONArray("bshxx");
System.out.println(array);
for (int i = 0; i < resultJson.size(); i++) {
JSONObject object = array.getJSONObject(i);
String bshxx = (String) object.get("bshxx");
String bshlx = (String) object.get("bshlx");
PeopleInfo peopleInfo1 = new PeopleInfo();
if ("04".equals(bshlx)) {
peopleInfo1.setObjectType("08");
peopleInfo1.setObjectValue(bshxx);
childrenList.add(peopleInfo1);
} else if ("05".equals(bshlx)) {
peopleInfo1.setObjectType("05");
peopleInfo1.setObjectValue(bshxx);
childrenList.add(peopleInfo1);
if(array.size()>0){
for (int i = 0; i < resultJson.size(); i++) {
JSONObject object = array.getJSONObject(i);
String bshxx = (String) object.get("bshxx");
String bshlx = (String) object.get("bshlx");
PeopleInfo peopleInfo1 = new PeopleInfo();
if ("04".equals(bshlx)) {
peopleInfo1.setObjectType("08");
peopleInfo1.setObjectValue(bshxx);
childrenList.add(peopleInfo1);
} else if ("05".equals(bshlx)) {
peopleInfo1.setObjectType("05");
peopleInfo1.setObjectValue(bshxx);
childrenList.add(peopleInfo1);
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment