eight
2024-09-04 a47e5cd452a405463c03d1d8c4f97884123a46b2
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/queueServiceImpl.java
@@ -8,6 +8,7 @@
import cn.lihu.jh.module.ecg.controller.admin.room.vo.MonitorInfoVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import org.springframework.validation.annotation.Validated;
import cn.lihu.jh.framework.common.exception.enums.GlobalErrorCodeConstants;
@@ -685,4 +686,17 @@
        return null;
    }
    @Override
    public List<QueueDO> getRoomQueue(String ip, List<Byte> statusList) {
        List<RoomDO> roomDOList = roomMapper.queueByIp(ip);
        Optional<RoomDO> optionalQueueDO = roomDOList.stream().filter(item -> StringUtils.hasLength(item.getIp())).findFirst();
        if (!optionalQueueDO.isPresent()) {
            return  new ArrayList<QueueDO>();
        }
        Long roomId = optionalQueueDO.get().getRoomId();
        List<QueueDO> queueDOList = queueMapper.getRoomQueueByStatus(roomId, statusList);
        return queueDOList;
    }
}