Ver código fonte

Merge remote-tracking branch 'origin/master'

LiuHaoNan 1 ano atrás
pai
commit
22a437c296

+ 0 - 1
src/main/java/com/sooka/sponest/mobile/comprehensive/dict/AppDictController.java

@@ -5,7 +5,6 @@ import com.ruoyi.common.core.web.domain.AjaxResult;
 import com.sooka.sponest.comprehensive.api.dict.domain.DataDict;
 import com.sooka.sponest.comprehensive.api.dict.service.DataDictService;
 import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PathVariable;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 

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

@@ -3,10 +3,12 @@ package com.sooka.sponest.mobile.comprehensive.personBasicInfoController;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
 import com.ruoyi.common.core.constant.HttpStatus;
+import com.ruoyi.common.core.utils.SpringUtils;
 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.redis.service.RedisService;
 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;
@@ -37,7 +39,27 @@ public class AppPersonBasicInfoController {
         Integer pageNum = pageDomain.getPageNum();
         Integer pageSize = pageDomain.getPageSize();
         Integer delFlag = info.getDelFlag();
-        return AjaxResult.success(personBasicInfoService.getList(pageNum, pageSize, delFlag).getRows());
+        List<HashMap<String, Object>> rows = (List<HashMap<String, Object>>) personBasicInfoService.getList(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.getDictCacheToMap(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
+        }
+        return AjaxResult.success();
     }
 
 
@@ -181,6 +203,8 @@ public class AppPersonBasicInfoController {
         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", getDictData(DictKeys.COMPREHENSIVE_CITY_CODE, String.valueOf(basicInfo.get("householdRegistration"))));//户籍地 2260
+        basicInfo.put("nativePlaceLabel", getDictData(DictKeys.COMPREHENSIVE_CITY_CODE, String.valueOf(basicInfo.get("nativePlace"))));//籍贯 2260
     }
 
     private void setRegisteredPopulation(HashMap<String, Object> json) {//1

+ 3 - 0
src/main/java/com/sooka/sponest/mobile/remoteapi/RemoteSystemBaseService.java

@@ -197,4 +197,7 @@ public interface RemoteSystemBaseService {
 
     @GetMapping("/menuApp/selectMenuListByParentIdAndRoleId/{parentId}")
     AjaxResult getMenuListByParentId(@PathVariable("parentId") String parentId);
+
+    @PostMapping("/user/userFeginlist")
+    R<List<SysUser>> getUserList(@RequestBody SysUser sysUser);
 }

+ 6 - 0
src/main/java/com/sooka/sponest/mobile/remoteapi/factory/RemoteSystemBaseServiceFallbackFactory.java

@@ -16,6 +16,7 @@ import org.slf4j.LoggerFactory;
 import org.springframework.cloud.openfeign.FallbackFactory;
 import org.springframework.stereotype.Component;
 import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
 
 import java.util.List;
 import java.util.Map;
@@ -155,6 +156,11 @@ public class RemoteSystemBaseServiceFallbackFactory implements FallbackFactory<R
             public AjaxResult getMenuListByParentId(@PathVariable("parentId") String parentId) {
                 return null;
             }
+
+            @Override
+            public R<List<SysUser>> getUserList(@RequestBody SysUser sysUser) {
+                return null;
+            }
         };
     }
 

+ 36 - 0
src/main/java/com/sooka/sponest/mobile/system/users/UserController.java

@@ -0,0 +1,36 @@
+package com.sooka.sponest.mobile.system.users;
+
+import com.ruoyi.common.core.constant.HttpStatus;
+import com.ruoyi.common.core.domain.R;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.system.api.domain.SysUser;
+import com.sooka.sponest.mobile.remoteapi.RemoteSystemBaseService;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+/**
+ * @Author LG
+ * @Date 2023/10/11 - 9:57
+ */
+@RestController
+@RequestMapping("/user")
+public class UserController {
+
+    @Resource
+    RemoteSystemBaseService remoteSystemBaseService;
+
+    @PostMapping("/userFeginList")
+    public AjaxResult getUserList(@RequestBody SysUser sysUser){
+        R<List<SysUser>> userList = remoteSystemBaseService.getUserList(sysUser);
+        if(HttpStatus.SUCCESS == userList.getCode()){
+            return AjaxResult.success(userList.getData());
+        }else{
+            return AjaxResult.error(userList.getCode(), userList.getMsg());
+        }
+    }
+}