|
|
@ -815,6 +815,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
map.put("groupByTables", new ArrayList<>(groupByTables)); |
|
|
|
return map; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @param formDTO |
|
|
|
* @Description 查询个人数据 |
|
|
@ -902,6 +903,7 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
} |
|
|
|
return personData; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @param formDTO |
|
|
|
* @Description 根据名字搜索 |
|
|
@ -1640,35 +1642,6 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<HomeUserBriefResultDTO> listHomeUserBrief(String houseId, String customerId) { |
|
|
|
LambdaQueryWrapper<IcResiUserEntity> lqw = new LambdaQueryWrapper<>(); |
|
|
|
lqw.eq(IcResiUserEntity::getCustomerId, customerId) |
|
|
|
.eq(IcResiUserEntity::getHomeId, houseId) |
|
|
|
.select( |
|
|
|
IcResiUserEntity::getId, |
|
|
|
IcResiUserEntity::getHomeId, |
|
|
|
IcResiUserEntity::getName, |
|
|
|
IcResiUserEntity::getIsParty, |
|
|
|
IcResiUserEntity::getYhzgx, |
|
|
|
IcResiUserEntity::getGender, |
|
|
|
IcResiUserEntity::getMobile, |
|
|
|
IcResiUserEntity::getIdCard, |
|
|
|
IcResiUserEntity::getBirthday |
|
|
|
) |
|
|
|
.orderByAsc(IcResiUserEntity::getYhzgx, IcResiUserEntity::getCreatedTime, IcResiUserEntity::getId); |
|
|
|
|
|
|
|
List<IcResiUserEntity> homeUserList = baseDao.selectList(lqw); |
|
|
|
if (CollUtil.isEmpty(homeUserList)) { |
|
|
|
return Lists.newArrayList(); |
|
|
|
} |
|
|
|
homeUserList.forEach( |
|
|
|
item -> item.setYhzgx(RelationshipEnum.getEnum(item.getYhzgx()).getName()) |
|
|
|
); |
|
|
|
|
|
|
|
return ConvertUtils.sourceToTarget(homeUserList, HomeUserBriefResultDTO.class); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Author sun |
|
|
|
* @Description 【人房】居民总数饼图 |
|
|
@ -1726,6 +1699,35 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
return userList; |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<HomeUserBriefResultDTO> listHomeUserBrief(String houseId, String customerId) { |
|
|
|
LambdaQueryWrapper<IcResiUserEntity> lqw = new LambdaQueryWrapper<>(); |
|
|
|
lqw.eq(IcResiUserEntity::getCustomerId, customerId) |
|
|
|
.eq(IcResiUserEntity::getHomeId, houseId) |
|
|
|
.select( |
|
|
|
IcResiUserEntity::getId, |
|
|
|
IcResiUserEntity::getHomeId, |
|
|
|
IcResiUserEntity::getName, |
|
|
|
IcResiUserEntity::getIsParty, |
|
|
|
IcResiUserEntity::getYhzgx, |
|
|
|
IcResiUserEntity::getGender, |
|
|
|
IcResiUserEntity::getMobile, |
|
|
|
IcResiUserEntity::getIdCard, |
|
|
|
IcResiUserEntity::getBirthday |
|
|
|
) |
|
|
|
.orderByAsc(IcResiUserEntity::getYhzgx); |
|
|
|
|
|
|
|
List<IcResiUserEntity> homeUserList = baseDao.selectList(lqw); |
|
|
|
if (CollUtil.isEmpty(homeUserList)) { |
|
|
|
return Lists.newArrayList(); |
|
|
|
} |
|
|
|
homeUserList.forEach( |
|
|
|
item -> item.setYhzgx(RelationshipEnum.getEnum(item.getYhzgx()).getName()) |
|
|
|
); |
|
|
|
|
|
|
|
return ConvertUtils.sourceToTarget(homeUserList, HomeUserBriefResultDTO.class); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
public List<Map<String, Object>> dynamicQuery(String customerId, String formCode, String resultTableName, List<IcCustomExportResultDTO.SqlColumn> showSqlColumns, List<ResiUserQueryValueDTO> conditions, String currentStaffAgencyId, String staffOrgPath) { |
|
|
|
// List<String> finalSubTables = getFinalSubables(customerId, formCode, resultTableName, conditions);
|
|
|
@ -1734,33 +1736,6 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
return baseDao.dynamicQuery(customerId, resultTableName, conditions, map.get("finalSubTables"), showSqlColumns, currentStaffAgencyId, staffOrgPath, map.get("groupByTables")); |
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public String updateImage(RentTenantFormDTO formDTO) { |
|
|
|
String resiUserId = ""; |
|
|
|
IcResiUserDTO userDTO = baseDao.getResiUserByIdCard(formDTO.getIdCard(), formDTO.getCustomerId()); |
|
|
|
if (null != userDTO) { |
|
|
|
resiUserId = userDTO.getId(); |
|
|
|
// 插入附件头像(只有一张)
|
|
|
|
List<IcResiUserAttachmentDTO> images = formDTO.getImages(); |
|
|
|
images.forEach(item -> item.setUserId(userDTO.getId())); |
|
|
|
images.forEach(item-> icResiUserAttachmentService.save(item)); |
|
|
|
} else if (NumConstant.ONE_STR.equals(formDTO.getType())) { |
|
|
|
// 如果是新增的租客,需要新增一条信息,不存在的房东就不管了
|
|
|
|
IcResiUserEntity entity = ConvertUtils.sourceToTarget(formDTO.getUser(), IcResiUserEntity.class); |
|
|
|
insert(entity); |
|
|
|
resiUserId = entity.getId(); |
|
|
|
|
|
|
|
// 新增用户后保存头像信息
|
|
|
|
List<IcResiUserAttachmentDTO> images = formDTO.getImages(); |
|
|
|
images.forEach(item -> item.setUserId(entity.getId())); |
|
|
|
images.forEach(item -> icResiUserAttachmentService.save(item)); |
|
|
|
} |
|
|
|
|
|
|
|
return resiUserId; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public RentTenantDataResultDTO getRentResiUserInfo(RentTenantDataFormDTO formDTO) { |
|
|
|
IcResiUserEntity entity = baseDao.selectById(formDTO.getUserId()); |
|
|
|