瀏覽代碼

app综治字典label逻辑调整

lxz 1 年之前
父節點
當前提交
f9c4c3c6e1

+ 14 - 10
src/main/java/com/sooka/sponest/mobile/comprehensive/personBasicInfoController/AppPersonBasicInfoController.java

@@ -306,12 +306,13 @@ public class AppPersonBasicInfoController {
         Integer pageSize = pageDomain.getPageSize();
         Integer delFlag = personBasicInfo.getDelFlag();
         Integer personType = personBasicInfo.getPersonType();
-        List<HashMap<String, Object>> list = (List<HashMap<String, Object>>) personBasicInfoService.getOtherList(pageNum, pageSize, delFlag, personType);
+        TableDataInfo list = personBasicInfoService.getOtherList(pageNum, pageSize, delFlag, personType);
         Map<String, Object> comprehensiveCityCodeMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_CITY_CODE);//2260
-        if(!list.isEmpty() && null != list){
-            for (HashMap<String, Object> row : list) {
-                row.put("householdRegistrationLabel", comprehensiveCityCodeMap.get(row.get("householdRegistration")));//户籍地 2260
-                row.put("nativePlaceLabel", comprehensiveCityCodeMap.get(row.get("nativePlace")));//籍贯 2260
+        if(!"".equals(list) && null != list){
+            for (Object row : list.getRows()) {
+                HashMap r = (HashMap) row;
+                r.put("householdRegistrationLabel", comprehensiveCityCodeMap.get(r.get("householdRegistration")));//户籍地 2260
+                r.put("nativePlaceLabel", comprehensiveCityCodeMap.get(r.get("nativePlace")));//籍贯 2260
             }
             return AjaxResult.success(list);
         }else{
@@ -321,11 +322,14 @@ public class AppPersonBasicInfoController {
 
     @GetMapping("/PersonBasicInfo/getOtherEdit")
     public AjaxResult getOtherEdit(OtherPersonInfo otherPersonInfo){
-        HashMap<String, Object> map = personBasicInfoService.getOtherEdit(otherPersonInfo.getBasicId(), otherPersonInfo.getPersonType());
-        Map<String, Object> comprehensiveCityCodeMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_CITY_CODE);//2260
-        map.put("householdRegistrationLabel", comprehensiveCityCodeMap.get(map.get("householdRegistration")));//户籍地 2260
-        map.put("nativePlaceLabel", comprehensiveCityCodeMap.get(map.get("nativePlace")));//籍贯 2260
-        return AjaxResult.success(map);
+        AjaxResult otherEdit = personBasicInfoService.getOtherEdit(otherPersonInfo.getBasicId(), otherPersonInfo.getPersonType());
+        if ("200".equals(otherEdit.get("code").toString())){
+            Map<String, Object> comprehensiveCityCodeMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_CITY_CODE);//2260
+            HashMap data = (HashMap) otherEdit.get("data");
+            data.put("householdRegistrationLabel", comprehensiveCityCodeMap.get(data.get("householdRegistration")));//户籍地 2260
+            data.put("nativePlaceLabel", comprehensiveCityCodeMap.get(data.get("nativePlace")));//籍贯 2260
+        }
+        return AjaxResult.success(otherEdit);
     }
 
     @GetMapping("/PersonBasicInfo/getAllUserInfo")