| | |
| | | PatientStatisticVO patientStatisticVO = new PatientStatisticVO(); |
| | | List<BedQueueStatisticDO> bedQueueStatisticDOList = queueMapper.bedQueueStatistic(roomId, bedNo); |
| | | bedQueueStatisticDOList.forEach(item -> { |
| | | if (QueueStatusEnum.RECEIVED.getStatus() == item.getStatus()) { |
| | | patientStatisticVO.setReceivedNum(item.getTotalInStatus()); |
| | | } else if (QueueStatusEnum.FINISH.getStatus() == item.getStatus()) { |
| | | // } else if (QueueStatusEnum.INSTALLING.getStatus() == item.getStatus()) { |
| | | // patientStatisticVO.setReceivedNum( patientStatisticVO.getReceivedNum() + item.getTotalInStatus() ); |
| | | if (QueueStatusEnum.FINISH.getStatus() == item.getStatus()) { |
| | | patientStatisticVO.setFinishedNum(item.getTotalInStatus()); |
| | | } |
| | | }); |
| | | |
| | | // 装机界面:统计 该诊室 [已领用] 的数量, 因为安装工位看不到 [已领用] 患者,所以无法根据装机工位来统计,只能按诊室统计 |
| | | patientStatisticVO.setReceivedNum( 0 ); |
| | | List<BedQueueStatisticDO> roomQueueStatisticDOList = queueMapper.roomQueueStatistic(roomId); |
| | | roomQueueStatisticDOList.forEach(item -> { |
| | | if (QueueStatusEnum.RECEIVED.getStatus() == item.getStatus()) { |
| | | patientStatisticVO.setReceivedNum( patientStatisticVO.getReceivedNum() + item.getTotalInStatus() ); |
| | | } |
| | | }); |
| | | |
| | |
| | | |
| | | public PatientStatisticVO getBedDevReadyStatistic(Long roomId, String bedNo) { |
| | | PatientStatisticVO patientStatisticVO = new PatientStatisticVO(); |
| | | patientStatisticVO.setFinishedNum(0); |
| | | List<BedQueueStatisticDO> bedQueueStatisticDOList = queueMapper.bedQueueStatistic(roomId, bedNo); |
| | | bedQueueStatisticDOList.forEach(item -> { |
| | | if (QueueStatusEnum.READY.getStatus() == item.getStatus()) { |
| | | patientStatisticVO.setReadyNum(item.getTotalInStatus()); |
| | | } else if (QueueStatusEnum.PASSED.getStatus() == item.getStatus()) { |
| | | patientStatisticVO.setPassedNum(item.getTotalInStatus()); |
| | | } else if (QueueStatusEnum.RECEIVED.getStatus() == item.getStatus()) { |
| | | patientStatisticVO.setFinishedNum( item.getTotalInStatus() + patientStatisticVO.getFinishedNum() ); |
| | | } else if (QueueStatusEnum.INSTALLING.getStatus() == item.getStatus()) { |
| | | patientStatisticVO.setFinishedNum( item.getTotalInStatus() + patientStatisticVO.getFinishedNum() ); |
| | | } else if (QueueStatusEnum.FINISH.getStatus() == item.getStatus()) { |
| | | patientStatisticVO.setFinishedNum(item.getTotalInStatus() + patientStatisticVO.getFinishedNum()); |
| | | } |
| | | }); |
| | | |
| | | // 领用界面:统计 该诊室 [已领用] 的数量, 因为安装时患者归属工位从领用工位变更到安装工位,所以无法根据领用工位来统计,只能按诊室统计 |
| | | patientStatisticVO.setReceivedNum( 0 ); |
| | | List<BedQueueStatisticDO> roomQueueStatisticDOList = queueMapper.roomQueueStatistic(roomId); |
| | | roomQueueStatisticDOList.forEach(item -> { |
| | | if (QueueStatusEnum.RECEIVED.getStatus() == item.getStatus()) { |
| | | patientStatisticVO.setReceivedNum( patientStatisticVO.getReceivedNum() + item.getTotalInStatus() ); |
| | | } else if (QueueStatusEnum.INSTALLING.getStatus() == item.getStatus()) { |
| | | patientStatisticVO.setReceivedNum( patientStatisticVO.getReceivedNum() + item.getTotalInStatus() ); |
| | | } else if (QueueStatusEnum.FINISH.getStatus() == item.getStatus()) { |
| | | patientStatisticVO.setReceivedNum(patientStatisticVO.getReceivedNum() + item.getTotalInStatus() ); |
| | | } |
| | | }); |
| | | |
| | | // 统计 该工位类型的【排队中】人员数量 |
| | | RoomDO roomDO = getRoomDO(roomId, bedNo); |
| | | Integer[] checkTypes = roomDO.getCheckTypes(); |
| | | List<Byte> statusList = new ArrayList<>(); |
| | | statusList.add(QueueStatusEnum.WAITING.getStatus()); |
| | | Integer num = queueMapper.checkTypeAndStatusStatistic(roomId, bedNo, checkTypes, statusList); |
| | | Integer num = queueMapper.checkTypeAndStatusStatistic(checkTypes, statusList); |
| | | patientStatisticVO.setQueuingNum(num); |
| | | |
| | | return patientStatisticVO; |