Bläddra i källkod

app综治字典label逻辑调整

lxz 1 år sedan
förälder
incheckning
7d3eea96a0

+ 8 - 6
src/main/java/com/sooka/sponest/mobile/comprehensive/personBasicInfoController/AppPersonBasicInfoController.java

@@ -307,12 +307,13 @@ public class AppPersonBasicInfoController {
         Integer delFlag = personBasicInfo.getDelFlag();
         Integer personType = personBasicInfo.getPersonType();
         TableDataInfo list = personBasicInfoService.getOtherList(pageNum, pageSize, delFlag, personType);
-        Map<String, Object> comprehensiveCityCodeMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_CITY_CODE);//2260
+        RedisService redisService = SpringUtils.getBean(RedisService.class);
+        List<Map<String,Object>> cacheObject = redisService.getCacheObject("sys_dict:" + DictKeys.COMPREHENSIVE_CITY_CODE);//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
+                r.put("householdRegistrationLabel", cacheObject.get(0).get(r.get("householdRegistration")));//户籍地 2260
+                r.put("nativePlaceLabel", cacheObject.get(0).get(r.get("nativePlace")));//籍贯 2260
             }
             return AjaxResult.success(list);
         }else{
@@ -324,10 +325,11 @@ public class AppPersonBasicInfoController {
     public AjaxResult getOtherEdit(OtherPersonInfo otherPersonInfo){
         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
+            RedisService redisService = SpringUtils.getBean(RedisService.class);
+            List<Map<String,Object>> cacheObject = redisService.getCacheObject("sys_dict:" + 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
+            data.put("householdRegistrationLabel", cacheObject.get(0).get(data.get("householdRegistration")));//户籍地 2260
+            data.put("nativePlaceLabel", cacheObject.get(0).get(data.get("nativePlace")));//籍贯 2260
         }
         return AjaxResult.success(otherEdit);
     }