|
|
@ -18,6 +18,7 @@ |
|
|
|
package com.epmet.service.impl; |
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSON; |
|
|
|
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.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|
|
@ -40,6 +41,7 @@ import com.epmet.dto.form.IcResiDetailFormDTO; |
|
|
|
import com.epmet.dto.form.IcResiUserFormDTO; |
|
|
|
import com.epmet.dto.form.IcResiUserPageFormDTO; |
|
|
|
import com.epmet.dto.result.AllGridsByUserIdResultDTO; |
|
|
|
import com.epmet.dto.result.HomeUserResultDTO; |
|
|
|
import com.epmet.dto.result.HouseInfoDTO; |
|
|
|
import com.epmet.dto.result.IcFormResColumnDTO; |
|
|
|
import com.epmet.entity.IcResiUserEntity; |
|
|
@ -50,13 +52,13 @@ import com.epmet.service.IcResiUserService; |
|
|
|
import com.github.pagehelper.PageHelper; |
|
|
|
import com.github.pagehelper.PageInfo; |
|
|
|
import lombok.extern.slf4j.Slf4j; |
|
|
|
import org.apache.commons.collections4.CollectionUtils; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
|
import org.apache.logging.log4j.LogManager; |
|
|
|
import org.apache.logging.log4j.Logger; |
|
|
|
import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.stereotype.Service; |
|
|
|
import org.springframework.transaction.annotation.Transactional; |
|
|
|
import org.springframework.util.CollectionUtils; |
|
|
|
|
|
|
|
import java.util.*; |
|
|
|
import java.util.function.Function; |
|
|
@ -238,9 +240,39 @@ public class IcResiUserServiceImpl extends BaseServiceImpl<IcResiUserDao, IcResi |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @param homeId |
|
|
|
* @Description 获取房间内人员 |
|
|
|
* @Param homeId |
|
|
|
* @Return {@link List< HomeUserResultDTO >} |
|
|
|
* @Author zhaoqifeng |
|
|
|
* @Date 2021/11/1 10:52 |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public List<HomeUserResultDTO> getPeopleByRoom(String homeId) { |
|
|
|
if(StringUtils.isBlank(homeId)) { |
|
|
|
return Collections.emptyList(); |
|
|
|
} |
|
|
|
LambdaQueryWrapper<IcResiUserEntity> wrapper = new LambdaQueryWrapper<>(); |
|
|
|
wrapper.eq(IcResiUserEntity::getHomeId, homeId); |
|
|
|
wrapper.orderByAsc(IcResiUserEntity::getYhzgx); |
|
|
|
List<IcResiUserEntity> list = baseDao.selectList(wrapper); |
|
|
|
|
|
|
|
if (CollectionUtils.isEmpty(list)) { |
|
|
|
return Collections.emptyList(); |
|
|
|
} |
|
|
|
return list.stream().map(item -> { |
|
|
|
HomeUserResultDTO dto = new HomeUserResultDTO(); |
|
|
|
dto.setUserId(item.getId()); |
|
|
|
dto.setName(item.getName()); |
|
|
|
return dto; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public PageData<Map<String, Object>> pageResiMap(IcResiUserPageFormDTO formDTO) { |
|
|
|
// 查询列表展示项,如果没有,直接返回
|
|
|
|
CustomerFormQueryDTO queryDTO1=new CustomerFormQueryDTO(); |
|
|
|