|
@@ -55,14 +55,49 @@ public class AppPersonBasicInfoController {
|
|
|
setPersonBasicInfo(basicInfo);
|
|
|
List<HashMap<String, Object>> userBinds = (List<HashMap<String, Object>>) basicInfo.get("userBinds");
|
|
|
ArrayList<HashMap<String, Object>> otherInfo = (ArrayList<HashMap<String, Object>>) data.get("otherInfo");
|
|
|
-
|
|
|
+ Map<String, Object> result = new HashMap<>();
|
|
|
+ result.put("basicInfo",data.get("basicInfo"));
|
|
|
userBinds.forEach(bind -> {
|
|
|
otherInfo.stream()
|
|
|
.filter(info -> info.get("id").equals(bind.get("otherPersonId")))
|
|
|
.findFirst()
|
|
|
.ifPresent(info -> setLabel(info, (Integer) bind.get("otherPersonType")));
|
|
|
});
|
|
|
- return AjaxResult.success(data);
|
|
|
+ otherInfo.forEach(bind ->{
|
|
|
+ switch(String.valueOf(bind.get("otherPersonType"))){
|
|
|
+ case "1":
|
|
|
+ result.put("registeredPopulation", bind);
|
|
|
+ break;
|
|
|
+ case "2":
|
|
|
+ result.put("floatingPopulation", bind);
|
|
|
+ break;
|
|
|
+ case "3":
|
|
|
+ result.put("leftBehindPerson", bind);
|
|
|
+ break;
|
|
|
+ case "4":
|
|
|
+ result.put("campusAroundPerson", bind);
|
|
|
+ break;
|
|
|
+ case "5":
|
|
|
+ result.put("prisonReleased", bind);
|
|
|
+ break;
|
|
|
+ case "6":
|
|
|
+ result.put("communityCorrectionStaff", bind);
|
|
|
+ break;
|
|
|
+ case "7":
|
|
|
+ result.put("psychosisPopulation", bind);
|
|
|
+ break;
|
|
|
+ case "8":
|
|
|
+ result.put("drugAddict", bind);
|
|
|
+ break;
|
|
|
+ case "9":
|
|
|
+ result.put("aidsRisk", bind);
|
|
|
+ break;
|
|
|
+ case "10":
|
|
|
+ result.put("keyYouth", bind);
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return AjaxResult.success(result);
|
|
|
} else {
|
|
|
return ajaxResult;
|
|
|
}
|