| | |
| | | import cn.lihu.jh.module.ecg.dal.mysql.devrent.DevRentMapper; |
| | | import cn.lihu.jh.module.ecg.dal.mysql.queue.QueueMapper; |
| | | import cn.lihu.jh.module.ecg.dal.mysql.room.RoomMapper; |
| | | import cn.lihu.jh.module.ecg.enums.BedOpTypeEnum; |
| | | import cn.lihu.jh.module.ecg.enums.BedStatusEnum; |
| | | import cn.lihu.jh.module.ecg.enums.QueueStatusEnum; |
| | | import cn.lihu.jh.module.infra.api.config.ConfigApi; |
| | |
| | | AtomicInteger openingFlag = new AtomicInteger(0); |
| | | AtomicInteger curSeqNum = new AtomicInteger(0); |
| | | |
| | | ConcurrentHashMap<String, BedQueueBO > mapBedVsQueue = new ConcurrentHashMap<>(); |
| | | // 维护 开放的工位 |
| | | ConcurrentHashMap<String, BedQueueBO > mapOpeningBed = new ConcurrentHashMap<>(); |
| | | |
| | | // 装机工位..不进入优先队列 |
| | | Map<Integer, PriorityBlockingQueue<BedQueueBO>> mapCheckTypePriorityQueue = new HashMap(); |
| | | |
| | | // 基于类型的, 装机准备的优先队列 |
| | | // Map<Integer, PriorityBlockingQueue<BedQueueBO>> mapReadyPriorityQueue = new HashMap(); |
| | | |
| | | // 装机工位..不进入分流队列 |
| | | Map<Integer, PriorityBlockingQueue<BedQueueBO>> mapCheckTypeRoutingQueue = new HashMap(); |
| | | |
| | | Map<Integer, CheckTypeDO> mapCheckTypeVsReadyMax = null; |
| | | |
| | | /** |
| | |
| | | * @return |
| | | */ |
| | | public ErrorCode bedOpen(Long roomId, String roomName, String bedNo) { |
| | | BedQueueBO bedQueueBO2 = mapBedVsQueue.get( Utils.formatRoomBed(roomId, bedNo) ); |
| | | BedQueueBO bedQueueBO2 = mapOpeningBed.get( Utils.formatRoomBed(roomId, bedNo) ); |
| | | if (null != bedQueueBO2) { |
| | | log.error("bedOpen mapBedVsQueue has existed. " + roomId + " " + bedNo); |
| | | return QUEUE_BED_EXIST; |
| | |
| | | bedQueueBO.setStatus(BedStatusEnum.OPENING.getStatus()); |
| | | bedQueueBO.setCheckTypes( roomDO.getCheckTypes() ); |
| | | bedQueueBO.setOpType( roomDO.getOpType() ); |
| | | mapBedVsQueue.put( Utils.formatRoomBed(roomId, bedNo), bedQueueBO); |
| | | mapOpeningBed.put( Utils.formatRoomBed(roomId, bedNo), bedQueueBO); |
| | | |
| | | return GlobalErrorCodeConstants.SUCCESS; |
| | | } |
| | | |
| | | public ErrorCode bedClose(Long roomId, String bedNo) { |
| | | BedQueueBO bedQueueBO = mapBedVsQueue.get( Utils.formatRoomBed(roomId, bedNo) ); |
| | | BedQueueBO bedQueueBO = mapOpeningBed.get( Utils.formatRoomBed(roomId, bedNo) ); |
| | | if (null == bedQueueBO) { |
| | | log.error("bedClose mapBedVsQueue DONOT existed. " + roomId + " " + bedNo); |
| | | return QUEUE_BED_NOT_EXIST; |
| | | } |
| | | |
| | | // 除了判断 准备候诊中 的人数,还需要 判断 过号的人数 |
| | | //if (bedQueueBO.getQueueNum().get() >0) |
| | | // return QUEUE_HAVE_PATIENT; |
| | | // 检查是否还有患者需要处理 |
| | | List<Integer> queueStatusList = new ArrayList<>(); |
| | | queueStatusList.add(QueueStatusEnum.READY.getStatus()); |
| | | queueStatusList.add(QueueStatusEnum.ONSTAGE.getStatus()); |
| | | queueStatusList.add(QueueStatusEnum.INSTALLING.getStatus()); |
| | | queueStatusList.add(QueueStatusEnum.PASSED.getStatus()); |
| | | queueStatusList.add(QueueStatusEnum.PASSED_INSTALL.getStatus()); |
| | | queueStatusList.add(QueueStatusEnum.RECALLED.getStatus()); |
| | | queueStatusList.add(QueueStatusEnum.RECALLED_INSTALL.getStatus()); |
| | | queueStatusList.add(QueueStatusEnum.AFFINITY.getStatus()); |
| | | queueStatusList.add(QueueStatusEnum.AFFINITY_INSTALL.getStatus()); |
| | | List<QueueDO> queueDOList = queueMapper.getBedQueueByStatus(roomId, bedNo, queueStatusList); |
| | | if (queueDOList.size() > 0) |
| | | return QUEUE_HAVE_PATIENT; |
| | |
| | | return ROOM_INVALID_STATUS; |
| | | } |
| | | |
| | | mapBedVsQueue.remove( Utils.formatRoomBed(roomId, bedNo) ); |
| | | removePriorityQueue(bedQueueBO); |
| | | mapOpeningBed.remove( Utils.formatRoomBed(roomId, bedNo) ); |
| | | removeRoutingQueue(bedQueueBO); |
| | | return GlobalErrorCodeConstants.SUCCESS; |
| | | } |
| | | |
| | | public ErrorCode bedDoctorPause(Long roomId, String bedNo, Long docId, String docName) { |
| | | BedQueueBO bedQueueBO = mapBedVsQueue.get( Utils.formatRoomBed(roomId, bedNo) ); |
| | | BedQueueBO bedQueueBO = mapOpeningBed.get( Utils.formatRoomBed(roomId, bedNo) ); |
| | | if (null == bedQueueBO) { |
| | | log.error("bedDoctorPause mapBedVsQueue DONOT existed. " + roomId + " " + bedNo); |
| | | return QUEUE_BED_NOT_EXIST; |
| | |
| | | } |
| | | |
| | | bedQueueBO.setStatus(BedStatusEnum.PAUSE.getStatus()); |
| | | removePriorityQueue(bedQueueBO); |
| | | removeRoutingQueue(bedQueueBO); |
| | | return GlobalErrorCodeConstants.SUCCESS; |
| | | } |
| | | |
| | | public ErrorCode bedDoctorResume(Long roomId, String bedNo, Long docId, String docName) { |
| | | BedQueueBO bedQueueBO = mapBedVsQueue.get( Utils.formatRoomBed(roomId, bedNo) ); |
| | | BedQueueBO bedQueueBO = mapOpeningBed.get( Utils.formatRoomBed(roomId, bedNo) ); |
| | | if (null == bedQueueBO || !bedQueueBO.getStatus().equals(BedStatusEnum.PAUSE.getStatus())) { |
| | | log.error("bedDoctorResume mapBedVsQueue DONOT existed OR NOT Paused. " + roomId + " " + bedNo); |
| | | return QUEUE_BED_NOT_EXIST; |
| | |
| | | } |
| | | |
| | | bedQueueBO.setStatus(BedStatusEnum.DOCTOR_ON.getStatus()); |
| | | addPriorityQueue(bedQueueBO); |
| | | addRoutingQueue(bedQueueBO); |
| | | return GlobalErrorCodeConstants.SUCCESS; |
| | | } |
| | | |
| | | public ErrorCode bedDoctorOn(Long roomId, String bedNo, Long docId, String docName) { |
| | | BedQueueBO bedQueueBO = mapBedVsQueue.get( Utils.formatRoomBed(roomId, bedNo) ); |
| | | BedQueueBO bedQueueBO = mapOpeningBed.get( Utils.formatRoomBed(roomId, bedNo) ); |
| | | if (null == bedQueueBO) { |
| | | log.error("bedDoctorOn mapBedVsQueue DONOT existed. " + roomId + " " + bedNo); |
| | | return QUEUE_BED_NOT_EXIST; |
| | |
| | | } |
| | | |
| | | bedQueueBO.setStatus(BedStatusEnum.DOCTOR_ON.getStatus()); |
| | | addPriorityQueue(bedQueueBO); |
| | | addRoutingQueue(bedQueueBO); |
| | | return GlobalErrorCodeConstants.SUCCESS; |
| | | } |
| | | |
| | | public ErrorCode bedDoctorOff(Long roomId, String bedNo, Long docId, String docName) { |
| | | BedQueueBO bedQueueBO = mapBedVsQueue.get( Utils.formatRoomBed( roomId, bedNo ) ); |
| | | BedQueueBO bedQueueBO = mapOpeningBed.get( Utils.formatRoomBed( roomId, bedNo ) ); |
| | | if (null == bedQueueBO) { |
| | | log.error("bedDoctorOff mapBedVsQueue DONOT existed. " + roomId + " " + bedNo); |
| | | return QUEUE_BED_NOT_EXIST; |
| | |
| | | return ROOM_INVALID_STATUS; |
| | | } |
| | | |
| | | removePriorityQueue(bedQueueBO); |
| | | removeRoutingQueue(bedQueueBO); |
| | | |
| | | bedQueueBO.setStatus(BedStatusEnum.OPENING.getStatus()); |
| | | return GlobalErrorCodeConstants.SUCCESS; |
| | |
| | | return QUEUE_NOT_READY_PATIENT; |
| | | } |
| | | |
| | | // 优先队列中 该工位 候诊中中人的数量 减一 |
| | | // 分流队列中 该工位 候诊中中人的数量 减一 |
| | | BedQueueBO bo = mapBedVsQueue.get( Utils.formatRoomBed( roomId, bedNo ) ); |
| | | bo.queueNum.getAndDecrement(); // 可能已经【并发的】在 hurry-up 中改变了值 |
| | | |
| | | refreshPriorityQueue(bo); |
| | | refreshRoutingQueue(bo); |
| | | return GlobalErrorCodeConstants.SUCCESS; |
| | | } |
| | | */ |
| | |
| | | firstReadyQueueItem.setStatus(QueueStatusEnum.ONSTAGE.getStatus()); |
| | | queueMapper.updateById( firstReadyQueueItem ); |
| | | |
| | | // 优先队列中 该工位 候诊中中人的数量 减一 |
| | | BedQueueBO bo = mapBedVsQueue.get( Utils.formatRoomBed( roomId, bedNo ) ); |
| | | // 分流队列中 该工位 候诊中中人的数量 减一 |
| | | BedQueueBO bo = mapOpeningBed.get( Utils.formatRoomBed( roomId, bedNo ) ); |
| | | bo.queueNum.getAndDecrement(); // 可能已经【并发的】在 hurry-up 中改变了值 |
| | | |
| | | refreshPriorityQueue(bo); |
| | | refreshRoutingQueue(bo); |
| | | return GlobalErrorCodeConstants.SUCCESS; |
| | | } |
| | | |
| | |
| | | procAffinityWhenSomeOneEntryInstalling(firstItem.getPatId(), roomId, bedNo, checkTypeDO.getAffinityCheckTypes() ); |
| | | } |
| | | |
| | | // 装机工位 无优先队列 |
| | | // 优先队列中 该工位 [已领用]人的数量 减一 |
| | | // 装机工位 不进入 分流队列 |
| | | // 分流队列中 该工位 [已领用]人的数量 减一 |
| | | //BedQueueBO bo = mapBedVsQueue.get( Utils.formatRoomBed( roomId, bedNo ) ); |
| | | //bo.queueNum.getAndDecrement(); // 可能已经【并发的】在 hurry-up 中改变了值 |
| | | //refreshPriorityQueue(bo); |
| | | //refreshRoutingQueue(bo); |
| | | |
| | | return GlobalErrorCodeConstants.SUCCESS; |
| | | } |
| | | |
| | | /** |
| | | * 1. 每天开诊前 从DB同步工位的患者队列数据到 工位优先队列 |
| | | * 1. 每天开诊前 从DB同步工位的患者队列数据到 工位分流队列 |
| | | * 2. 服务运维重启时 |
| | | */ |
| | | public ErrorCode bedReload() { |
| | | mapCheckTypePriorityQueue.clear(); |
| | | mapBedVsQueue.clear(); |
| | | mapCheckTypeRoutingQueue.clear(); |
| | | mapOpeningBed.clear(); |
| | | |
| | | // 清除非当天的排队人员 |
| | | queueMapper.clearQueue(); |
| | |
| | | List<RoomDO> roomDOList = roomMapper.simpleRoomList(bedStatusEnumList); |
| | | List<BedQueueBO> bedQueueBOList = roomDOList.stream().map(item -> BeanUtils.toBean(item, BedQueueBO.class)).toList(); |
| | | |
| | | // 从DB 获取 队列中 候诊中中人员统计 列表 |
| | | // 从DB 获取 队列中 【候诊中】人员统计 列表 |
| | | List<Integer> queueStatusList = new ArrayList<>(); |
| | | queueStatusList.add(QueueStatusEnum.READY.getStatus()); |
| | | List<QueueStatisticDO> queueStatisticDOList = queueMapper.queueStatistic(queueStatusList); |
| | | |
| | | bedQueueBOList.forEach(item -> { |
| | | item.maxQueueNum = getBedReadyMax(item.roomId, item.bedNo); |
| | | item.setMaxQueueNum( getBedReadyMax(item.roomId, item.bedNo) ); |
| | | Optional<QueueStatisticDO> queueStatisticDOOptional = queueStatisticDOList.stream().filter(it->it.getRoomId()==item.roomId && it.getBedNo().equals(item.getBedNo())).findFirst(); |
| | | int queueNum = queueStatisticDOOptional.isPresent() ? queueStatisticDOOptional.get().getTotalInStatus() : 0; |
| | | if ( item.maxQueueNum < queueNum ) |
| | | if ( item.getMaxQueueNum() < queueNum ) |
| | | throw new RuntimeException("init: exceed max queue number!"); |
| | | |
| | | item.queueNum.set( queueNum ); |
| | | mapBedVsQueue.put( Utils.formatRoomBed(item.roomId, item.bedNo), item); |
| | | item.setQueueNum( new AtomicInteger(queueNum) ); |
| | | mapOpeningBed.put( Utils.formatRoomBed(item.roomId, item.bedNo), item); |
| | | if (BedStatusEnum.DOCTOR_ON.getStatus() == item.getStatus()) { |
| | | addPriorityQueue(item); |
| | | addRoutingQueue(item); |
| | | } |
| | | }); |
| | | |
| | |
| | | if (0 == openingFlag.get()) |
| | | return; |
| | | |
| | | mapBedVsQueue.values().forEach(bedQueueBO -> hurryupOneBed(bedQueueBO.roomId, bedQueueBO.bedNo)); |
| | | mapOpeningBed.values().forEach(bedQueueBO -> hurryupOneBed(bedQueueBO.roomId, bedQueueBO.bedNo)); |
| | | } |
| | | |
| | | /** |
| | |
| | | bedQueueBO.getRoomName(), |
| | | bedQueueBO.getBedNo(), |
| | | curSeqNum.get() + 1, // 过号回来,排到当前的下一位 |
| | | QueueStatusEnum.RECALLED.getStatus(), // 不需要处理 [安装召回], 原因: 安装工位 没有优先队列 |
| | | QueueStatusEnum.RECALLED.getStatus(), // 不需要处理 [安装召回], 原因: 安装工位 不进入分流队列 |
| | | QueueStatusEnum.READY.getStatus()); |
| | | if (null == updateNum || 0 == updateNum) |
| | | break; |
| | |
| | | // 可能已经【并发的】在 nextPatient 中改变了值 |
| | | bedQueueBO.queueNum.incrementAndGet(); |
| | | |
| | | // 可能已经【并发的】在 nextPatient 中改变了优先队列顺序 |
| | | refreshPriorityQueue(bedQueueBO); |
| | | // 可能已经【并发的】在 nextPatient 中改变了分流队列顺序 |
| | | refreshRoutingQueue(bedQueueBO); |
| | | } |
| | | |
| | | // 处理 排队中 患者 |
| | |
| | | */ |
| | | public void hurryupOneCheckType(Integer checkType) { |
| | | |
| | | PriorityBlockingQueue<BedQueueBO> priorityQueue = mapCheckTypePriorityQueue.get(checkType); |
| | | if (null == priorityQueue) |
| | | PriorityBlockingQueue<BedQueueBO> routingQueue = mapCheckTypeRoutingQueue.get(checkType); |
| | | if (null == routingQueue) |
| | | return; |
| | | |
| | | while (true) { |
| | | BedQueueBO bedQueueBO = priorityQueue.peek(); |
| | | BedQueueBO bedQueueBO = routingQueue.peek(); |
| | | if (null == bedQueueBO) |
| | | return; |
| | | |
| | |
| | | // 可能已经【并发的】在 nextPatient 中改变了值 |
| | | bedQueueBO.queueNum.incrementAndGet(); |
| | | |
| | | // 可能已经【并发的】在 nextPatient 中改变了优先队列顺序 |
| | | refreshPriorityQueue(bedQueueBO); |
| | | // 可能已经【并发的】在 nextPatient 中改变了分流队列顺序 |
| | | refreshRoutingQueue(bedQueueBO); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | public BedQueueBO getBedQueueBO(Long roomId, String bedNo) { |
| | | return mapBedVsQueue.get( Utils.formatRoomBed(roomId, bedNo) ); |
| | | return mapOpeningBed.get( Utils.formatRoomBed(roomId, bedNo) ); |
| | | } |
| | | |
| | | public MonitorInfoVO getMonitorInfo() { |
| | |
| | | public void monitorInfo() { |
| | | MonitorInfoVO monitorInfoVO = new MonitorInfoVO(); |
| | | roomBedStatistic(monitorInfoVO); |
| | | log.info(" opening " + openingFlag.get() + " " + monitorInfoVO.getQueueNum() + " " + monitorInfoVO.getActiveQueueNum() + " " + monitorInfoVO.getCheckTypeBedInfo().toString() ); |
| | | log.info(" opening " + openingFlag.get() + " " + monitorInfoVO.getOpeningBedNum() + " " + monitorInfoVO.getDocBedNum() + " " + monitorInfoVO.getCheckTypeBedInfo().toString() ); |
| | | } |
| | | |
| | | private void hurryupOneBedCheckTypeList(BedQueueBO bedQueueBO) { |
| | |
| | | bedQueueBO.queueNum.incrementAndGet(); |
| | | } |
| | | |
| | | // 改变了优先队列顺序 |
| | | refreshPriorityQueue(bedQueueBO); |
| | | // 改变了分流队列顺序 |
| | | refreshRoutingQueue(bedQueueBO); |
| | | } |
| | | |
| | | /** |
| | |
| | | for (int i=0; i<checkTypes.length; i++) { |
| | | CheckTypeDO checkTypeDO = mapCheckTypeVsReadyMax.get(checkTypes[i]); |
| | | Integer tmp = checkTypeDO.getReadyNum(); |
| | | ret = ret < tmp ? tmp : ret; //取大值 |
| | | ret = ret < tmp ? tmp : ret; //【候诊中】数量 取大值 |
| | | } |
| | | return ret; |
| | | } |
| | | |
| | | private void addPriorityQueue(BedQueueBO bedQueueBO) { |
| | | private void addRoutingQueue(BedQueueBO bedQueueBO) { |
| | | // 装机工位 不进 分流队列,不接收 【排队中】患者分流 |
| | | if (BedOpTypeEnum.OP_INSTALL.getOpType() == bedQueueBO.getOpType()) |
| | | return; |
| | | |
| | | Integer[] checkTypes = bedQueueBO.getCheckTypes(); |
| | | Arrays.stream(checkTypes).forEach(checkType -> { |
| | | CheckTypeDO checkTypeDO = mapCheckTypeVsReadyMax.get(checkType); |
| | | // 装机工位 不进 优先队列,不从排队中接收人 |
| | | if (checkTypeDO.getNeedDevReady() == 1 && bedQueueBO.getOpType() == 2) { |
| | | return; |
| | | } |
| | | |
| | | PriorityBlockingQueue<BedQueueBO> priorityQueue = mapCheckTypePriorityQueue.get(checkType); |
| | | if (null == priorityQueue) { |
| | | priorityQueue = new PriorityBlockingQueue<BedQueueBO>(); |
| | | mapCheckTypePriorityQueue.put( checkType, priorityQueue ); |
| | | PriorityBlockingQueue<BedQueueBO> routingQueue = mapCheckTypeRoutingQueue.get(checkType); |
| | | if (null == routingQueue) { |
| | | routingQueue = new PriorityBlockingQueue<BedQueueBO>(); |
| | | mapCheckTypeRoutingQueue.put( checkType, routingQueue ); |
| | | } |
| | | |
| | | if (!priorityQueue.contains(bedQueueBO)) { |
| | | priorityQueue.offer(bedQueueBO); |
| | | if (!routingQueue.contains(bedQueueBO)) { |
| | | routingQueue.offer(bedQueueBO); |
| | | } else { |
| | | log.error("bedDoctorResume priorityQueue still exist!. " + bedQueueBO.getRoomId() + " " + bedQueueBO.getBedNo()); |
| | | log.error("bedDoctorResume routingQueue still exist!. " + bedQueueBO.getRoomId() + " " + bedQueueBO.getBedNo()); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | private void removePriorityQueue(BedQueueBO bedQueueBO) { |
| | | private void removeRoutingQueue(BedQueueBO bedQueueBO) { |
| | | // 装机工位 不进 分流队列,不接收 【排队中】患者分流 |
| | | if (BedOpTypeEnum.OP_INSTALL.getOpType() == bedQueueBO.getOpType()) |
| | | return; |
| | | |
| | | Integer[] checkTypes = bedQueueBO.getCheckTypes(); |
| | | Arrays.stream(checkTypes).forEach(checkType -> { |
| | | PriorityBlockingQueue<BedQueueBO> priorityBlockingQueue = mapCheckTypePriorityQueue.get(checkType); |
| | | if (null != priorityBlockingQueue) |
| | | priorityBlockingQueue.remove(bedQueueBO); |
| | | PriorityBlockingQueue<BedQueueBO> routingQueue = mapCheckTypeRoutingQueue.get(checkType); |
| | | if (null != routingQueue) |
| | | routingQueue.remove(bedQueueBO); |
| | | }); |
| | | } |
| | | |
| | | private void refreshPriorityQueue(BedQueueBO bedQueueBO) { |
| | | private void refreshRoutingQueue(BedQueueBO bedQueueBO) { |
| | | // 装机工位 不进 分流队列,不接收 【排队中】患者分流 |
| | | if (BedOpTypeEnum.OP_INSTALL.getOpType() == bedQueueBO.getOpType()) |
| | | return; |
| | | |
| | | Integer[] checkTypes = bedQueueBO.getCheckTypes(); |
| | | Arrays.stream(checkTypes).forEach(checkType -> { |
| | | PriorityBlockingQueue<BedQueueBO> priorityQueue = mapCheckTypePriorityQueue.get(checkType); |
| | | priorityQueue.remove(bedQueueBO); |
| | | priorityQueue.offer(bedQueueBO); |
| | | PriorityBlockingQueue<BedQueueBO> routingQueue = mapCheckTypeRoutingQueue.get(checkType); |
| | | routingQueue.remove(bedQueueBO); |
| | | routingQueue.offer(bedQueueBO); |
| | | }); |
| | | } |
| | | |
| | |
| | | }); |
| | | |
| | | //开通的 和 运营中 的工位统计 |
| | | mapBedVsQueue.values().forEach( bedQueueBO -> { |
| | | mapOpeningBed.values().forEach(bedQueueBO -> { |
| | | Integer[] checkTypes = bedQueueBO.getCheckTypes(); |
| | | Arrays.stream(checkTypes).forEach(checkType -> { |
| | | if (bedQueueBO.opType == 0 || bedQueueBO.opType == 1) |
| | |
| | | }); |
| | | }); |
| | | |
| | | // 接收..排队中患者..的优先队列 |
| | | // 接收..排队中患者..的分流队列 |
| | | HashSet<BedQueueBO> hashSetOperatingBedQueue = new HashSet<>(); |
| | | mapCheckTypePriorityQueue.values().forEach(priorityQueue->{ |
| | | priorityQueue.stream().forEach(bedQueueBO -> hashSetOperatingBedQueue.add(bedQueueBO)); |
| | | mapCheckTypeRoutingQueue.values().forEach(routingQueue->{ |
| | | routingQueue.stream().forEach(bedQueueBO -> hashSetOperatingBedQueue.add(bedQueueBO)); |
| | | }); |
| | | |
| | | |
| | |
| | | }); |
| | | |
| | | monitorInfoVO.setCheckTypeBedInfo(mapCheckTypeBedInfo); |
| | | monitorInfoVO.setQueueNum(mapBedVsQueue.size()); |
| | | monitorInfoVO.setActiveQueueNum((int) mapBedVsQueue.values().stream().filter(item -> item.getStatus() == BedStatusEnum.DOCTOR_ON.getStatus()).count()); |
| | | monitorInfoVO.setPriorityQueueNum( hashSetOperatingBedQueue.size() ); |
| | | monitorInfoVO.setMapBedVsQueue( mapBedVsQueue ); |
| | | monitorInfoVO.setOpeningBedNum(mapOpeningBed.size()); |
| | | monitorInfoVO.setDocBedNum((int) mapOpeningBed.values().stream().filter(item -> |
| | | item.getStatus() == BedStatusEnum.DOCTOR_ON.getStatus() || |
| | | item.getStatus() == BedStatusEnum.PAUSE.getStatus()) |
| | | .count()); |
| | | monitorInfoVO.setRoutingBedNum( hashSetOperatingBedQueue.size() ); |
| | | monitorInfoVO.setMapBedVsQueue(mapOpeningBed); |
| | | } |
| | | |
| | | } |