Browse Source

家庭成员列表接口

feature/teamB_zz_wgh
YUJT 3 years ago
parent
commit
20887a3d2a
  1. 60
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java
  2. 6
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java
  3. 4
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcHouseController.java
  4. 13
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseService.java
  5. 12
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java
  6. 20
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java
  7. 14
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/MyHomeService.java
  8. 28
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java

60
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java

@ -101,8 +101,8 @@ public interface GovOrgOpenFeignClient {
Result<CustomerPartyBranchDTO> getPartyBranchById(@PathVariable("id") String partyBranchId);
/**
* @return com.epmet.commons.tools.utils.Result
* @param partyBranchId
* @return com.epmet.commons.tools.utils.Result
* @author yinzuomei
* @description 根据党支部id, 删除党支部存在党员的不允许删除
* @Date 2020/6/17 18:08
@ -121,8 +121,8 @@ public interface GovOrgOpenFeignClient {
Result<GridInfoResultDTO> queryGridInfo(@PathVariable("gridId") String gridId);
/**
* @return com.epmet.commons.tools.utils.Result
* @param partyBranchId
* @return com.epmet.commons.tools.utils.Result
* @author yinzuomei
* @description 党支部宗人数-1
* @Date 2020/6/18 18:28
@ -158,8 +158,8 @@ public interface GovOrgOpenFeignClient {
Result<List<GridByStaffResultDTO>> listGridsbystaffid(@PathVariable("staffId") String staffId);
/**
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.ActSponsorResultDTO>
* @param staffId
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.ActSponsorResultDTO>
* @author yinzuomei
* @description 发布活动-主办方列表
* @Date 2020/7/23 20:47
@ -168,7 +168,6 @@ public interface GovOrgOpenFeignClient {
Result<ActSponsorResultDTO> querySponsorList(@PathVariable("staffId") String staffId);
/**
*
* @Description 根据网格id查询网格名称
* @Author zxc
* @CreatedTime 2020/4/27 9:22
@ -177,8 +176,8 @@ public interface GovOrgOpenFeignClient {
Result<BelongGridNameResultDTO> getGridNameByGridId(@RequestBody BelongGridNameFormDTO formDTO);
/**
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.StaffOrgsResultDTO>>
* @param staffOrgFormDTO
* @return com.epmet.commons.tools.utils.Result<java.util.List < com.epmet.dto.result.StaffOrgsResultDTO>>
* @Author yinzuomei
* @Description 获取客户对应的根级组织名称
* @Date 2020/4/20 21:37
@ -187,10 +186,9 @@ public interface GovOrgOpenFeignClient {
Result<List<StaffOrgsResultDTO>> getStaffOrgList(StaffOrgFormDTO staffOrgFormDTO);
/**
* @description 通过staffId查询跟组织列表
*
* @param input
* @return
* @description 通过staffId查询跟组织列表
* @author wxz
* @date 2021.10.25 14:53:53
*/
@ -198,8 +196,8 @@ public interface GovOrgOpenFeignClient {
Result<List<StaffOrgsResultDTO>> getStaffOrgListByStaffId(@RequestBody RootOrgListByStaffIdFormDTO input);
/**
* @Description 查询一个网格下的所有工作人员
* @param gridIdFormDTO
* @Description 查询一个网格下的所有工作人员
* @author zxc
* @date 2020/8/13 10:46 上午
*/
@ -207,8 +205,8 @@ public interface GovOrgOpenFeignClient {
Result<List<String>> getGridStaffs(@RequestBody CommonGridIdFormDTO gridIdFormDTO);
/**
* @Description 查询部门下工作人员
* @param formDTO
* @Description 查询部门下工作人员
* @author zxc
* @date 2020/8/13 2:46 下午
*/
@ -216,8 +214,8 @@ public interface GovOrgOpenFeignClient {
Result<List<String>> getDepartmentStaffs(@RequestBody DepartmentIdFormDTO formDTO);
/**
* @Description 查询客户下的网格数量
* @param customerIdFormDTO
* @Description 查询客户下的网格数量
* @author zxc
* @date 2020/8/14 9:31 上午
*/
@ -225,8 +223,8 @@ public interface GovOrgOpenFeignClient {
Result<CustomerGridCountResultDTO> selectGridCount(@RequestBody CustomerIdFormDTO customerIdFormDTO);
/**
* @Description 查询机关下工作人员
* @param formDTO
* @Description 查询机关下工作人员
* @author zxc
* @date 2020/8/17
*/
@ -234,9 +232,9 @@ public interface GovOrgOpenFeignClient {
Result<List<String>> getAgencyStaffs(@RequestBody AgencyIdFormDTO formDTO);
/**
* @Description User模块调用gov-org查询工作人员所在机关的信息以及客户信息
* @param result
* @return
* @Description User模块调用gov-org查询工作人员所在机关的信息以及客户信息
* @author wangc
* @date 2020.08.17 14:11
**/
@ -244,9 +242,9 @@ public interface GovOrgOpenFeignClient {
Result<ExtStaffInfoResultDTO> staffInfoExt(@RequestBody ExtStaffInfoResultDTO result);
/**
* @Description 根据staffId查询当前这个用户的数据权限对外接口
* @param staffId
* @return
* @Description 根据staffId查询当前这个用户的数据权限对外接口
* @author wangc
* @date 2020.08.17 17:30
**/
@ -254,9 +252,9 @@ public interface GovOrgOpenFeignClient {
Result<ExtStaffPermissionResultDTO> staffPermissionExt(@PathVariable(value = "staffId") String staffId);
/**
* @Description User模块调用gov-org查询用户所在机关的信息以及客户信息
* @param result ExtStaffInfoResultDTO.class
* @return Result<ExtStaffInfoResultDTO>
* @Description User模块调用gov-org查询用户所在机关的信息以及客户信息
* @author wangc
* @date 2020.08.17 13:52
**/
@ -307,8 +305,8 @@ public interface GovOrgOpenFeignClient {
Result<List<AllGridsByUserIdResultDTO>> getGridListByGridIds(List<String> gridIdList);
/**
* @Description 查询网格名 不限制是否同步条件 SYNC_FLAG
* @param gridIdList
* @Description 查询网格名 不限制是否同步条件 SYNC_FLAG
* @author zxc
* @date 2022/1/12 9:37 上午
*/
@ -316,9 +314,9 @@ public interface GovOrgOpenFeignClient {
Result<List<AllGridsByUserIdResultDTO>> getAllGridListByGridIds(List<String> gridIdList);
/**
* @Description 根据网格Id查询用户数据
* @param customerGridFormDTO
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.CustomerGridDTO>
* @Description 根据网格Id查询用户数据
* @Author liushaowen
* @Date 2020/11/18 15:34
*/
@ -337,6 +335,7 @@ public interface GovOrgOpenFeignClient {
/**
* 根据 网格id查询同属于一个社区下的所有网格id
*
* @param gridId
* @return com.epmet.commons.tools.utils.Result<java.util.List < java.lang.String>>
* @Author zhangyong
@ -364,8 +363,8 @@ public interface GovOrgOpenFeignClient {
Result<List<GridStaffResultDTO>> selectGridStaffByGridIds(@RequestBody List<String> gridIds);
/**
* @return com.epmet.commons.tools.utils.Result<java.lang.String>
* @param customerId
* @return com.epmet.commons.tools.utils.Result<java.lang.String>
* @author yinzuomei
* @description 根据customerId查询参数(area_code_switch)值open: 选择地区编码必填closed: 无需选择地区编码;;0409新增返参;没配置,返回closed
* @Date 2021/6/24 16:11
@ -384,6 +383,7 @@ public interface GovOrgOpenFeignClient {
/**
* 工作人员的个人信息
*
* @param fromDTO
* @return
*/
@ -463,7 +463,6 @@ public interface GovOrgOpenFeignClient {
Result<List<HouseInfoDTO>> queryListHouseInfo(@RequestBody Set<String> houseIds, @RequestParam("customerId") String customerId);
/**
* @Description 获取组织下网格选项
* @Param formDTO
@ -476,6 +475,7 @@ public interface GovOrgOpenFeignClient {
/**
* 获取网格下支部小组
*
* @Param formDTO
* @Return {@link Result<List<OptionResultDTO>>}
* @Author zhaoqifeng
@ -518,8 +518,8 @@ public interface GovOrgOpenFeignClient {
Result<List<OptionResultDTO>> getNeighborHoodOptions(IcNeighborHoodDTO dto);
/**
* @Description 查询房屋信息
* @param idCard
* @Description 查询房屋信息
* @author zxc
* @date 2021/11/3 3:30 下午
*/
@ -542,8 +542,8 @@ public interface GovOrgOpenFeignClient {
Result<List<CustomerGridDTO>> getGridIListByAgency(@PathVariable("agencyId") String agencyId);
/**
* @Description 查询下级agencyId
* @param orgId
* @Description 查询下级agencyId
* @author zxc
* @date 2021/12/9 4:42 下午
*/
@ -554,6 +554,7 @@ public interface GovOrgOpenFeignClient {
/**
* 根据ID查询楼栋信息
*
* @param id
* @return
*/
@ -562,6 +563,7 @@ public interface GovOrgOpenFeignClient {
/**
* 通过ID查询小区信息
*
* @param id
* @return
*/
@ -571,6 +573,7 @@ public interface GovOrgOpenFeignClient {
/**
* 运营端-客户管理修改客户信息调用gov-org服务修改组织区划开关修改根组织areaCode入参
*
* @param formDTO
* @return
*/
@ -591,6 +594,7 @@ public interface GovOrgOpenFeignClient {
/**
* 查询单元
*
* @param id
* @return
*/
@ -599,6 +603,7 @@ public interface GovOrgOpenFeignClient {
/**
* Desc: 查询网格下所有的工作人员
*
* @param gridId
* @author zxc
* @date 2022/3/21 16:02
@ -608,6 +613,7 @@ public interface GovOrgOpenFeignClient {
/**
* Desc: 根据身份证查询房屋名
*
* @param idCards
* @author zxc
* @date 2022/4/12 16:42
@ -617,7 +623,7 @@ public interface GovOrgOpenFeignClient {
/**
* Desc: 房屋更新
* @param tokenDTO
*
* @param formDTO
* @author zxc
* @date 2022/5/11 09:46
@ -627,9 +633,21 @@ public interface GovOrgOpenFeignClient {
/**
* 直属网格+下一级组织
*
* @param agencyId
* @return
*/
@GetMapping("/gov/org/customeragency/subOrgList/{agencyId}")
Result<List<SubOrgResDTO>> subOrgList(@PathVariable("agencyId") String agencyId);
/**
* 根据房屋编码查询房屋信息
*
* @param houseCode
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.IcHouseDTO>
* @author work@yujt.net.cn
* @date 2022/6/1/0001 16:18
*/
@GetMapping("/gov/org/ichouse/getbyhousecode/{houseCode}")
Result<IcHouseDTO> getByHouseCode(@PathVariable("houseCode") String houseCode);
}

6
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/fallback/GovOrgOpenFeignClientFallback.java

@ -324,6 +324,7 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient {
public Result<List<BuildingResultDTO>> buildingListByIds(List<String> buildingIdList) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "buildingListByIds", buildingIdList);
}
@Override
public Result<BuildingResultPagedDTO> buildinglistbyidsPage(List<String> buildingIdList, Integer pageNo, Integer pageSize) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "buildinglistbyidsPage", buildingIdList, pageNo, pageSize);
@ -414,4 +415,9 @@ public class GovOrgOpenFeignClientFallback implements GovOrgOpenFeignClient {
public Result<List<SubOrgResDTO>> subOrgList(String agencyId) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "subOrgList", agencyId);
}
@Override
public Result<IcHouseDTO> getByHouseCode(String houseCode) {
return ModuleUtils.feignConError(ServiceConstant.GOV_ORG_SERVER, "getByHouseCode", houseCode);
}
}

4
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/IcHouseController.java

@ -90,4 +90,8 @@ public class IcHouseController {
return new Result<List<HousesNameResultDTO>>().ok(icHouseService.getHousesNameByIdCards(idCards));
}
@GetMapping("getbyhousecode/{houseCode}")
public Result<IcHouseDTO> getByHouseCode(@PathVariable("houseCode") String houseCode){
return new Result<IcHouseDTO>().ok(icHouseService.getByHouseCode(houseCode));
}
}

13
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/IcHouseService.java

@ -92,8 +92,8 @@ public interface IcHouseService extends BaseService<IcHouseEntity> {
List<OptionResultDTO> getHouseOption(HouseFormDTO formDTO);
/**
* @Description 查询房屋信息
* @param idCard
* @Description 查询房屋信息
* @author zxc
* @date 2021/11/3 3:30 下午
*/
@ -111,6 +111,7 @@ public interface IcHouseService extends BaseService<IcHouseEntity> {
/**
* Desc: 批量更新房屋信息
*
* @param houses
* @author zxc
* @date 2022/3/25 10:22
@ -119,10 +120,20 @@ public interface IcHouseService extends BaseService<IcHouseEntity> {
/**
* Desc: 根据身份证查询房屋名
*
* @param idCards
* @author zxc
* @date 2022/4/12 16:42
*/
List<HousesNameResultDTO> getHousesNameByIdCards(List<String> idCards);
/**
* 根据房屋编码查询房屋信息
*
* @param houseCode
* @return com.epmet.dto.IcHouseDTO
* @author work@yujt.net.cn
* @date 2022/6/1/0001 16:21
*/
IcHouseDTO getByHouseCode(String houseCode);
}

12
epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcHouseServiceImpl.java

@ -1,8 +1,10 @@
package com.epmet.service.impl;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant;
@ -165,8 +167,8 @@ public class IcHouseServiceImpl extends BaseServiceImpl<IcHouseDao, IcHouseEntit
}
/**
* @Description 查询房屋信息
* @param idCard
* @Description 查询房屋信息
* @author zxc
* @date 2021/11/3 3:30 下午
*/
@ -268,6 +270,7 @@ public class IcHouseServiceImpl extends BaseServiceImpl<IcHouseDao, IcHouseEntit
/**
* Desc: 批量更新房屋信息
*
* @param houses
* @author zxc
* @date 2022/3/25 10:22
@ -280,6 +283,7 @@ public class IcHouseServiceImpl extends BaseServiceImpl<IcHouseDao, IcHouseEntit
/**
* Desc: 根据身份证查询房屋名
*
* @param idCards
* @author zxc
* @date 2022/4/12 16:42
@ -292,4 +296,10 @@ public class IcHouseServiceImpl extends BaseServiceImpl<IcHouseDao, IcHouseEntit
return baseDao.getHousesNameByIdCards(idCards);
}
@Override
public IcHouseDTO getByHouseCode(String houseCode) {
LambdaQueryWrapper<IcHouseEntity> lqw = Wrappers.lambdaQuery();
lqw.eq(IcHouseEntity::getHouseCode, houseCode);
return ConvertUtils.sourceToTarget(baseDao.selectOne(lqw), IcHouseDTO.class);
}
}

20
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/MyHomeController.java

@ -1,9 +1,20 @@
package com.epmet.controller;
import com.epmet.commons.tools.annotation.LoginUser;
import com.epmet.commons.tools.security.dto.TokenDto;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.result.HomeUserBriefResultDTO;
import com.epmet.service.MyHomeService;
import lombok.extern.slf4j.Slf4j;
import oracle.jdbc.proxy.annotation.Post;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* @Description
* @Author zhaoqifeng
@ -13,4 +24,13 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping("myHome")
public class MyHomeController {
@Autowired
private MyHomeService myHomeService;
@PostMapping("memberList/{houseCode}")
public Result<List<HomeUserBriefResultDTO>> selectListHomeMember(@PathVariable("houseCode") String houseCode, @LoginUser TokenDto tokenDto) {
return new Result().ok(myHomeService.selectListHomeMember(houseCode, tokenDto.getCustomerId()));
}
}

14
epmet-user/epmet-user-server/src/main/java/com/epmet/service/MyHomeService.java

@ -1,12 +1,26 @@
package com.epmet.service;
import com.epmet.dto.result.HomeUserBriefResultDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Description
* @Author zhaoqifeng
* @Date 2022/5/31 16:21
*/
public interface MyHomeService {
/**
* 查询家庭成员
*
* @param houseCode 房屋编码
* @param customerId
* @return java.util.List<com.epmet.dto.result.HomeUserBriefResultDTO>
* @author work@yujt.net.cn
* @date 2022/6/1/0001 16:12
*/
List<HomeUserBriefResultDTO> selectListHomeMember(String houseCode, String customerId);
}

28
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/MyHomeServiceImpl.java

@ -1,9 +1,19 @@
package com.epmet.service.impl;
import com.epmet.commons.tools.utils.Result;
import com.epmet.dto.IcHouseDTO;
import com.epmet.dto.result.HomeUserBriefResultDTO;
import com.epmet.feign.GovOrgFeignClient;
import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.service.IcResiUserService;
import com.epmet.service.MyHomeService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.compress.utils.Lists;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @Description
* @Author zhaoqifeng
@ -12,4 +22,22 @@ import org.springframework.stereotype.Service;
@Service
@Slf4j
public class MyHomeServiceImpl implements MyHomeService {
@Autowired
private GovOrgOpenFeignClient govOrgOpenFeignClient;
@Autowired
private IcResiUserService icResiUserService;
@Override
public List<HomeUserBriefResultDTO> selectListHomeMember(String houseCode, String customerId) {
Result<IcHouseDTO> byHouseCode = govOrgOpenFeignClient.getByHouseCode(houseCode);
if (byHouseCode.success() && null != byHouseCode.getData()) {
return icResiUserService.listHomeUserBrief(byHouseCode.getData().getId(), customerId);
}
return Lists.newArrayList();
}
}

Loading…
Cancel
Save