| | |
| | | } |
| | | |
| | | @Override |
| | | public RoomProfile getRoomByIP(String ip) { |
| | | List<RoomDO> roomDOList = roomMapper.queueByIp(ip); |
| | | public RoomProfile getRoomByIP(String ip, Long roomId) { |
| | | List<RoomDO> roomDOList = null; |
| | | if (null != roomId) { |
| | | roomDOList = roomMapper.selectList(RoomDO::getRoomId, roomId); |
| | | } else { |
| | | roomDOList = roomMapper.queueByIp(ip); |
| | | } |
| | | |
| | | RoomProfile roomProfile = new RoomProfile(); |
| | | roomProfile.setBedNum( 0 ); |
| | |
| | | if ( roomDO.getOpType() == 0 || roomDO.getOpType() == 1 ) { |
| | | // do nothing |
| | | } else if ( roomDO.getOpType() == 2 ) { |
| | | roomProfile.setCallingScreenType( RoomCallingScreenEnum.HYBRID.getCallingScreenType()); |
| | | roomProfile.setCallingScreenType( RoomCallingScreenEnum.CHECK_INSTALL.getCallingScreenType()); |
| | | } |
| | | } else if (roomProfile.getCallingScreenType() == RoomCallingScreenEnum.RECEIVE_ONLY.getCallingScreenType()) { |
| | | if ( roomDO.getOpType() == 0 || roomDO.getOpType() == 1 ) { |
| | | // do nothing |
| | | } else if ( roomDO.getOpType() == 2 ) { |
| | | roomProfile.setCallingScreenType( RoomCallingScreenEnum.HYBRID.getCallingScreenType()); |
| | | roomProfile.setCallingScreenType( RoomCallingScreenEnum.RECEIVE_INSTALL.getCallingScreenType()); |
| | | } |
| | | } else if (roomProfile.getCallingScreenType() == RoomCallingScreenEnum.INSTALL_ONLY.getCallingScreenType()) { |
| | | if ( roomDO.getOpType() == 0 || roomDO.getOpType() == 1 ) { |
| | | roomProfile.setCallingScreenType( RoomCallingScreenEnum.HYBRID.getCallingScreenType()); |
| | | if ( roomDO.getOpType() == 0 ) { |
| | | roomProfile.setCallingScreenType( RoomCallingScreenEnum.CHECK_INSTALL.getCallingScreenType()); |
| | | } else if ( roomDO.getOpType() == 1 ) { |
| | | roomProfile.setCallingScreenType( RoomCallingScreenEnum.RECEIVE_INSTALL.getCallingScreenType()); |
| | | } else if ( roomDO.getOpType() == 2 ) { |
| | | // do nothing |
| | | } |
| | | } else if (roomProfile.getCallingScreenType() == RoomCallingScreenEnum.HYBRID.getCallingScreenType()) { |
| | | } else if (roomProfile.getCallingScreenType() == RoomCallingScreenEnum.RECEIVE_INSTALL.getCallingScreenType()) { |
| | | // do nothing |
| | | } else if (roomProfile.getCallingScreenType() == RoomCallingScreenEnum.CHECK_INSTALL.getCallingScreenType()) { |
| | | // do nothing |
| | | } |
| | | } |
| | |
| | | List<BedStatusEnum> bedStatusEnumList = new ArrayList<BedStatusEnum>(); |
| | | bedStatusEnumList.add(BedStatusEnum.OPENING); |
| | | bedStatusEnumList.add(BedStatusEnum.DOCTOR_ON); |
| | | bedStatusEnumList.add(BedStatusEnum.PAUSE); |
| | | bedStatusEnumList.add(BedStatusEnum.DOCTOR_PAUSE); |
| | | return roomMapper.simpleRoomList(bedStatusEnumList); |
| | | } |
| | | |