ソースを参照

手机列表2260字典值

吕宣芝 1 年間 前
コミット
a5e26896dd

+ 19 - 1
src/main/java/com/sooka/sponest/mobile/comprehensive/organizationAndInstitutionController/AppBuildingLeaderController.java

@@ -18,6 +18,8 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import static com.ruoyi.common.security.utils.DictUtils.getComprehensiveDictCacheToMap;
+
 /**
  * 楼栋长管理
  *
@@ -45,11 +47,13 @@ public class AppBuildingLeaderController extends BaseController {
             Map<String, Object> maps = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_POLITICAL_STATUS);
             Map<String, Object> maps1 = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_NATION);
             Map<String, Object> maps2 = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_SEX);
+            Map<String, Object> maps3 = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_EDUCATIONAL_BACKGROUND);
             if (!rows.isEmpty()) {
                 for (HashMap<String, Object> row : rows) {
                     row.put("politicalOutlookLabel", maps.get(row.get("politicalOutlook")));
                     row.put("nationLabel", maps1.get(row.get("nation")));
                     row.put("genderLabel", maps2.get(row.get("gender")));
+                    row.put("educationLabel", maps3.get(row.get("education")));
                 }
             }
             return AjaxResult.success(tableDataInfo.getRows());
@@ -60,7 +64,21 @@ public class AppBuildingLeaderController extends BaseController {
 
     @GetMapping("/comprehensivebuildingleader/listAll")
     public AjaxResult listAll(ComprehensiveBuildingLeader comprehensivebuildingleader) {
-     return remoteBuildingLeaderService.listAll();
+        AjaxResult allUserInfo = remoteBuildingLeaderService.listAll();
+        if ("200".equals(allUserInfo.get("code").toString())){
+            Map<String, Object> maps = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_POLITICAL_STATUS);
+            Map<String, Object> maps1 = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_NATION);
+            Map<String, Object> maps2 = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_SEX);
+            Map<String, Object> maps3 = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_EDUCATIONAL_BACKGROUND);
+            List<Map<String, Object>> data = (List<Map<String, Object>>) allUserInfo.get("data");
+            for (Map<String, Object> map : data) {
+                map.put("politicalOutlookLabel", maps.get(map.get("politicalOutlook")));
+                map.put("nationLabel", maps1.get(map.get("nation")));
+                map.put("genderLabel", maps2.get(map.get("gender")));
+                map.put("educationLabel", maps3.get(map.get("education")));
+            }
+        }
+     return allUserInfo;
     }
 
     /**

+ 12 - 2
src/main/java/com/sooka/sponest/mobile/comprehensive/personBasicInfoController/AppPersonBasicInfoController.java

@@ -46,7 +46,7 @@ public class AppPersonBasicInfoController {
         Map<String, Object> comprehensiveReligiousBeliefMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_RELIGIOUS_BELIEF);//宗教信仰字典值
         Map<String, Object> comprehensivePoliticalStatusMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_POLITICAL_STATUS);//政治面貌字典值
         Map<String, Object> comprehensiveOccupationalCategoryMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_OCCUPATIONAL_CATEGORY);//职业类别字典值
-        Map<String, Object> comprehensiveCityCodeMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_CITY_CODE);//2260
+        Map<String, Object> comprehensiveCityCodeMap = DictUtils.getComprehensiveDictCacheToMap(DictKeys.COMPREHENSIVE_CITY_CODE);//2260
         for (HashMap<String, Object> row : rows) {
             row.put("genderLabel", comprehensiveSexMap.get(row.get("gender")));//性别字典值
             row.put("nationLabel", comprehensiveNationMap.get(row.get("nation")));//民族字典值
@@ -348,7 +348,17 @@ public class AppPersonBasicInfoController {
 
     @GetMapping("/PersonBasicInfo/getAllUserInfo")
     public AjaxResult getAllUserInfo(PersonBasicInfo personBasicInfo){
-        return personBasicInfoService.getAllUserInfo(personBasicInfo.getName());
+        AjaxResult allUserInfo = personBasicInfoService.getAllUserInfo(personBasicInfo.getName());
+        if ("200".equals(allUserInfo.get("code").toString())){
+            Map<String, Object> comprehensiveDictCacheToMap = getComprehensiveDictCacheToMap(DictKeys.COMPREHENSIVE_CITY_CODE);// 2260
+            List<Map<String, Object>> data = (List<Map<String, Object>>) allUserInfo.get("data");
+            for (Map<String, Object> map : data) {
+                map.put("householdRegistrationLabel", comprehensiveDictCacheToMap.get(map.get("householdRegistration")));// 户籍地 2260
+                map.put("nativePlaceLabel", comprehensiveDictCacheToMap.get(map.get("nativePlace")));// 籍贯 2260
+                map.put("currentResidencePlaceLabel", comprehensiveDictCacheToMap.get(map.get("currentResidencePlace")));// 2260
+            }
+        }
+        return allUserInfo;
     }
 
 }