| | |
| | | |
| | | BigScreenConfig bigScreenConfig; |
| | | |
| | | Map<Integer, List<CheckTypeDO>> mapDisplayColName = null; |
| | | |
| | | Map<Integer, Integer> mapCheckTypeVsDisplayColumn = null; |
| | | |
| | | Integer waitingFrom = 0; |
| | |
| | | |
| | | @Override |
| | | public Map<Integer, List<String>> getDisplayColInfo() { |
| | | if (null == mapDisplayColName) { |
| | | CheckTypePageReqVO checkTypePageReqVO = new CheckTypePageReqVO(); |
| | | checkTypePageReqVO.setPageSize(-1); |
| | | PageResult<CheckTypeDO> pageResult = checkTypeMapper.selectPage(checkTypePageReqVO); |
| | | mapDisplayColName = pageResult.getList().stream().collect(Collectors.groupingBy(CheckTypeDO::getCallingColumn)); |
| | | mapCheckTypeVsDisplayColumn = pageResult.getList().stream().collect(Collectors.toMap(CheckTypeDO::getValue, item -> item.getCallingColumn())); |
| | | } |
| | | CheckTypePageReqVO checkTypePageReqVO = new CheckTypePageReqVO(); |
| | | checkTypePageReqVO.setPageSize(-1); |
| | | checkTypePageReqVO.setCallingColumn(-1); // 列号 -1 的不显示 |
| | | PageResult<CheckTypeDO> pageResult = checkTypeMapper.selectPageForCallingScreen(checkTypePageReqVO); |
| | | Map<Integer, List<CheckTypeDO>> mapDisplayColName = pageResult.getList().stream().collect(Collectors.groupingBy(CheckTypeDO::getCallingColumn)); |
| | | mapCheckTypeVsDisplayColumn = pageResult.getList().stream().collect(Collectors.toMap(CheckTypeDO::getValue, item -> item.getCallingColumn())); |
| | | |
| | | Map<Integer, List<String>> _map = new HashMap<>(); |
| | | mapDisplayColName.keySet().forEach(key -> { |
| | |
| | | return _map; |
| | | } |
| | | |
| | | /** |
| | | * 大屏显示的患者信息 |
| | | * 不会有安装相关的患者信息 |
| | | */ |
| | | @Override |
| | | public Map<Integer, Map<Integer, List<QueueDO>>> callingData() { |
| | | Map<Integer, Map<Integer, List<QueueDO>>> mapDisplayColQueue = new HashMap<>(); |
| | |
| | | queueStatusList.add(QueueStatusEnum.WAITING.getStatus()); |
| | | queueStatusList.add(QueueStatusEnum.RECALLED.getStatus()); |
| | | queueStatusList.add(QueueStatusEnum.PASSED.getStatus()); |
| | | queueStatusList.add(QueueStatusEnum.AFFINITY.getStatus()); |
| | | List<QueueDO> queueDOList = queueMapper.getQueueByStatus( queueStatusList ); |
| | | queueDOList.stream().forEach(queueDO -> { |
| | | Map<Integer, List<QueueDO>> mapSlotQueue = mapDisplayColQueue.get(mapCheckTypeVsDisplayColumn.get(queueDO.getBookCheckType())); |
| | |
| | | }); |
| | | |
| | | mapDisplayColQueue.values().stream().forEach(mapSoltQueue -> mapSoltQueue.values().stream().forEach( |
| | | slotQueueList -> slotQueueList.sort((o1, o2) -> o1.getSeqNum() - o2.getSeqNum()))); |
| | | slotQueueList -> slotQueueList.sort((o1, o2) -> { |
| | | if (null == o1.getSeqNum() && null == o2.getSeqNum()) { |
| | | return o1.getBookTimeslot() - o2.getBookTimeslot(); |
| | | } else if (null != o1.getSeqNum() && null != o2.getSeqNum()) { |
| | | return o1.getSeqNum() - o2.getSeqNum(); |
| | | } else if (null == o1.getSeqNum()) { |
| | | return 1; |
| | | } else { //这里 必定 null == o2.getSeqNum() |
| | | return -1; |
| | | } |
| | | }))); |
| | | return mapDisplayColQueue; |
| | | } |
| | | |