From 1ddcd51f41da2393c929fcd79206457282668a19 Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期二, 27 四月 2021 10:54:34 +0800
Subject: [PATCH] 实有人口详情接口增加家庭成员信息以及电子档信息

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java |   18 +++++++++++++++++-
 1 files changed, 17 insertions(+), 1 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
index 68e235c..afb2618 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java
@@ -17,7 +17,9 @@
 import com.panzhihua.common.model.vos.R;
 import com.panzhihua.common.model.vos.community.*;
 import com.panzhihua.common.model.vos.user.ComHouseMemberVo;
+import com.panzhihua.common.model.vos.user.ComMngFamilyInfoVO;
 import com.panzhihua.common.model.vos.user.InputUserInfoVO;
+import com.panzhihua.common.model.vos.user.UserElectronicFileVO;
 import com.panzhihua.service_community.dao.ComActDAO;
 import com.panzhihua.service_community.dao.ComActVillageDAO;
 import com.panzhihua.service_community.dao.ComMngPopulationDAO;
@@ -31,6 +33,7 @@
 import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
 import org.springframework.stereotype.Service;
 import org.springframework.util.ObjectUtils;
+import org.springframework.util.StringUtils;
 
 import javax.annotation.Resource;
 import javax.crypto.BadPaddingException;
@@ -129,11 +132,24 @@
         ComMngPopulationVO comMngPopulationVO = new ComMngPopulationVO();
         BeanUtils.copyProperties(comMngPopulationDO, comMngPopulationVO);
 
-        //查询房屋成员信息
+        //查询户主关系信息
         List<ComHouseMemberVo> comMngFamilyInfoVOS = populationDAO.listHouseMermberByUserId(comMngPopulationDO);
         if (!comMngFamilyInfoVOS.isEmpty()) {
             comMngPopulationVO.setComMngFamilyInfoVOS(comMngFamilyInfoVOS);
         }
+
+        //查询当前用户电子档信息
+        if(!StringUtils.isEmpty(comMngPopulationDO.getCardNo())){
+            UserElectronicFileVO electronicFileVO = populationDAO.getSysUserElectronicFile(comMngPopulationDO.getCardNo());
+            if(electronicFileVO != null){
+                comMngPopulationVO.setUserElectronicFileVO(electronicFileVO);
+                //查询家庭成员信息
+                List<ComMngFamilyInfoVO> familyInfoVOList = populationDAO.listFamilyByUserId(electronicFileVO.getUserId());
+                if(!familyInfoVOList.isEmpty()){
+                    comMngPopulationVO.setFamilyInfoVOList(familyInfoVOList);
+                }
+            }
+        }
         return R.ok(comMngPopulationVO);
     }
 

--
Gitblit v1.7.1