Bläddra i källkod

手机端字典项常量替换

LiuHaoNan 1 år sedan
förälder
incheckning
87e02d79ad

+ 4 - 3
src/main/java/com/sooka/sponest/mobile/comprehensive/ConflictDefuseController/AppConflictResolutionController.java

@@ -1,6 +1,7 @@
 package com.sooka.sponest.mobile.comprehensive.conflictDefuseController;
 
 import com.ruoyi.common.core.constant.HttpStatus;
+import com.ruoyi.common.core.domain.DictKeys;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.common.core.web.controller.BaseController;
 import com.ruoyi.common.core.web.domain.AjaxResult;
@@ -48,9 +49,9 @@ public class AppConflictResolutionController extends BaseController {
         if(HttpStatus.SUCCESS == edit.getCode()){
             ConflictResolution conflictResolution = edit.getData();
             conflictResolution.setMainPersonIdCodeLabel(DictUtils.getDictDataByValue("comprehensive_certificate_code", conflictResolution.getMainPersonIdCode()));
-            conflictResolution.setMainPersonGenderLabel(DictUtils.getDictDataByValue("comprehensive_sex", conflictResolution.getMainPersonGender()));
-            conflictResolution.setMainPersonNationalityLabel(DictUtils.getDictDataByValue("comprehensive_nation", conflictResolution.getMainPersonNationality()));
-            conflictResolution.setMainPersonEducationLabel(DictUtils.getDictDataByValue("comprehensive_educational_background", conflictResolution.getMainPersonEducation()));
+            conflictResolution.setMainPersonGenderLabel(DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_SEX, conflictResolution.getMainPersonGender()));
+            conflictResolution.setMainPersonNationalityLabel(DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_NATION, conflictResolution.getMainPersonNationality()));
+            conflictResolution.setMainPersonEducationLabel(DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_EDUCATIONAL_BACKGROUND, conflictResolution.getMainPersonEducation()));
             conflictResolution.setResolutionSuccessLabel(!conflictResolution.getResolutionSuccess().isEmpty()?("1".equals(conflictResolution.getResolutionSuccess())?"是":"否"):"");
             return AjaxResult.success(conflictResolution);
         }else{

+ 4 - 4
src/main/java/com/sooka/sponest/mobile/comprehensive/organizationAndInstitutioncontroller/APPComprehensiveTPreventionTeam.java

@@ -47,11 +47,11 @@ public class APPComprehensiveTPreventionTeam {
         if(HttpStatus.SUCCESS == edit.getCode()){
             ComprehensiveTPreventionTeam comprehensiveTPreventionTeam = edit.getData();
             comprehensiveTPreventionTeam.setSpecialityLabel(String.join(",",DictUtils.getDictDataListByValue(DictKeys.COMPREHENSIVE_PROFESSIONAL_EXPERTISE,comprehensiveTPreventionTeam.getSpeciality())));
-            comprehensiveTPreventionTeam.setGenderLabel(DictUtils.getDictDataByValue("comprehensive_sex", comprehensiveTPreventionTeam.getGender()));
-            comprehensiveTPreventionTeam.setNationLabel(DictUtils.getDictDataByValue("comprehensive_nation", comprehensiveTPreventionTeam.getNation()));
-            comprehensiveTPreventionTeam.setPoliticalOutlookLabel(DictUtils.getDictDataByValue("comprehensive_political_status", comprehensiveTPreventionTeam.getPoliticalOutlook()));
+            comprehensiveTPreventionTeam.setGenderLabel(DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_SEX, comprehensiveTPreventionTeam.getGender()));
+            comprehensiveTPreventionTeam.setNationLabel(DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_NATION, comprehensiveTPreventionTeam.getNation()));
+            comprehensiveTPreventionTeam.setPoliticalOutlookLabel(DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_POLITICAL_STATUS, comprehensiveTPreventionTeam.getPoliticalOutlook()));
             comprehensiveTPreventionTeam.setCodeLabel(DictUtils.getDictDataByValue("comprehensive_certificate_code", comprehensiveTPreventionTeam.getCode()));
-            comprehensiveTPreventionTeam.setEducationLabel(DictUtils.getDictDataByValue("comprehensive_educational_background", comprehensiveTPreventionTeam.getEducation()));
+            comprehensiveTPreventionTeam.setEducationLabel(DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_EDUCATIONAL_BACKGROUND, comprehensiveTPreventionTeam.getEducation()));
 
             return AjaxResult.success(comprehensiveTPreventionTeam);
         }else{

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

@@ -175,18 +175,18 @@ public class AppPersonBasicInfoController {
 
     //    private void setPersonBasicInfo(JSONObject basicInfo){
     private void setPersonBasicInfo(HashMap<String, Object> basicInfo) {//0
-        basicInfo.put("genderLabel", getDictData("comprehensive_sex", String.valueOf(basicInfo.get("gender"))));//性别字典值
-        basicInfo.put("nationLabel", getDictData("comprehensive_nation", String.valueOf(basicInfo.get("nation"))));//民族字典值
-        basicInfo.put("maritalStatusLabel", getDictData("comprehensive_marital_status", String.valueOf(basicInfo.get("maritalStatus"))));//婚姻状况字典值
-        basicInfo.put("educationLabel", getDictData("comprehensive_educational_background", String.valueOf(basicInfo.get("education"))));//学历字典值
-        basicInfo.put("religiousBeliefLabel", null == basicInfo.get("religiousBelief") ? null : getDictData("comprehensive_religious_belief", String.valueOf(basicInfo.get("religiousBelief"))));//宗教信仰字典值
-        basicInfo.put("politicalOutlookLabel", getDictData("comprehensive_political_status", String.valueOf(basicInfo.get("politicalOutlook"))));//政治面貌字典值
-        basicInfo.put("occupationalCategoryLabel", getDictData("comprehensive_occupational_category", String.valueOf(basicInfo.get("occupationalCategory"))));//职业类别字典值
+        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"))));//婚姻状况字典值
+        basicInfo.put("educationLabel", getDictData(DictKeys.COMPREHENSIVE_EDUCATIONAL_BACKGROUND, String.valueOf(basicInfo.get("education"))));//学历字典值
+        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"))));//职业类别字典值
     }
 
     private void setRegisteredPopulation(HashMap<String, Object> json) {//1
         json.put("entryIdentityLabel", getDictData(DictKeys.COMPREHENSIVE_HOUSEHOLDS_IDENTIFICATION, String.valueOf(json.get("entryIdentity"))));//人户一致标识
-        json.put("accountRelationshipLabel", getDictData("comprehensive_relation", String.valueOf(json.get("accountRelationship"))));//与户主关系
+        json.put("accountRelationshipLabel", getDictData(DictKeys.COMPREHENSIVE_RELATION, String.valueOf(json.get("accountRelationship"))));//与户主关系
     }
 
     private void setFloatingPopulation(HashMap<String, Object> json) {//2
@@ -200,7 +200,7 @@ public class AppPersonBasicInfoController {
         json.put("entryIdentityLabel", getDictData(DictKeys.COMPREHENSIVE_HOUSEHOLDS_IDENTIFICATION, String.valueOf(json.get("entryIdentity"))));//人户一致标识
         json.put("leftBehindTypeLabel", getDictData(DictKeys.COMPREHENSIVE_LEFT_BEHIND_PERSONNEL_TYPE, String.valueOf(json.get("leftBehindType"))));//留守人员类型
         json.put("healthStatusLabel", null == json.get("healthStatus") ? null : getDictData(DictKeys.COMPREHENSIVE_HEALTH_STATUS, String.valueOf(json.get("healthStatus"))));//健康状况
-        json.put("leftBehindRelationshipLabel", getDictData("comprehensive_relation", String.valueOf(json.get("leftBehindRelationship"))));//与留守人员关系
+        json.put("leftBehindRelationshipLabel", getDictData(DictKeys.COMPREHENSIVE_RELATION, String.valueOf(json.get("leftBehindRelationship"))));//与留守人员关系
         json.put("keyFamilyHealthStatusLabel", null == json.get("keyFamilyHealthStatus") ? null : getDictData(DictKeys.COMPREHENSIVE_HEALTH_STATUS, String.valueOf(json.get("keyFamilyHealthStatus"))));//家庭主要成员健康状况
     }
 
@@ -219,7 +219,7 @@ public class AppPersonBasicInfoController {
     }
 
     private void setCommunityCorrectionStaff(HashMap<String, Object> json) {//6
-        json.put("caseCategoryLabel", getDictData("comprehensive_case_category", String.valueOf(json.get("caseCategory"))));//案件类别
+        json.put("caseCategoryLabel", getDictData(DictKeys.COMPREHENSIVE_CASE_CATEGORY, String.valueOf(json.get("caseCategory"))));//案件类别
         json.put("correctiveReleaseTypeLabel", null == json.get("correctiveReleaseType") ? null : getDictData(DictKeys.COMPREHENSIVE_CORRECTIVE_RELEASE_TYPE, String.valueOf(json.get("correctiveReleaseType"))));//矫正解除(终止)类型
         json.put("receivingModeLabel", getDictData(DictKeys.COMPREHENSIVE_RECEIVING_METHOD, String.valueOf(json.get("receivingMode"))));//接收方式
         json.put("correctionClassLabel", getDictData(DictKeys.COMPREHENSIVE_CORRECTIVE_CATEGORY, String.valueOf(json.get("correctionClass"))));//矫正类别
@@ -248,14 +248,14 @@ public class AppPersonBasicInfoController {
     private void setDrugAddict(HashMap<String, Object> json) {//8
         json.put("controlSituationLabel", getDictData(DictKeys.COMPREHENSIVE_GOVERNANCE, String.valueOf(json.get("controlSituation"))));//管控情况
         json.put("criminalHistoryLabel", null == json.get("criminalHistory") ? null : "1".equals(json.get("criminalHistory")) ? "有" : "无");//有无犯罪史
-        json.put("drugUseLabel", getDictData("comprehensive_case_consequence", String.valueOf(json.get("drugUse"))));//吸毒原因
-        json.put("drugAbuseLabel", null == json.get("drugAbuse") ? null : getDictData("comprehensive_case_consequence", String.valueOf(json.get("drugAbuse"))));//吸毒后果
+        json.put("drugUseLabel", getDictData(DictKeys.COMPREHENSIVE_CASE_CONSEQUENCE, String.valueOf(json.get("drugUse"))));//吸毒原因
+        json.put("drugAbuseLabel", null == json.get("drugAbuse") ? null : getDictData(DictKeys.COMPREHENSIVE_CASE_CONSEQUENCE, String.valueOf(json.get("drugAbuse"))));//吸毒后果
     }
 
     private void setAidsRisk(HashMap<String, Object> json) {//9
         json.put("routeInfectionLabel", getDictData(DictKeys.COMPREHENSIVE_ROUTE_OF_INFECTION, String.valueOf(json.get("routeInfection"))));//感染途径
         json.put("criminalHistoryLabel", "1".equals(json.get("criminalHistory")) ? "是" : "否");//是否有违法犯罪史
-        json.put("caseCategoryLabel", null == json.get("caseCategory") ? null : getDictData("comprehensive_case_category", String.valueOf(json.get("caseCategory"))));//案件类别
+        json.put("caseCategoryLabel", null == json.get("caseCategory") ? null : getDictData(DictKeys.COMPREHENSIVE_CASE_CATEGORY, String.valueOf(json.get("caseCategory"))));//案件类别
         json.put("concernTypeLabel", getDictData(DictKeys.COMPREHENSIVE_TYPE_OF_CONCERN, String.valueOf(json.get("concernType"))));//关注类型
         json.put("admissionSituationLabel", null == json.get("admissionSituation") ? null : getDictData(DictKeys.COMPREHENSIVE_ADMISSION_TO_INERTIA, String.valueOf(json.get("admissionSituation"))));//收治情况
     }
@@ -263,7 +263,7 @@ public class AppPersonBasicInfoController {
     private void setKeyYouth(HashMap<String, Object> json) {//10
         json.put("personTypeLabel", null == json.get("personType") ? null : getDictData(DictKeys.COMPREHENSIVE_TYPE_OF_PERSON, String.valueOf(json.get("personType"))));//人员类型
         json.put("familySituationLabel", getDictData(DictKeys.COMPREHENSIVE_FAMILY_INERTIA, String.valueOf(json.get("familySituation"))));//家庭情况
-        json.put("guardianRelationLabel", getDictData("comprehensive_relation", String.valueOf(json.get("guardianRelation"))));//与监护人关系
+        json.put("guardianRelationLabel", getDictData(DictKeys.COMPREHENSIVE_RELATION, String.valueOf(json.get("guardianRelation"))));//与监护人关系
         json.put("reoffendLabel", "1".equals(json.get("reoffend")) ? "是" : "否");//是否违法犯罪
         json.put("meansAssistanceLabel", getDictData(DictKeys.COMPREHENSIVE_MEANS_OF_HELP, String.valueOf(json.get("meansAssistance"))));//帮扶手段
     }

+ 15 - 14
src/main/java/com/sooka/sponest/mobile/comprehensive/socialPolicingController/AppVictimController.java

@@ -1,6 +1,7 @@
 package com.sooka.sponest.mobile.comprehensive.socialPolicingController;
 
 import com.ruoyi.common.core.constant.HttpStatus;
+import com.ruoyi.common.core.domain.DictKeys;
 import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.ruoyi.common.core.web.page.PageDomain;
 import com.ruoyi.common.core.web.page.TableDataInfo;
@@ -36,16 +37,16 @@ public class AppVictimController {
         String type = victim.getType();
         TableDataInfo list = victimService.getList(pageNum, pageSize, type);
         Map<String, Object> certificateCode = DictUtils.getDictCacheToMap("comprehensive_certificate_code");//证件代码
-        Map<String, Object> sex = DictUtils.getDictCacheToMap("comprehensive_sex");//性别
+        Map<String, Object> sex = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_SEX);//性别
 
 
         Map<String, Object> comprehensiveInternation = DictUtils.getDictCacheToMap("comprehensive_internation");//国籍(地区)
-        Map<String, Object> nation = DictUtils.getDictCacheToMap("comprehensive_nation");//民族
-        Map<String, Object> maritalStatus = DictUtils.getDictCacheToMap("comprehensive_marital_status");//婚姻状况
-        Map<String, Object> politicalStatus = DictUtils.getDictCacheToMap("comprehensive_political_status");//政治面貌
-        Map<String, Object> educationalBackground = DictUtils.getDictCacheToMap("comprehensive_educational_background");//学历
-        Map<String, Object> religiousBelief = DictUtils.getDictCacheToMap("comprehensive_religious_belief");//宗教信仰
-        Map<String, Object> occupationalCategory = DictUtils.getDictCacheToMap("comprehensive_occupational_category");//职业类别
+        Map<String, Object> nation = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_NATION);//民族
+        Map<String, Object> maritalStatus = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_MARITAL_STATUS);//婚姻状况
+        Map<String, Object> politicalStatus = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_POLITICAL_STATUS);//政治面貌
+        Map<String, Object> educationalBackground = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_EDUCATIONAL_BACKGROUND);//学历
+        Map<String, Object> religiousBelief = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_RELIGIOUS_BELIEF);//宗教信仰
+        Map<String, Object> occupationalCategory = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_OCCUPATIONAL_CATEGORY);//职业类别
 
         //isSevereMentalDisorderPatient     是否为严重精神障碍患者
         //isMinor                           是否为未成年人
@@ -86,14 +87,14 @@ public class AppVictimController {
             HashMap<String,Object> data = (HashMap<String, Object>) edit.get("data");
 
             data.put("identityCodeLabel",DictUtils.getDictDataByValue("comprehensive_certificate_code",data.get("identityCode").toString()));
-            data.put("genderLabel",DictUtils.getDictDataByValue("comprehensive_sex",data.get("gender").toString()));
+            data.put("genderLabel",DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_SEX,data.get("gender").toString()));
             data.put("nationalityRegionLabel",null == data.get("nationalityRegion")? "":DictUtils.getDictDataByValue("comprehensive_internation",data.get("nationalityRegion").toString()));
-            data.put("nationLabel",null == data.get("nation")? "":DictUtils.getDictDataByValue("comprehensive_nation",data.get("nation").toString()));
-            data.put("maritalStatusLabel",null == data.get("maritalStatus")? "":DictUtils.getDictDataByValue("comprehensive_marital_status",data.get("maritalStatus").toString()));
-            data.put("politicalOutlookLabel",null == data.get("politicalOutlook")? "":DictUtils.getDictDataByValue("comprehensive_political_status",data.get("politicalOutlook").toString()));
-            data.put("educationLabel",null == data.get("education")? "":DictUtils.getDictDataByValue("comprehensive_educational_background",data.get("education").toString()));
-            data.put("religiousBeliefsLabel",null == data.get("religiousBeliefs")? "":DictUtils.getDictDataByValue("comprehensive_religious_belief",data.get("religiousBeliefs").toString()));
-            data.put("occupationCategoryLabel",null == data.get("occupationCategory")? "":DictUtils.getDictDataByValue("comprehensive_occupational_category",data.get("occupationCategory").toString()));
+            data.put("nationLabel",null == data.get("nation")? "":DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_NATION,data.get("nation").toString()));
+            data.put("maritalStatusLabel",null == data.get("maritalStatus")? "":DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_MARITAL_STATUS,data.get("maritalStatus").toString()));
+            data.put("politicalOutlookLabel",null == data.get("politicalOutlook")? "":DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_POLITICAL_STATUS,data.get("politicalOutlook").toString()));
+            data.put("educationLabel",null == data.get("education")? "":DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_EDUCATIONAL_BACKGROUND,data.get("education").toString()));
+            data.put("religiousBeliefsLabel",null == data.get("religiousBeliefs")? "":DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_RELIGIOUS_BELIEF,data.get("religiousBeliefs").toString()));
+            data.put("occupationCategoryLabel",null == data.get("occupationCategory")? "":DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_OCCUPATIONAL_CATEGORY,data.get("occupationCategory").toString()));
 
             data.put("isSevereMentalDisorderPatientLabel",null == data.get("isSevereMentalDisorderPatient")? "":"1".equals(data.get("isSevereMentalDisorderPatient").toString())?"是":"否");
             data.put("isMinorLabel",null == data.get("isMinor")? "":"1".equals(data.get("isMinor").toString())?"是":"否");