AppPersonBasicInfoController.java 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356
  1. package com.sooka.sponest.mobile.comprehensive.personBasicInfoController;
  2. import com.alibaba.fastjson.JSONArray;
  3. import com.alibaba.fastjson.JSONObject;
  4. import com.ruoyi.common.core.constant.HttpStatus;
  5. import com.ruoyi.common.core.utils.SpringUtils;
  6. import com.ruoyi.common.core.web.domain.AjaxResult;
  7. import com.ruoyi.common.core.web.page.PageDomain;
  8. import com.ruoyi.common.core.web.page.TableDataInfo;
  9. import com.ruoyi.common.core.web.page.TableSupport;
  10. import com.ruoyi.common.redis.service.RedisService;
  11. import com.ruoyi.common.security.utils.DictUtils;
  12. import com.sooka.sponest.comprehensive.api.comprehensivePersonBasicInfo.domain.OtherPersonInfo;
  13. import com.sooka.sponest.comprehensive.api.comprehensivePersonBasicInfo.domain.PersonBasicInfo;
  14. import com.sooka.sponest.comprehensive.api.comprehensivePersonBasicInfo.service.RemotePersonBasicInfoService;
  15. import com.ruoyi.common.core.domain.DictKeys;
  16. import com.sooka.sponest.data.api.digitalenvironment.domain.EnvironmentBiggas;
  17. import org.springframework.web.bind.annotation.*;
  18. import javax.annotation.Resource;
  19. import java.util.*;
  20. /**
  21. * @Author LG
  22. * @Date 2023/9/8 - 9:38
  23. */
  24. @RestController
  25. @RequestMapping("/AppPersonBasicInfoController")
  26. public class AppPersonBasicInfoController {
  27. @Resource
  28. private RemotePersonBasicInfoService personBasicInfoService;
  29. /**
  30. * 查询大气监测点/水质监测点/污染源监测点管理列表
  31. */
  32. @GetMapping("/PersonBasicInfo/list")
  33. public AjaxResult list(PersonBasicInfo info) {
  34. PageDomain pageDomain = TableSupport.buildPageRequest();
  35. Integer pageNum = pageDomain.getPageNum();
  36. Integer pageSize = pageDomain.getPageSize();
  37. Integer delFlag = info.getDelFlag();
  38. List<HashMap<String, Object>> rows = (List<HashMap<String, Object>>) personBasicInfoService.getList(pageNum, pageSize, delFlag).getRows();
  39. Map<String, Object> comprehensiveSexMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_SEX);//性别字典值
  40. Map<String, Object> comprehensiveNationMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_NATION);//民族字典值
  41. Map<String, Object> comprehensiveMaritalStatusMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_MARITAL_STATUS);//婚姻状况字典值
  42. Map<String, Object> comprehensiveEducationalBackgroundMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_EDUCATIONAL_BACKGROUND);//学历字典值
  43. Map<String, Object> comprehensiveReligiousBeliefMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_RELIGIOUS_BELIEF);//宗教信仰字典值
  44. Map<String, Object> comprehensivePoliticalStatusMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_POLITICAL_STATUS);//政治面貌字典值
  45. Map<String, Object> comprehensiveOccupationalCategoryMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_OCCUPATIONAL_CATEGORY);//职业类别字典值
  46. Map<String, Object> comprehensiveCityCodeMap = DictUtils.getDictCacheToMap(DictKeys.COMPREHENSIVE_CITY_CODE);//2260
  47. for (HashMap<String, Object> row : rows) {
  48. row.put("genderLabel", comprehensiveSexMap.get(row.get("gender")));//性别字典值
  49. row.put("nationLabel", comprehensiveNationMap.get(row.get("nation")));//民族字典值
  50. row.put("maritalStatusLabel", comprehensiveMaritalStatusMap.get(row.get("maritalStatus")));//婚姻状况字典值
  51. row.put("educationLabel", comprehensiveEducationalBackgroundMap.get(row.get("education")));//学历字典值
  52. row.put("religiousBeliefLabel", null == row.get("religiousBelief") ? null : comprehensiveReligiousBeliefMap.get(row.get("religiousBelief")));//宗教信仰字典值
  53. row.put("politicalOutlookLabel", comprehensivePoliticalStatusMap.get(row.get("politicalOutlook")));//政治面貌字典值
  54. row.put("occupationalCategoryLabel", comprehensiveOccupationalCategoryMap.get(row.get("occupationalCategory")));//职业类别字典值
  55. row.put("householdRegistrationLabel", comprehensiveCityCodeMap.get(row.get("householdRegistration")));//户籍地 2260
  56. row.put("nativePlaceLabel", comprehensiveCityCodeMap.get(row.get("nativePlace")));//籍贯 2260
  57. }
  58. return AjaxResult.success(rows);
  59. }
  60. /**
  61. * 获取重点企业详细信息
  62. */
  63. @GetMapping("/PersonBasicInfo/edit")
  64. public AjaxResult getInfo(EnvironmentBiggas biggas) {
  65. AjaxResult ajaxResult = personBasicInfoService.getEdit(biggas.getId());
  66. if ("200".equals(ajaxResult.get("code").toString())) {
  67. Map<String, Object> data = (Map<String, Object>) ajaxResult.get("data");
  68. HashMap<String, Object> basicInfo = (HashMap<String, Object>) data.get("basicInfo");
  69. setPersonBasicInfo(basicInfo);
  70. List<HashMap<String, Object>> userBinds = (List<HashMap<String, Object>>) basicInfo.get("userBinds");
  71. ArrayList<HashMap<String, Object>> otherInfo = (ArrayList<HashMap<String, Object>>) data.get("otherInfo");
  72. Map<String, Object> result = new HashMap<>();
  73. result.put("basicInfo",data.get("basicInfo"));
  74. userBinds.forEach(bind -> {
  75. otherInfo.stream()
  76. .filter(info -> info.get("id").equals(bind.get("otherPersonId")))
  77. .findFirst()
  78. .ifPresent(info -> setLabel(info, (Integer) bind.get("otherPersonType")));
  79. });
  80. otherInfo.forEach(bind ->{
  81. switch(String.valueOf(bind.get("otherPersonType"))){
  82. case "1":
  83. result.put("registeredPopulation", bind);
  84. break;
  85. case "2":
  86. result.put("floatingPopulation", bind);
  87. break;
  88. case "3":
  89. result.put("leftBehindPerson", bind);
  90. break;
  91. case "4":
  92. result.put("campusAroundPerson", bind);
  93. break;
  94. case "5":
  95. result.put("prisonReleased", bind);
  96. break;
  97. case "6":
  98. result.put("communityCorrectionStaff", bind);
  99. break;
  100. case "7":
  101. result.put("psychosisPopulation", bind);
  102. break;
  103. case "8":
  104. result.put("drugAddict", bind);
  105. break;
  106. case "9":
  107. result.put("aidsRisk", bind);
  108. break;
  109. case "10":
  110. result.put("keyYouth", bind);
  111. break;
  112. }
  113. });
  114. return AjaxResult.success(result);
  115. } else {
  116. return ajaxResult;
  117. }
  118. }
  119. private void setLabel(HashMap<String, Object> json, Integer type) {
  120. switch (type) {
  121. case 1:
  122. setRegisteredPopulation(json);
  123. break;
  124. case 2:
  125. setFloatingPopulation(json);
  126. break;
  127. case 3:
  128. setLeftBehindPerson(json);
  129. break;
  130. case 4:
  131. setCampusAroundPerson(json);
  132. break;
  133. case 5:
  134. setPrisonReleased(json);
  135. break;
  136. case 6:
  137. setCommunityCorrectionStaff(json);
  138. break;
  139. case 7:
  140. setPsychosisPopulation(json);
  141. break;
  142. case 8:
  143. setDrugAddict(json);
  144. break;
  145. case 9:
  146. setAidsRisk(json);
  147. break;
  148. case 10:
  149. setKeyYouth(json);
  150. break;
  151. }
  152. json.put("otherPersonType", type);
  153. }
  154. /**
  155. * 新增重点企业
  156. */
  157. @PostMapping("/PersonBasicInfo")
  158. public AjaxResult add(@RequestBody String json) {
  159. return personBasicInfoService.add(dataToList(json));
  160. }
  161. /**
  162. * 修改重点企业
  163. */
  164. @PostMapping("/PersonBasicInfo/put")
  165. public AjaxResult edit(@RequestBody String json) {
  166. return personBasicInfoService.edit(dataToList(json));
  167. }
  168. private String dataToList(String json){
  169. JSONObject jsonObject = JSONObject.parseObject(json);
  170. Set<String> strings = jsonObject.keySet();
  171. JSONArray list = new JSONArray();
  172. list.add(jsonObject.getJSONObject("basicInfo"));
  173. strings.remove("basicInfo");
  174. for (String string : strings) {
  175. list.add(jsonObject.getJSONObject(string));
  176. }
  177. return JSONArray.toJSONString(list);
  178. }
  179. /**
  180. * 删除重点企业
  181. */
  182. @GetMapping("/PersonBasicInfo/del")
  183. public AjaxResult remove(@RequestParam("id") List<String> id) {
  184. return personBasicInfoService.del(id.toArray(new String[0]));
  185. }
  186. private void setPersonBasicInfo(HashMap<String, Object> basicInfo) {//0
  187. basicInfo.put("genderLabel", getDictData(DictKeys.COMPREHENSIVE_SEX, String.valueOf(basicInfo.get("gender"))));//性别字典值
  188. basicInfo.put("nationLabel", getDictData(DictKeys.COMPREHENSIVE_NATION, String.valueOf(basicInfo.get("nation"))));//民族字典值
  189. basicInfo.put("maritalStatusLabel", getDictData(DictKeys.COMPREHENSIVE_MARITAL_STATUS, String.valueOf(basicInfo.get("maritalStatus"))));//婚姻状况字典值
  190. basicInfo.put("educationLabel", getDictData(DictKeys.COMPREHENSIVE_EDUCATIONAL_BACKGROUND, String.valueOf(basicInfo.get("education"))));//学历字典值
  191. basicInfo.put("religiousBeliefLabel", null == basicInfo.get("religiousBelief") ? null : getDictData(DictKeys.COMPREHENSIVE_RELIGIOUS_BELIEF, String.valueOf(basicInfo.get("religiousBelief"))));//宗教信仰字典值
  192. basicInfo.put("politicalOutlookLabel", getDictData(DictKeys.COMPREHENSIVE_POLITICAL_STATUS, String.valueOf(basicInfo.get("politicalOutlook"))));//政治面貌字典值
  193. basicInfo.put("occupationalCategoryLabel", getDictData(DictKeys.COMPREHENSIVE_OCCUPATIONAL_CATEGORY, String.valueOf(basicInfo.get("occupationalCategory"))));//职业类别字典值
  194. basicInfo.put("householdRegistrationLabel", getDictData(DictKeys.COMPREHENSIVE_CITY_CODE, String.valueOf(basicInfo.get("householdRegistration"))));//户籍地 2260
  195. basicInfo.put("nativePlaceLabel", getDictData(DictKeys.COMPREHENSIVE_CITY_CODE, String.valueOf(basicInfo.get("nativePlace"))));//籍贯 2260
  196. }
  197. private void setRegisteredPopulation(HashMap<String, Object> json) {//1
  198. json.put("entryIdentityLabel", getDictData(DictKeys.COMPREHENSIVE_HOUSEHOLDS_IDENTIFICATION, String.valueOf(json.get("entryIdentity"))));//人户一致标识
  199. json.put("accountRelationshipLabel", getDictData(DictKeys.COMPREHENSIVE_RELATION, String.valueOf(json.get("accountRelationship"))));//与户主关系
  200. }
  201. private void setFloatingPopulation(HashMap<String, Object> json) {//2
  202. json.put("inflowCauselabel", getDictData(DictKeys.COMPREHENSIVE_INFLOW_REASON, String.valueOf(json.get("inflowCause"))));//流入原因
  203. json.put("focusPeopleLabel", "1".equals(json.get("focusPeople")) ? "是" : "否");//是否重点关注人员
  204. json.put("certificationTypeLabel", null == json.get("certificationType") ? null : getDictData(DictKeys.COMPREHENSIVE_CERTIFICATION_TYPE, String.valueOf(json.get("certificationType"))));//办证类型
  205. json.put("domicileTypeLabel", getDictData(DictKeys.COMPREHENSIVE_RESIDENCE_TYPE, String.valueOf(json.get("domicileType"))));//住所类型
  206. }
  207. private void setLeftBehindPerson(HashMap<String, Object> json) {//3
  208. json.put("entryIdentityLabel", getDictData(DictKeys.COMPREHENSIVE_HOUSEHOLDS_IDENTIFICATION, String.valueOf(json.get("entryIdentity"))));//人户一致标识
  209. json.put("leftBehindTypeLabel", getDictData(DictKeys.COMPREHENSIVE_LEFT_BEHIND_PERSONNEL_TYPE, String.valueOf(json.get("leftBehindType"))));//留守人员类型
  210. json.put("healthStatusLabel", null == json.get("healthStatus") ? null : getDictData(DictKeys.COMPREHENSIVE_HEALTH_STATUS, String.valueOf(json.get("healthStatus"))));//健康状况
  211. json.put("leftBehindRelationshipLabel", getDictData(DictKeys.COMPREHENSIVE_RELATION, String.valueOf(json.get("leftBehindRelationship"))));//与留守人员关系
  212. json.put("keyFamilyHealthStatusLabel", null == json.get("keyFamilyHealthStatus") ? null : getDictData(DictKeys.COMPREHENSIVE_HEALTH_STATUS, String.valueOf(json.get("keyFamilyHealthStatus"))));//家庭主要成员健康状况
  213. }
  214. private void setCampusAroundPerson(HashMap<String, Object> json) {//4
  215. json.put("harmLevelLabel", getDictData(DictKeys.COMPREHENSIVE_DEGREE_OF_HARM, String.valueOf(json.get("harmLevel"))));//危害程度
  216. json.put("focusPeopleLabel", "1".equals(json.get("focusPeople")) ? "是" : "否");//是否关注
  217. }
  218. private void setPrisonReleased(HashMap<String, Object> json) {//5
  219. json.put("originalChargeLabel", getDictData(DictKeys.COMPREHENSIVE_OFFENCES_CLASSIFICATION, String.valueOf(json.get("originalCharge"))));//原罪名
  220. json.put("recidivismLabel", "1".equals(json.get("recidivism")) ? "是" : "否");//是否累犯
  221. json.put("riskAssessmentTypeLabel", getDictData(DictKeys.COMPREHENSIVE_HAZARD_ASSESSMENT_TYPE, String.valueOf(json.get("riskAssessmentType"))));//危险性评估类型
  222. json.put("linkUpStatusLabel", getDictData(DictKeys.COMPREHENSIVE_CONNECTION, String.valueOf(json.get("linkUpStatus"))));//衔接情况
  223. json.put("placementStatusLabel", getDictData(DictKeys.COMPREHENSIVE_PLACEMENT, String.valueOf(json.get("placementStatus"))));//安置情况
  224. json.put("reoffendLabel", "1".equals(json.get("reoffend")) ? "是" : "否");//是否重新犯罪
  225. }
  226. private void setCommunityCorrectionStaff(HashMap<String, Object> json) {//6
  227. json.put("caseCategoryLabel", getDictData(DictKeys.COMPREHENSIVE_CASE_CATEGORY, String.valueOf(json.get("caseCategory"))));//案件类别
  228. json.put("correctiveReleaseTypeLabel", null == json.get("correctiveReleaseType") ? null : getDictData(DictKeys.COMPREHENSIVE_CORRECTIVE_RELEASE_TYPE, String.valueOf(json.get("correctiveReleaseType"))));//矫正解除(终止)类型
  229. json.put("receivingModeLabel", getDictData(DictKeys.COMPREHENSIVE_RECEIVING_METHOD, String.valueOf(json.get("receivingMode"))));//接收方式
  230. json.put("correctionClassLabel", getDictData(DictKeys.COMPREHENSIVE_CORRECTIVE_CATEGORY, String.valueOf(json.get("correctionClass"))));//矫正类别
  231. json.put("tubeLabel", "1".equals(json.get("tube")) ? "是" : "否");//是否有脱管
  232. json.put("leakingPipesLabel", "1".equals(json.get("leakingPipes")) ? "是" : "否");//是否有漏管
  233. json.put("recidivismLabel", null == json.get("recidivism") ? null : "1".equals(json.get("recidivism")) ? "是" : "否");//是否累惯犯
  234. json.put("establishCorrectionTeamLabel", "1".equals(json.get("establishCorrectionTeam")) ? "是" : "否");//是否建立矫正小组
  235. json.put("reoffendLabel", "1".equals(json.get("reoffend")) ? "是" : "否");//是否重新犯罪
  236. json.put("fourHistoriesListLabel", getDictDataList(DictKeys.COMPREHENSIVE_FOUR_HISTORIES_SITUATION, (List<String>) json.get("fourHistoriesList")));//“四史”情况
  237. json.put("threeStepListLabel", getDictDataList(DictKeys.COMPREHENSIVE_THREE_INVOLVED_SITUATION, (List<String>) json.get("threeStepList")));//“三涉”情况
  238. json.put("correctionTeamCompositionListLabel", getDictDataList(DictKeys.COMPREHENSIVE_CORRECTIONS_TEAM_COMPOSITION_TYPE, (List<String>) json.get("correctionTeamCompositionList")));//矫正小组人员组成情况
  239. }
  240. private void setPsychosisPopulation(HashMap<String, Object> json) {//7
  241. json.put("familyEconomicSituationLabel", null == json.get("familyEconomicSituationLabel") ? null : getDictData(DictKeys.COMPREHENSIVE_HOUSEHOLDS_FINANCIAL_SITUATION, String.valueOf(json.get("familyEconomicSituationLabel"))));//家庭经济状况
  242. json.put("subsistenceAllowanceLabel", "1".equals(json.get("subsistenceAllowance")) ? "是" : "否");//是否纳入低保
  243. json.put("diagnosisTypeLabel", getDictData(DictKeys.COMPREHENSIVE_CURRENT_DIAGNOSTIC, String.valueOf(json.get("diagnosisType"))));//目前诊断类型
  244. json.put("historyCausingAccidentsLabel", "1".equals(json.get("historyCausingAccidents")) ? "有" : "无");//有无肇事肇祸史
  245. json.put("riskAssessmentLevelLabel", getDictData(DictKeys.COMPREHENSIVE_HAZARD_ASSESSMENT, String.valueOf(json.get("riskAssessmentLevel"))));//目前危险性评估等级
  246. json.put("treatmentSituationLabel", getDictData(DictKeys.COMPREHENSIVE_TREATMENT_CONDITIONS, String.valueOf(json.get("treatmentSituation"))));//治疗情况
  247. json.put("reasonsHospitalizationListLabel", getDictDataList(DictKeys.COMPREHENSIVE_HOSPITALIZATION_REASONS, (List<String>) json.get("reasonsHospitalizationList")));//实施住院治疗原因
  248. json.put("participatingManagersListLabel", getDictDataList(DictKeys.COMPREHENSIVE_MANAGERS, (List<String>) json.get("participatingManagersList")));//参与管理人员
  249. json.put("assistanceSituationListLabel", getDictDataList(DictKeys.COMPREHENSIVE_HELP_SITUATION, (List<String>) json.get("assistanceSituationList")));//帮扶情况
  250. }
  251. private void setDrugAddict(HashMap<String, Object> json) {//8
  252. json.put("controlSituationLabel", getDictData(DictKeys.COMPREHENSIVE_GOVERNANCE, String.valueOf(json.get("controlSituation"))));//管控情况
  253. json.put("criminalHistoryLabel", null == json.get("criminalHistory") ? null : "1".equals(json.get("criminalHistory")) ? "有" : "无");//有无犯罪史
  254. json.put("drugUseLabel", getDictData(DictKeys.COMPREHENSIVE_CASE_CONSEQUENCE, String.valueOf(json.get("drugUse"))));//吸毒原因
  255. json.put("drugAbuseLabel", null == json.get("drugAbuse") ? null : getDictData(DictKeys.COMPREHENSIVE_CASE_CONSEQUENCE, String.valueOf(json.get("drugAbuse"))));//吸毒后果
  256. }
  257. private void setAidsRisk(HashMap<String, Object> json) {//9
  258. json.put("routeInfectionLabel", getDictData(DictKeys.COMPREHENSIVE_ROUTE_OF_INFECTION, String.valueOf(json.get("routeInfection"))));//感染途径
  259. json.put("criminalHistoryLabel", "1".equals(json.get("criminalHistory")) ? "是" : "否");//是否有违法犯罪史
  260. json.put("caseCategoryLabel", null == json.get("caseCategory") ? null : getDictData(DictKeys.COMPREHENSIVE_CASE_CATEGORY, String.valueOf(json.get("caseCategory"))));//案件类别
  261. json.put("concernTypeLabel", getDictData(DictKeys.COMPREHENSIVE_TYPE_OF_CONCERN, String.valueOf(json.get("concernType"))));//关注类型
  262. json.put("admissionSituationLabel", null == json.get("admissionSituation") ? null : getDictData(DictKeys.COMPREHENSIVE_ADMISSION_TO_INERTIA, String.valueOf(json.get("admissionSituation"))));//收治情况
  263. }
  264. private void setKeyYouth(HashMap<String, Object> json) {//10
  265. json.put("personTypeLabel", null == json.get("personType") ? null : getDictData(DictKeys.COMPREHENSIVE_TYPE_OF_PERSON, String.valueOf(json.get("personType"))));//人员类型
  266. json.put("familySituationLabel", getDictData(DictKeys.COMPREHENSIVE_FAMILY_INERTIA, String.valueOf(json.get("familySituation"))));//家庭情况
  267. json.put("guardianRelationLabel", getDictData(DictKeys.COMPREHENSIVE_RELATION, String.valueOf(json.get("guardianRelation"))));//与监护人关系
  268. json.put("reoffendLabel", "1".equals(json.get("reoffend")) ? "是" : "否");//是否违法犯罪
  269. json.put("meansAssistanceLabel", getDictData(DictKeys.COMPREHENSIVE_MEANS_OF_HELP, String.valueOf(json.get("meansAssistance"))));//帮扶手段
  270. }
  271. private String getDictData(String dictKey, String value) {
  272. return DictUtils.getDictDataByValue(dictKey, value);
  273. }
  274. private List<String> getDictDataList(String dictKey, List<String> values) {
  275. return DictUtils.getDictDataListByValue(dictKey, values);
  276. }
  277. @GetMapping("/PersonBasicInfo/getOtherList")
  278. public AjaxResult getOtherList(PersonBasicInfo personBasicInfo){
  279. PageDomain pageDomain = TableSupport.buildPageRequest();
  280. Integer pageNum = pageDomain.getPageNum();
  281. Integer pageSize = pageDomain.getPageSize();
  282. Integer delFlag = personBasicInfo.getDelFlag();
  283. Integer personType = personBasicInfo.getPersonType();
  284. TableDataInfo list = personBasicInfoService.getOtherList(pageNum, pageSize, delFlag, personType);
  285. RedisService redisService = SpringUtils.getBean(RedisService.class);
  286. List<Map<String,Object>> cacheObject = redisService.getCacheObject("sys_dict:" + DictKeys.COMPREHENSIVE_CITY_CODE);//2260
  287. if(!"".equals(list) && null != list){
  288. for (Object row : list.getRows()) {
  289. HashMap r = (HashMap) row;
  290. for (Map<String, Object> map : cacheObject) {
  291. if (map.containsKey("id") && (map.get("id")).toString().equals(r.get("householdRegistration"))) {
  292. Object value = map.get("label"); // 获取householdRegistration的id的值
  293. // 执行您需要的操作
  294. r.put("householdRegistrationLabel", value);//户籍地 2260
  295. r.put("nativePlaceLabel", value);//籍贯 2260
  296. break;
  297. }
  298. }
  299. }
  300. return AjaxResult.success(list);
  301. }else{
  302. return AjaxResult.error(500, "list is null!");
  303. }
  304. }
  305. @GetMapping("/PersonBasicInfo/getOtherEdit")
  306. public AjaxResult getOtherEdit(OtherPersonInfo otherPersonInfo){
  307. AjaxResult otherEdit = personBasicInfoService.getOtherEdit(otherPersonInfo.getBasicId(), otherPersonInfo.getPersonType());
  308. if ("200".equals(otherEdit.get("code").toString())){
  309. RedisService redisService = SpringUtils.getBean(RedisService.class);
  310. List<Map<String,Object>> cacheObject = redisService.getCacheObject("sys_dict:" + DictKeys.COMPREHENSIVE_CITY_CODE);//2260
  311. HashMap<String,HashMap<String,Object>> data = (HashMap<String,HashMap<String,Object>>) otherEdit.get("data");
  312. for (Map<String, Object> map : cacheObject) {
  313. if (map.containsKey("id") && (map.get("id")).toString().equals(data.get("basicInfo").get("householdRegistration"))) {
  314. Object value = map.get("label"); // 获取householdRegistration的id的值
  315. // 执行您需要的操作
  316. data.get("basicInfo").put("householdRegistrationLabel", value);//户籍地 2260
  317. data.get("basicInfo").put("nativePlaceLabel", value);//籍贯 2260
  318. break;
  319. }
  320. }
  321. }
  322. return AjaxResult.success(otherEdit);
  323. }
  324. @GetMapping("/PersonBasicInfo/getAllUserInfo")
  325. public AjaxResult getAllUserInfo(PersonBasicInfo personBasicInfo){
  326. return personBasicInfoService.getAllUserInfo(personBasicInfo.getName());
  327. }
  328. }