AppPersonBasicInfoController.java 22 KB

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