Sfoglia il codice sorgente

修改人员信息列表2260字典值

吕宣芝 1 anno fa
parent
commit
7cc96da381

+ 9 - 4
src/main/java/com/sooka/sponest/mobile/comprehensive/personBasicInfoController/AppPersonBasicInfoController.java

@@ -17,6 +17,8 @@ import org.springframework.web.bind.annotation.*;
 import javax.annotation.Resource;
 import java.util.*;
 
+import static com.ruoyi.common.security.utils.DictUtils.getComprehensiveDictCacheToMap;
+
 /**
  * @Author LG
  * @Date 2023/9/8 - 9:38
@@ -200,6 +202,7 @@ public class AppPersonBasicInfoController {
     }
 
     private void setPersonBasicInfo(HashMap<String, Object> basicInfo) {//0
+        Map<String, Object> comprehensiveDictCacheToMap = getComprehensiveDictCacheToMap(DictKeys.COMPREHENSIVE_CITY_CODE);
         basicInfo.put("genderLabel", getDictData(DictKeys.COMPREHENSIVE_SEX, String.valueOf(basicInfo.get("gender"))));//性别字典值
         basicInfo.put("nationLabel", getDictData(DictKeys.COMPREHENSIVE_NATION, String.valueOf(basicInfo.get("nation"))));//民族字典值
         basicInfo.put("maritalStatusLabel", getDictData(DictKeys.COMPREHENSIVE_MARITAL_STATUS, String.valueOf(basicInfo.get("maritalStatus"))));//婚姻状况字典值
@@ -207,8 +210,10 @@ public class AppPersonBasicInfoController {
         basicInfo.put("religiousBeliefLabel", null == basicInfo.get("religiousBelief") ? null : getDictData(DictKeys.COMPREHENSIVE_RELIGIOUS_BELIEF, String.valueOf(basicInfo.get("religiousBelief"))));//宗教信仰字典值
         basicInfo.put("politicalOutlookLabel", getDictData(DictKeys.COMPREHENSIVE_POLITICAL_STATUS, String.valueOf(basicInfo.get("politicalOutlook"))));//政治面貌字典值
         basicInfo.put("occupationalCategoryLabel", getDictData(DictKeys.COMPREHENSIVE_OCCUPATIONAL_CATEGORY, String.valueOf(basicInfo.get("occupationalCategory"))));//职业类别字典值
-        basicInfo.put("householdRegistrationLabel", getDictData(DictKeys.COMPREHENSIVE_CITY_CODE, String.valueOf(basicInfo.get("householdRegistration"))));//户籍地 2260
-        basicInfo.put("nativePlaceLabel", getDictData(DictKeys.COMPREHENSIVE_CITY_CODE, String.valueOf(basicInfo.get("nativePlace"))));//籍贯 2260
+        basicInfo.put("householdRegistrationLabel", comprehensiveDictCacheToMap.get(String.valueOf(basicInfo.get("householdRegistration"))));
+        basicInfo.put("nativePlaceLabel", comprehensiveDictCacheToMap.get(String.valueOf(basicInfo.get("nativePlace"))));
+//        basicInfo.put("householdRegistrationLabel", getDictData(DictKeys.COMPREHENSIVE_CITY_CODE, String.valueOf(basicInfo.get("householdRegistration"))));//户籍地 2260
+//        basicInfo.put("nativePlaceLabel", getDictData(DictKeys.COMPREHENSIVE_CITY_CODE, String.valueOf(basicInfo.get("nativePlace"))));//籍贯 2260
     }
 
     private void setRegisteredPopulation(HashMap<String, Object> json) {//1
@@ -311,7 +316,7 @@ public class AppPersonBasicInfoController {
         Integer delFlag = personBasicInfo.getDelFlag();
         Integer personType = personBasicInfo.getPersonType();
         TableDataInfo list = personBasicInfoService.getOtherList(pageNum, pageSize, delFlag, personType);
-        Map<String, Object> comprehensiveDictCacheToMap = DictUtils.getComprehensiveDictCacheToMap(DictKeys.COMPREHENSIVE_CITY_CODE);// 2260
+        Map<String, Object> comprehensiveDictCacheToMap = getComprehensiveDictCacheToMap(DictKeys.COMPREHENSIVE_CITY_CODE);// 2260
         if(!"".equals(list) && null != list){
             for (Object row : list.getRows()) {
                 HashMap r = (HashMap) row;
@@ -328,7 +333,7 @@ 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> comprehensiveDictCacheToMap = DictUtils.getComprehensiveDictCacheToMap(DictKeys.COMPREHENSIVE_CITY_CODE);// 2260
+            Map<String, Object> comprehensiveDictCacheToMap = getComprehensiveDictCacheToMap(DictKeys.COMPREHENSIVE_CITY_CODE);// 2260
             Map<String, Map<String, Object>> data = (Map<String, Map<String, Object>>) otherEdit.get("data");
             if (!comprehensiveDictCacheToMap.isEmpty()) {
                 data.computeIfPresent("basicInfo", (key, basicInfo) -> {