|
@@ -4,19 +4,22 @@ import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.ruoyi.common.core.constant.HttpStatus;
|
|
|
import com.ruoyi.common.core.domain.DictKeys;
|
|
|
+import com.ruoyi.common.core.utils.StringUtils;
|
|
|
import com.ruoyi.common.core.web.domain.AjaxResult;
|
|
|
import com.ruoyi.common.core.web.page.PageDomain;
|
|
|
-import com.ruoyi.common.core.web.page.TableDataInfo;
|
|
|
import com.ruoyi.common.core.web.page.TableSupport;
|
|
|
import com.ruoyi.common.security.utils.DictUtils;
|
|
|
import com.sooka.sponest.comprehensive.api.comprehensivePersonBasicInfo.domain.*;
|
|
|
import com.sooka.sponest.comprehensive.api.comprehensivePersonBasicInfo.service.RemotePersonBasicInfoService;
|
|
|
import com.sooka.sponest.data.api.digitalenvironment.domain.EnvironmentBiggas;
|
|
|
+import org.apache.commons.collections4.MapUtils;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
+import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
|
|
|
+import static com.ruoyi.common.core.domain.DictKeys.*;
|
|
|
import static com.ruoyi.common.security.utils.DictUtils.getComprehensiveDictCacheToMap;
|
|
|
|
|
|
/**
|
|
@@ -34,30 +37,20 @@ public class AppPersonBasicInfoController {
|
|
|
*/
|
|
|
@GetMapping("/PersonBasicInfo/list")
|
|
|
public AjaxResult list(PersonBasicInfo info) {
|
|
|
+ System.out.println("start --> " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date()));
|
|
|
PageDomain pageDomain = TableSupport.buildPageRequest();
|
|
|
- Integer pageNum = pageDomain.getPageNum();
|
|
|
- Integer pageSize = pageDomain.getPageSize();
|
|
|
- Integer delFlag = info.getDelFlag();
|
|
|
- List<HashMap<String, Object>> rows = (List<HashMap<String, Object>>) personBasicInfoService.getList(info.getName(), pageNum, pageSize, delFlag).getRows();
|
|
|
- Map<String, Object> comprehensiveSexMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_SEX);//性别字典值
|
|
|
- Map<String, Object> comprehensiveNationMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_NATION);//民族字典值
|
|
|
- Map<String, Object> comprehensiveMaritalStatusMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_MARITAL_STATUS);//婚姻状况字典值
|
|
|
- Map<String, Object> comprehensiveEducationalBackgroundMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_EDUCATIONAL_BACKGROUND);//学历字典值
|
|
|
- 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.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")));//民族字典值
|
|
|
- row.put("maritalStatusLabel", comprehensiveMaritalStatusMap.get(row.get("maritalStatus")));//婚姻状况字典值
|
|
|
- row.put("educationLabel", comprehensiveEducationalBackgroundMap.get(row.get("education")));//学历字典值
|
|
|
- row.put("religiousBeliefLabel", null == row.get("religiousBelief") ? null : comprehensiveReligiousBeliefMap.get(row.get("religiousBelief")));//宗教信仰字典值
|
|
|
- row.put("politicalOutlookLabel", comprehensivePoliticalStatusMap.get(row.get("politicalOutlook")));//政治面貌字典值
|
|
|
- row.put("occupationalCategoryLabel", comprehensiveOccupationalCategoryMap.get(row.get("occupationalCategory")));//职业类别字典值
|
|
|
- row.put("householdRegistrationLabel", comprehensiveCityCodeMap.get(row.get("householdRegistration")));//户籍地 2260
|
|
|
- row.put("nativePlaceLabel", comprehensiveCityCodeMap.get(row.get("nativePlace")));//籍贯 2260
|
|
|
+ //noinspection unchecked
|
|
|
+ List<HashMap<String, Object>> rows = (List<HashMap<String, Object>>) personBasicInfoService.getList(
|
|
|
+ info.getName(),
|
|
|
+ pageDomain.getPageNum(),
|
|
|
+ pageDomain.getPageSize(),
|
|
|
+ info.getDelFlag(),
|
|
|
+ info.getTotal()
|
|
|
+ ).getRows();
|
|
|
+ if (StringUtils.isNotEmpty(rows)) {
|
|
|
+ setDictValue(rows);
|
|
|
}
|
|
|
+ System.out.println("end --> " + new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date()));
|
|
|
return AjaxResult.success(rows);
|
|
|
}
|
|
|
|
|
@@ -71,19 +64,19 @@ public class AppPersonBasicInfoController {
|
|
|
if ("200".equals(ajaxResult.get("code").toString())) {
|
|
|
Map<String, Object> data = (Map<String, Object>) ajaxResult.get("data");
|
|
|
HashMap<String, Object> basicInfo = (HashMap<String, Object>) data.get("basicInfo");
|
|
|
- setPersonBasicInfo(basicInfo);
|
|
|
+ setPersonBasicInfo(basicInfo, null, null);
|
|
|
List<HashMap<String, Object>> userBinds = (List<HashMap<String, Object>>) basicInfo.get("userBinds");
|
|
|
ArrayList<HashMap<String, Object>> otherInfo = (ArrayList<HashMap<String, Object>>) data.get("otherInfo");
|
|
|
Map<String, Object> result = new HashMap<>();
|
|
|
- result.put("basicInfo",data.get("basicInfo"));
|
|
|
+ result.put("basicInfo", data.get("basicInfo"));
|
|
|
userBinds.forEach(bind -> {
|
|
|
otherInfo.stream()
|
|
|
.filter(info -> info.get("id").equals(bind.get("otherPersonId")))
|
|
|
.findFirst()
|
|
|
.ifPresent(info -> setLabel(info, (Integer) bind.get("otherPersonType")));
|
|
|
});
|
|
|
- otherInfo.forEach(bind ->{
|
|
|
- switch(String.valueOf(bind.get("otherPersonType"))){
|
|
|
+ otherInfo.forEach(bind -> {
|
|
|
+ switch (String.valueOf(bind.get("otherPersonType"))) {
|
|
|
case "1":
|
|
|
setRegisteredPopulation(bind);
|
|
|
RegisteredPopulationInfo registeredPopulationInfo = JSONObject.toJavaObject(new JSONObject(bind), RegisteredPopulationInfo.class);
|
|
@@ -201,7 +194,7 @@ public class AppPersonBasicInfoController {
|
|
|
/**
|
|
|
* 数据格式转换,将JSONString类型替换为List
|
|
|
*/
|
|
|
- private String dataToList(String json){
|
|
|
+ private String dataToList(String json) {
|
|
|
JSONObject jsonObject = JSONObject.parseObject(json);
|
|
|
Set<String> strings = jsonObject.keySet();
|
|
|
JSONArray list = new JSONArray();
|
|
@@ -226,25 +219,59 @@ public class AppPersonBasicInfoController {
|
|
|
* state = 2 通过, state = 1 拒绝
|
|
|
*/
|
|
|
@GetMapping("/PersonBasicInfo/delInfo")
|
|
|
- public AjaxResult delInfo(@RequestParam("id") String id, @RequestParam("state") String state){
|
|
|
+ public AjaxResult delInfo(@RequestParam("id") String id, @RequestParam("state") String state) {
|
|
|
return personBasicInfoService.delInfo(id, state);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 设置人员基础信息字典值
|
|
|
*/
|
|
|
- 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"))));//婚姻状况字典值
|
|
|
- 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"))));//职业类别字典值
|
|
|
- basicInfo.put("householdRegistrationLabel", comprehensiveDictCacheToMap.get(String.valueOf(basicInfo.get("householdRegistration"))));
|
|
|
- basicInfo.put("nativePlaceLabel", comprehensiveDictCacheToMap.get(String.valueOf(basicInfo.get("nativePlace"))));
|
|
|
- basicInfo.put("currentResidencePlaceLabel", comprehensiveDictCacheToMap.get(String.valueOf(basicInfo.get("currentResidencePlace"))));
|
|
|
+ private void setPersonBasicInfo(HashMap<String, Object> basicInfo, Map<String, Map<String, Object>> dictMaps, Map<String, Object> cityMaps) {//0
|
|
|
+ if(StringUtils.isEmpty(dictMaps)){
|
|
|
+ String[] dictKeys = {
|
|
|
+ COMPREHENSIVE_SEX, //性别
|
|
|
+ COMPREHENSIVE_NATION, //民族
|
|
|
+ COMPREHENSIVE_MARITAL_STATUS, //婚姻状况
|
|
|
+ COMPREHENSIVE_EDUCATIONAL_BACKGROUND, //学历
|
|
|
+ COMPREHENSIVE_RELIGIOUS_BELIEF, //宗教信仰
|
|
|
+ COMPREHENSIVE_POLITICAL_STATUS, //政治面貌
|
|
|
+ COMPREHENSIVE_OCCUPATIONAL_CATEGORY //职业类别
|
|
|
+ };
|
|
|
+ dictMaps = DictUtils.getDictCacheToMapByArray(dictKeys);
|
|
|
+ }
|
|
|
+ if(StringUtils.isEmpty(cityMaps)){
|
|
|
+ cityMaps = getComprehensiveDictCacheToMap(DictKeys.COMPREHENSIVE_CITY_CODE);
|
|
|
+ }
|
|
|
+ basicInfo.put("genderLabel", MapUtils.getMap(dictMaps, COMPREHENSIVE_SEX).get(mapUtilsGetString(basicInfo, "gender")));//性别字典值
|
|
|
+ basicInfo.put("nationLabel", MapUtils.getMap(dictMaps, COMPREHENSIVE_NATION).get(mapUtilsGetString(basicInfo, "nation")));//民族字典值
|
|
|
+ basicInfo.put("maritalStatusLabel", MapUtils.getMap(dictMaps, COMPREHENSIVE_MARITAL_STATUS).get(mapUtilsGetString(basicInfo, "maritalStatus")));//婚姻状况字典值
|
|
|
+ basicInfo.put("educationLabel", MapUtils.getMap(dictMaps, COMPREHENSIVE_EDUCATIONAL_BACKGROUND).get(mapUtilsGetString(basicInfo, "education")));//学历字典值
|
|
|
+ basicInfo.put("religiousBeliefLabel", null == MapUtils.getString(basicInfo, "religiousBelief") ? null : MapUtils.getMap(dictMaps, COMPREHENSIVE_RELIGIOUS_BELIEF).get(MapUtils.getString(basicInfo, "religiousBelief")));//宗教信仰字典值
|
|
|
+ basicInfo.put("politicalOutlookLabel", MapUtils.getMap(dictMaps, COMPREHENSIVE_POLITICAL_STATUS).get(mapUtilsGetString(basicInfo, "politicalOutlook")));//政治面貌字典值
|
|
|
+ basicInfo.put("occupationalCategoryLabel", MapUtils.getMap(dictMaps, COMPREHENSIVE_OCCUPATIONAL_CATEGORY).get(mapUtilsGetString(basicInfo, "occupationalCategory")));//职业类别字典值
|
|
|
+ basicInfo.put("householdRegistrationLabel", cityMaps.get(mapUtilsGetString(basicInfo, "householdRegistration")));//户籍地 2260
|
|
|
+ basicInfo.put("nativePlaceLabel", cityMaps.get(mapUtilsGetString(basicInfo, "nativePlace")));//籍贯 2260
|
|
|
+ basicInfo.put("currentResidencePlaceLabel", cityMaps.get(mapUtilsGetString(basicInfo,"currentResidencePlace")));
|
|
|
+ basicInfo.put("isResidentLabel", "1".equals(MapUtils.getString(basicInfo, "isResident"))? "是":"否");
|
|
|
+ }
|
|
|
+
|
|
|
+ private void setDictValue(List<HashMap<String, Object>> rows){
|
|
|
+ String[] dictKeys = {
|
|
|
+ COMPREHENSIVE_SEX, //性别
|
|
|
+ COMPREHENSIVE_NATION, //民族
|
|
|
+ COMPREHENSIVE_MARITAL_STATUS, //婚姻状况
|
|
|
+ COMPREHENSIVE_EDUCATIONAL_BACKGROUND, //学历
|
|
|
+ COMPREHENSIVE_RELIGIOUS_BELIEF, //宗教信仰
|
|
|
+ COMPREHENSIVE_POLITICAL_STATUS, //政治面貌
|
|
|
+ COMPREHENSIVE_OCCUPATIONAL_CATEGORY //职业类别
|
|
|
+ };
|
|
|
+ Map<String, Map<String, Object>> dictMaps = DictUtils.getDictCacheToMapByArray(dictKeys);
|
|
|
+ Map<String, Object> cityMaps = getComprehensiveDictCacheToMap(COMPREHENSIVE_CITY_CODE);// 2260
|
|
|
+ if (null != rows && !rows.isEmpty()) {
|
|
|
+ for (HashMap<String, Object> row : rows) {
|
|
|
+ setPersonBasicInfo(row, dictMaps, cityMaps);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -354,11 +381,11 @@ 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(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"))));//帮扶手段
|
|
|
+ json.put("personTypeLabel", null == json.get("personType") ? null : getDictData(COMPREHENSIVE_TYPE_OF_PERSON, mapUtilsGetString(json,"personType")));//人员类型
|
|
|
+ json.put("familySituationLabel", getDictData(COMPREHENSIVE_FAMILY_INERTIA, mapUtilsGetString(json,"familySituation")));//家庭情况
|
|
|
+ json.put("guardianRelationLabel", getDictData(COMPREHENSIVE_RELATION, mapUtilsGetString(json,"guardianRelation")));//与监护人关系
|
|
|
+ json.put("reoffendLabel", "1".equals(MapUtils.getString(json,"reoffend")) ? "是" : "否");//是否违法犯罪
|
|
|
+ json.put("meansAssistanceLabel", getDictData(COMPREHENSIVE_MEANS_OF_HELP, mapUtilsGetString(json,"meansAssistance")));//帮扶手段
|
|
|
}
|
|
|
|
|
|
private String getDictData(String dictKey, String value) {
|
|
@@ -369,53 +396,40 @@ public class AppPersonBasicInfoController {
|
|
|
return DictUtils.getDictDataListByValue(dictKey, values);
|
|
|
}
|
|
|
|
|
|
+ private String mapUtilsGetString(Map<String, Object> map, String key) {
|
|
|
+ return MapUtils.getString(map,key);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 查询其他人员类型列表
|
|
|
*/
|
|
|
@GetMapping("/PersonBasicInfo/getOtherList")
|
|
|
- public AjaxResult getOtherList(PersonBasicInfo personBasicInfo){
|
|
|
+ public AjaxResult getOtherList(PersonBasicInfo personBasicInfo) {
|
|
|
PageDomain pageDomain = TableSupport.buildPageRequest();
|
|
|
- Integer pageNum = pageDomain.getPageNum();
|
|
|
- Integer pageSize = pageDomain.getPageSize();
|
|
|
- Integer delFlag = personBasicInfo.getDelFlag();
|
|
|
- Integer personType = personBasicInfo.getPersonType();
|
|
|
- List<HashMap<String, Object>> rows = (List<HashMap<String, Object>>) personBasicInfoService.getOtherList(pageNum, pageSize, delFlag, personType).getRows();
|
|
|
- Map<String, Object> comprehensiveSexMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_SEX);//性别字典值
|
|
|
- Map<String, Object> comprehensiveNationMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_NATION);//民族字典值
|
|
|
- Map<String, Object> comprehensiveMaritalStatusMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_MARITAL_STATUS);//婚姻状况字典值
|
|
|
- Map<String, Object> comprehensiveEducationalBackgroundMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_EDUCATIONAL_BACKGROUND);//学历字典值
|
|
|
- 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> comprehensiveDictCacheToMap = getComprehensiveDictCacheToMap(DictKeys.COMPREHENSIVE_CITY_CODE);// 2260
|
|
|
- if( null != rows && !rows.isEmpty()){
|
|
|
- for (HashMap row : rows) {
|
|
|
- row.put("genderLabel", comprehensiveSexMap.get(row.get("gender")));//性别字典值
|
|
|
- row.put("nationLabel", comprehensiveNationMap.get(row.get("nation")));//民族字典值
|
|
|
- row.put("maritalStatusLabel", comprehensiveMaritalStatusMap.get(row.get("maritalStatus")));//婚姻状况字典值
|
|
|
- row.put("educationLabel", comprehensiveEducationalBackgroundMap.get(row.get("education")));//学历字典值
|
|
|
- row.put("religiousBeliefLabel", null == row.get("religiousBelief") ? null : comprehensiveReligiousBeliefMap.get(row.get("religiousBelief")));//宗教信仰字典值
|
|
|
- row.put("politicalOutlookLabel", comprehensivePoliticalStatusMap.get(row.get("politicalOutlook")));//政治面貌字典值
|
|
|
- row.put("occupationalCategoryLabel", comprehensiveOccupationalCategoryMap.get(row.get("occupationalCategory")));//职业类别字典值
|
|
|
- row.put("householdRegistrationLabel", comprehensiveDictCacheToMap.get(row.get("householdRegistration")));//户籍地 2260
|
|
|
- row.put("nativePlaceLabel", comprehensiveDictCacheToMap.get(row.get("nativePlace")));//籍贯 2260
|
|
|
- }
|
|
|
- return AjaxResult.success(rows);
|
|
|
- }else{
|
|
|
- return AjaxResult.error(500, "list is null!");
|
|
|
+ //noinspection unchecked
|
|
|
+ List<HashMap<String, Object>> rows = (List<HashMap<String, Object>>) personBasicInfoService.getOtherList(
|
|
|
+ pageDomain.getPageNum(),
|
|
|
+ pageDomain.getPageSize(),
|
|
|
+ personBasicInfo.getDelFlag(),
|
|
|
+ personBasicInfo.getPersonType(),
|
|
|
+ personBasicInfo.getTotal()
|
|
|
+ ).getRows();
|
|
|
+ if (null != rows && !rows.isEmpty()) {
|
|
|
+ setDictValue(rows);
|
|
|
}
|
|
|
+ return AjaxResult.success(rows);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 查询其他类型人员详情
|
|
|
*/
|
|
|
@GetMapping("/PersonBasicInfo/getOtherEdit")
|
|
|
- public AjaxResult getOtherEdit(OtherPersonInfo otherPersonInfo){
|
|
|
+ public AjaxResult getOtherEdit(OtherPersonInfo otherPersonInfo) {
|
|
|
AjaxResult otherEdit = personBasicInfoService.getOtherEdit(otherPersonInfo.getBasicId(), otherPersonInfo.getPersonType());
|
|
|
- if ("200".equals(otherEdit.get("code").toString())){
|
|
|
+ if ("200".equals(otherEdit.get("code").toString())) {
|
|
|
Map<String, Object> comprehensiveDictCacheToMap = getComprehensiveDictCacheToMap(DictKeys.COMPREHENSIVE_CITY_CODE);// 2260
|
|
|
HashMap<String, HashMap<String, Object>> data = (HashMap<String, HashMap<String, Object>>) otherEdit.get("data");
|
|
|
- setPersonBasicInfo(data.get("basicInfo"));
|
|
|
+ setPersonBasicInfo(data.get("basicInfo"), null , null);
|
|
|
if (!comprehensiveDictCacheToMap.isEmpty()) {
|
|
|
data.computeIfPresent("basicInfo", (key, basicInfo) -> {
|
|
|
basicInfo.put("householdRegistrationLabel", comprehensiveDictCacheToMap.get(basicInfo.get("householdRegistration")));// 户籍地 2260
|
|
@@ -423,7 +437,7 @@ public class AppPersonBasicInfoController {
|
|
|
return basicInfo;
|
|
|
});
|
|
|
}
|
|
|
- switch (otherPersonInfo.getPersonType()){
|
|
|
+ switch (otherPersonInfo.getPersonType()) {
|
|
|
case 1:
|
|
|
setRegisteredPopulation(data.get("otherInfo"));
|
|
|
data.put("registeredPopulation", data.remove("otherInfo"));
|
|
@@ -468,7 +482,7 @@ public class AppPersonBasicInfoController {
|
|
|
break;
|
|
|
}
|
|
|
return AjaxResult.success(data);
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
return AjaxResult.error(otherEdit.get("code").toString(), otherEdit.get("msg"));
|
|
|
}
|
|
|
}
|
|
@@ -477,15 +491,13 @@ public class AppPersonBasicInfoController {
|
|
|
* 查询全部有效的用户信息
|
|
|
*/
|
|
|
@GetMapping("/PersonBasicInfo/getAllUserInfo")
|
|
|
- public AjaxResult getAllUserInfo(PersonBasicInfo personBasicInfo){
|
|
|
+ public AjaxResult getAllUserInfo(PersonBasicInfo personBasicInfo) {
|
|
|
PageDomain pageDomain = TableSupport.buildPageRequest();
|
|
|
- Integer pageNum = pageDomain.getPageNum();
|
|
|
- Integer pageSize = pageDomain.getPageSize();
|
|
|
- AjaxResult allUserInfo = personBasicInfoService.getAllUserInfo(personBasicInfo.getName(), pageNum, pageSize);
|
|
|
- if (HttpStatus.SUCCESS == Integer.valueOf(allUserInfo.get("code").toString())){
|
|
|
+ AjaxResult allUserInfo = personBasicInfoService.getAllUserInfo(personBasicInfo.getName(), pageDomain.getPageNum(), pageDomain.getPageSize());
|
|
|
+ if (HttpStatus.SUCCESS == Integer.valueOf(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");
|
|
|
- if(null != data){
|
|
|
+ if (null != 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
|
|
@@ -493,8 +505,8 @@ public class AppPersonBasicInfoController {
|
|
|
}
|
|
|
}
|
|
|
return AjaxResult.success(allUserInfo.get("rows"));
|
|
|
- }else{
|
|
|
- return AjaxResult.error(allUserInfo.get("code").toString(),allUserInfo.get("msg"));
|
|
|
+ } else {
|
|
|
+ return AjaxResult.error(allUserInfo.get("code").toString(), allUserInfo.get("msg"));
|
|
|
}
|
|
|
}
|
|
|
|