社区后台实有人口详情增加家庭成员信息以及电子档信息
| | |
| | | @PostMapping("/common/data/population/detail") |
| | | R detailPopulation(@RequestParam(value = "populationId") Long populationId); |
| | | |
| | | /** |
| | | * 根据id查询实有人口电子档案信息 |
| | | * @param populationId 实有人口id |
| | | * @return 实有人口电子档信息 |
| | | */ |
| | | @PostMapping("/common/data/population/electronicArchives") |
| | | R electronicArchivesPopulation(@RequestParam(value = "populationId") Long populationId); |
| | | |
| | | |
| | | /** |
| | | * 根据id修改实有人口标签列表 |
| | |
| | | import com.panzhihua.common.model.vos.user.ComMngTagVO; |
| | | import com.panzhihua.common.model.vos.user.ComMngUserTagVO; |
| | | import com.panzhihua.common.model.vos.user.InputUserInfoVO; |
| | | import com.panzhihua.common.model.vos.user.UserElectronicFileVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.FileUtil; |
| | |
| | | return communityService.detailPopulation(populationId); |
| | | } |
| | | |
| | | @ApiOperation(value = "查询实有人口电子档案", response = UserElectronicFileVO.class) |
| | | @PostMapping("/population/electronicArchives") |
| | | public R electronicArchivesPopulation(@RequestParam(value = "populationId") Long populationId) { |
| | | return communityService.electronicArchivesPopulation(populationId); |
| | | } |
| | | |
| | | @ApiOperation(value = "实有人口标签修改", response = ComMngPopulationVO.class) |
| | | @PostMapping("/population/editTag") |
| | | public R editTagPopulation(@RequestBody ComMngPopulationTagDTO populationTagDTO) { |
| | |
| | | return comMngPopulationService.detailPopulation(populationId); |
| | | } |
| | | |
| | | /** |
| | | * 查询实有人口电子档信息 |
| | | * @param populationId 实有人口id |
| | | * @return 实有人口电子档信息 |
| | | */ |
| | | @PostMapping("/population/electronicArchives") |
| | | public R electronicArchivesPopulation(@RequestParam(value = "populationId") Long populationId) { |
| | | return comMngPopulationService.electronicArchivesPopulation(populationId); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据实有人口id修改标签列表 |
| | |
| | | List<ComMngPopulationVO> listPopulation(ComMngPopulationDTO populationVO); |
| | | |
| | | |
| | | @Select("select id,user_id,relationship,`name`,id_card,phone,age,health,job,create_at,update_at from com_mng_family_info where user_id=#{userId}") |
| | | @Select("select id,user_id,relationship,`name`,id_card,phone,age,health,job,create_at,update_at,card_photo_front,card_photo_back,family_book from com_mng_family_info where user_id=#{userId}") |
| | | List<ComMngFamilyInfoVO> listFamilyByUserId(Long userId); |
| | | |
| | | @Select("select id,`name`,phone,relation from com_mng_population where road = #{comMngPopulationDO.road} and door_no = #{comMngPopulationDO.doorNo} and floor = #{comMngPopulationDO.floor} and unit_no = #{comMngPopulationDO.unitNo} and house_no = #{comMngPopulationDO.houseNo} and id != #{comMngPopulationDO.id}") |
| | |
| | | * @return 删除结果 |
| | | */ |
| | | R deleteSpecialInputUser(Long id); |
| | | |
| | | /** |
| | | * 查询实有人口电子档信息 |
| | | * @param populationId 实有人口id |
| | | * @return 实有人口电子档信息 |
| | | */ |
| | | R electronicArchivesPopulation(Long populationId); |
| | | } |
| | |
| | | public R detailPopulation(Long populationId) { |
| | | ComMngPopulationDO comMngPopulationDO = populationDAO.selectById(populationId); |
| | | if (ObjectUtils.isEmpty(comMngPopulationDO)) { |
| | | return R.fail(); |
| | | return R.fail("用户信息不存在"); |
| | | } |
| | | ComMngPopulationVO comMngPopulationVO = new ComMngPopulationVO(); |
| | | BeanUtils.copyProperties(comMngPopulationDO, comMngPopulationVO); |
| | |
| | | return R.fail(); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 查询实有人口电子档信息 |
| | | * @param populationId 实有人口id |
| | | * @return 实有人口电子档信息 |
| | | */ |
| | | @Override |
| | | public R electronicArchivesPopulation(Long populationId){ |
| | | ComMngPopulationDO comMngPopulationDO = populationDAO.selectById(populationId); |
| | | if (ObjectUtils.isEmpty(comMngPopulationDO)) { |
| | | return R.fail("用户信息不存在"); |
| | | } |
| | | //查询当前用户电子档信息 |
| | | if(!StringUtils.isEmpty(comMngPopulationDO.getCardNo())){ |
| | | UserElectronicFileVO electronicFileVO = populationDAO.getSysUserElectronicFile(comMngPopulationDO.getCardNo()); |
| | | if(electronicFileVO != null){ |
| | | return R.ok(electronicFileVO); |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | | } |