瀏覽代碼

手机端字典项常量替换

LiuHaoNan 1 年之前
父節點
當前提交
139e3d3861

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

@@ -10,6 +10,7 @@ import com.ruoyi.common.security.utils.DictUtils;
 import com.sooka.sponest.comprehensive.api.comprehensiveConflictDefuse.domain.ConflictResolution;
 import com.sooka.sponest.comprehensive.api.comprehensiveOrganizationAndInstitution.domain.ComprehensiveTPreventionTeam;
 import com.sooka.sponest.comprehensive.api.comprehensiveOrganizationAndInstitution.service.ComprehensiveTPreventionTeamService;
+import com.sooka.sponest.comprehensive.api.dict.domain.DictKeys;
 import org.apache.commons.collections4.MapUtils;
 import org.apache.ibatis.util.MapUtil;
 import org.springframework.web.bind.annotation.*;
@@ -51,7 +52,7 @@ public class APPComprehensiveTPreventionTeam {
         R<ComprehensiveTPreventionTeam> edit = comprehensiveTPreventionTeamService.getInfo(id);
         if(HttpStatus.SUCCESS == edit.getCode()){
             ComprehensiveTPreventionTeam comprehensiveTPreventionTeam = edit.getData();
-            comprehensiveTPreventionTeam.setSpecialityLabel(String.join(",",DictUtils.getDictDataListByValue("comprehensive_professional_expertise",comprehensiveTPreventionTeam.getSpeciality())));
+            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()));

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

@@ -10,6 +10,7 @@ import com.ruoyi.common.core.web.page.TableSupport;
 import com.ruoyi.common.security.utils.DictUtils;
 import com.sooka.sponest.comprehensive.api.comprehensiveOrganizationAndInstitution.domain.ComprehensiveInstitutions;
 import com.sooka.sponest.comprehensive.api.comprehensiveOrganizationAndInstitution.service.RemoteInstitutionsService;
+import com.sooka.sponest.comprehensive.api.dict.domain.DictKeys;
 import org.springframework.web.bind.annotation.*;
 
 import javax.annotation.Resource;
@@ -40,8 +41,8 @@ public class AppInstitutionsController extends BaseController {
         Integer pageNum = pageDomain.getPageNum();
         Integer pageSize = pageDomain.getPageSize();
         TableDataInfo tableDataInfo = remoteInstitutionsService.selectComprehensiveInstitutionsList(pageNum, pageSize, comprehensiveInstitutions.getInstitutionName(), comprehensiveInstitutions.getInstitutionType(), comprehensiveInstitutions.getLevel());
-        Map<String, Object> comprehensiveInstitutionsType = DictUtils.getDictCacheToMap("comprehensive_Institutions_type");
-        Map<String, Object> comprehensiveLevels = DictUtils.getDictCacheToMap("comprehensive_levels");
+        Map<String, Object> comprehensiveInstitutionsType = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_INSTITUTIONS_TYPE);
+        Map<String, Object> comprehensiveLevels = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_LEVELS);
         List<HashMap<String, Object>> rows = (List<HashMap<String, Object>>) tableDataInfo.getRows();
         if (HttpStatus.SUCCESS == tableDataInfo.getCode()) {
             if (!rows.isEmpty()) {
@@ -70,8 +71,8 @@ public class AppInstitutionsController extends BaseController {
     public AjaxResult getInfo(String id) {
         R<ComprehensiveInstitutions> comprehensiveInstitutionsR = remoteInstitutionsService.selectComprehensiveInstitutionsById(id);
         ComprehensiveInstitutions data = comprehensiveInstitutionsR.getData();
-        data.setInstitutionTypeLabel(DictUtils.getDictDataByValue("comprehensive_Institutions_type", data.getInstitutionType()));
-        data.setLevelLabel(DictUtils.getDictDataByValue("comprehensive_levels", data.getLevel()));
+        data.setInstitutionTypeLabel(DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_INSTITUTIONS_TYPE, data.getInstitutionType()));
+        data.setLevelLabel(DictUtils.getDictDataByValue(DictKeys.COMPREHENSIVE_LEVELS, data.getLevel()));
         if (HttpStatus.SUCCESS == comprehensiveInstitutionsR.getCode()) {
             data.setIsEdit(true);
         } else if (HttpStatus.ERROR == comprehensiveInstitutionsR.getCode() && null != data) {

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

@@ -12,6 +12,7 @@ import com.ruoyi.common.security.utils.DictUtils;
 import com.sooka.sponest.comprehensive.api.comprehensivePersonBasicInfo.domain.OtherPersonInfo;
 import com.sooka.sponest.comprehensive.api.comprehensivePersonBasicInfo.domain.PersonBasicInfo;
 import com.sooka.sponest.comprehensive.api.comprehensivePersonBasicInfo.service.RemotePersonBasicInfoService;
+import com.sooka.sponest.comprehensive.api.dict.domain.DictKeys;
 import com.sooka.sponest.data.api.digitalenvironment.domain.EnvironmentBiggas;
 import com.sooka.sponest.data.api.digitalenvironment.service.RemoteBiggasService;
 import com.sooka.sponest.mobile.system.camera.service.AppCameraService;
@@ -187,23 +188,23 @@ public class AppPersonBasicInfoController {
     }
 
     private void setRegisteredPopulation(HashMap<String, Object> json) {//1
-        json.put("entryIdentityLabel", getDictData("comprehensive_households_identification", String.valueOf(json.get("entryIdentity"))));//人户一致标识
+        json.put("entryIdentityLabel", getDictData(DictKeys.COMPREHENSIVE_HOUSEHOLDS_IDENTIFICATION, String.valueOf(json.get("entryIdentity"))));//人户一致标识
         json.put("accountRelationshipLabel", getDictData("comprehensive_relation", String.valueOf(json.get("accountRelationship"))));//与户主关系
     }
 
     private void setFloatingPopulation(HashMap<String, Object> json) {//2
         json.put("inflowCauselabel", getDictData("comprehensive_inflow_reason", String.valueOf(json.get("inflowCause"))));//流入原因
         json.put("focusPeopleLabel", "1".equals(json.get("focusPeople")) ? "是" : "否");//是否重点关注人员
-        json.put("certificationTypeLabel", null == json.get("certificationType") ? null : getDictData("comprehensive_certification_type", String.valueOf(json.get("certificationType"))));//办证类型
-        json.put("domicileTypeLabel", getDictData("comprehensive_residence_type", String.valueOf(json.get("domicileType"))));//住所类型
+        json.put("certificationTypeLabel", null == json.get("certificationType") ? null : getDictData(DictKeys.COMPREHENSIVE_CERTIFICATION_TYPE, String.valueOf(json.get("certificationType"))));//办证类型
+        json.put("domicileTypeLabel", getDictData(DictKeys.COMPREHENSIVE_RESIDENCE_TYPE, String.valueOf(json.get("domicileType"))));//住所类型
     }
 
     private void setLeftBehindPerson(HashMap<String, Object> json) {//3
-        json.put("entryIdentityLabel", getDictData("comprehensive_households_identification", String.valueOf(json.get("entryIdentity"))));//人户一致标识
-        json.put("leftBehindTypeLabel", getDictData("comprehensive_left_behind_personnel_type", String.valueOf(json.get("leftBehindType"))));//留守人员类型
-        json.put("healthStatusLabel", null == json.get("healthStatus") ? null : getDictData("comprehensive_health_status", String.valueOf(json.get("healthStatus"))));//健康状况
+        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("keyFamilyHealthStatusLabel", null == json.get("keyFamilyHealthStatus") ? null : getDictData("comprehensive_health_status", String.valueOf(json.get("keyFamilyHealthStatus"))));//家庭主要成员健康状况
+        json.put("keyFamilyHealthStatusLabel", null == json.get("keyFamilyHealthStatus") ? null : getDictData(DictKeys.COMPREHENSIVE_HEALTH_STATUS, String.valueOf(json.get("keyFamilyHealthStatus"))));//家庭主要成员健康状况
     }
 
     private void setCampusAroundPerson(HashMap<String, Object> json) {//4
@@ -212,25 +213,25 @@ public class AppPersonBasicInfoController {
     }
 
     private void setPrisonReleased(HashMap<String, Object> json) {//5
-        json.put("originalChargeLabel", getDictData("comprehensive_offences_classification", String.valueOf(json.get("originalCharge"))));//原罪名
+        json.put("originalChargeLabel", getDictData(DictKeys.COMPREHENSIVE_OFFENCES_CLASSIFICATION, String.valueOf(json.get("originalCharge"))));//原罪名
         json.put("recidivismLabel", "1".equals(json.get("recidivism")) ? "是" : "否");//是否累犯
-        json.put("riskAssessmentTypeLabel", getDictData("comprehensive_hazard_assessment_type", String.valueOf(json.get("riskAssessmentType"))));//危险性评估类型
-        json.put("linkUpStatusLabel", getDictData("comprehensive_connection", String.valueOf(json.get("linkUpStatus"))));//衔接情况
-        json.put("placementStatusLabel", getDictData("comprehensive_placement", String.valueOf(json.get("placementStatus"))));//安置情况
+        json.put("riskAssessmentTypeLabel", getDictData(DictKeys.COMPREHENSIVE_HAZARD_ASSESSMENT_TYPE, String.valueOf(json.get("riskAssessmentType"))));//危险性评估类型
+        json.put("linkUpStatusLabel", getDictData(DictKeys.COMPREHENSIVE_CONNECTION, String.valueOf(json.get("linkUpStatus"))));//衔接情况
+        json.put("placementStatusLabel", getDictData(DictKeys.COMPREHENSIVE_PLACEMENT, String.valueOf(json.get("placementStatus"))));//安置情况
         json.put("reoffendLabel", "1".equals(json.get("reoffend")) ? "是" : "否");//是否重新犯罪
     }
 
     private void setCommunityCorrectionStaff(HashMap<String, Object> json) {//6
         json.put("caseCategoryLabel", getDictData("comprehensive_case_category", String.valueOf(json.get("caseCategory"))));//案件类别
-        json.put("receivingModeLabel", getDictData("comprehensive_receiving_method", String.valueOf(json.get("receivingMode"))));//接收方式
-        json.put("correctionClassLabel", getDictData("comprehensive_corrective_category", String.valueOf(json.get("correctionClass"))));//矫正类别
+        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"))));//矫正类别
         json.put("correctiveReleaseTypeLabel", null == json.get("correctiveReleaseType") ? null : getDictData("comprehensive_corrective_release_type", String.valueOf(json.get("correctiveReleaseType"))));//矫正解除(终止)类型
         json.put("tubeLabel", "1".equals(json.get("tube")) ? "是" : "否");//是否有脱管
         json.put("leakingPipesLabel", "1".equals(json.get("leakingPipes")) ? "是" : "否");//是否有漏管
         json.put("recidivismLabel", null == json.get("recidivism") ? null : "1".equals(json.get("recidivism")) ? "是" : "否");//是否累惯犯
         json.put("establishCorrectionTeamLabel", "1".equals(json.get("establishCorrectionTeam")) ? "是" : "否");//是否建立矫正小组
         json.put("reoffendLabel", "1".equals(json.get("reoffend")) ? "是" : "否");//是否重新犯罪
-        json.put("fourHistoriesListLabel", getDictDataList("comprehensive_four_histories_situation", (List<String>) json.get("fourHistoriesList")));//“四史”情况
+        json.put("fourHistoriesListLabel", getDictDataList(DictKeys.COMPREHENSIVE_THREE_INVOLVED_SITUATION, (List<String>) json.get("fourHistoriesList")));//“四史”情况
         json.put("threeStepListLabel", getDictDataList("comprehensive_three_involved_situation", (List<String>) json.get("threeStepList")));//“三涉”情况
         json.put("correctionTeamCompositionListLabel", getDictDataList("comprehensive_corrections_team_composition_type", (List<String>) json.get("correctionTeamCompositionList")));//矫正小组人员组成情况
     }