|
|
@ -2366,7 +2366,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
|
|
|
|
IcResiUserDTO userDTO = baseDao.getResiUserByIdCard(dto.getIdCard(), houseInfo.getCustomerId()); |
|
|
|
if (null != userDTO && null != userDTO.getIdCard()) { |
|
|
|
//覆盖原有的家庭成员信息
|
|
|
|
//覆盖原有的家庭成员信息,并且添加成员变更记录
|
|
|
|
return updateOldMemberInfo(houseInfo.getCustomerId(),dto); |
|
|
|
} |
|
|
|
|
|
|
@ -2378,14 +2378,15 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
|
|
|
|
private Result updateOldMemberInfo(String customerId, IcResiUserConfirmSubmitDTO dto) { |
|
|
|
IcResiUserEntity userEntity = baseDao.selectResiUserEntityByIdCard(dto.getIdCard(), customerId); |
|
|
|
userEntity.setCustomerId(dto.getCustomerId()); |
|
|
|
userEntity.setAgencyId(dto.getAgencyId()); |
|
|
|
userEntity.setPids(dto.getPids()); |
|
|
|
userEntity.setGridId(dto.getGridId()); |
|
|
|
userEntity.setVillageId(dto.getVillageId()); |
|
|
|
userEntity.setBuildId(dto.getBuildId()); |
|
|
|
userEntity.setUnitId(dto.getUnitId()); |
|
|
|
userEntity.setHomeId(dto.getHomeId()); |
|
|
|
//在添加调动记录的时候调整
|
|
|
|
// userEntity.setCustomerId(dto.getCustomerId());
|
|
|
|
// userEntity.setAgencyId(dto.getAgencyId());
|
|
|
|
// userEntity.setPids(dto.getPids());
|
|
|
|
// userEntity.setGridId(dto.getGridId());
|
|
|
|
// userEntity.setVillageId(dto.getVillageId());
|
|
|
|
// userEntity.setBuildId(dto.getBuildId());
|
|
|
|
// userEntity.setUnitId(dto.getUnitId());
|
|
|
|
// userEntity.setHomeId(dto.getHomeId());
|
|
|
|
|
|
|
|
userEntity.setName(dto.getName()); |
|
|
|
userEntity.setIdCard(dto.getIdCard()); |
|
|
@ -2397,6 +2398,22 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
userEntity.setHjszd(dto.getHjszd()); |
|
|
|
userEntity.setXjzd(dto.getXjzd()); |
|
|
|
userEntity.setUpdatedTime(new java.util.Date()); |
|
|
|
//添加人员调动记录
|
|
|
|
IcResiUserTransferFormDTO formDTO = new IcResiUserTransferFormDTO(); |
|
|
|
formDTO.setIcUserId(userEntity.getId()); |
|
|
|
formDTO.setType("in");//客户内
|
|
|
|
formDTO.setNewAgencyId(dto.getAgencyId()); |
|
|
|
formDTO.setNewGridId(dto.getGridId()); |
|
|
|
formDTO.setNewNeighborHoodId(dto.getVillageId()); |
|
|
|
formDTO.setNewBuildingId(dto.getBuildId()); |
|
|
|
formDTO.setNewBuildingUnitId(dto.getUnitId()); |
|
|
|
formDTO.setNewHouseId(dto.getHomeId()); |
|
|
|
formDTO.setTransferTime(new java.util.Date()); |
|
|
|
formDTO.setRemark("更换房屋"); |
|
|
|
formDTO.setReason("更换房屋"); |
|
|
|
formDTO.setOrigin(IcResiUserConstant.CHANGE); |
|
|
|
icUserTransferRecordService.add(formDTO); |
|
|
|
//更新家庭成员信息
|
|
|
|
baseDao.updateById(userEntity); |
|
|
|
return new Result().ok("新增成功"); |
|
|
|
} |
|
|
|