| | |
| | | Map<Integer, List<QueueDO>> map = callingScreenService.callingData(); |
| | | |
| | | Map<Integer, List<CallingRespVO>> mapVO = new HashMap<>(); |
| | | |
| | | map.keySet().forEach( key -> { |
| | | mapVO.put(key, BeanUtils.toBean(map.get(key), CallingRespVO.class)); |
| | | }); |
| | |
| | | @GetMapping("/room-screen-data") |
| | | @Operation(summary = "诊间屏数据") |
| | | @PermitAll |
| | | public CommonResult<List<CallingRespVO>> callingDataRoom(HttpServletRequest request) |
| | | public CommonResult<Map<Integer, List<CallingRespVO>>> callingDataRoom(HttpServletRequest request) |
| | | { |
| | | String reqIp = ServletUtil.getClientIP(request); |
| | | |
| | | List<Byte> queueStatusList = new ArrayList<>(); |
| | | queueStatusList.add(QueueStatusEnum.RECALLED.getStatus()); |
| | | queueStatusList.add(QueueStatusEnum.READY.getStatus()); |
| | | queueStatusList.add(QueueStatusEnum.ONSTAGE.getStatus()); |
| | | queueStatusList.add(QueueStatusEnum.PASSED.getStatus()); |
| | | |
| | | List<QueueDO> queueDOList = callingScreenService.getRoomQueue(reqIp, queueStatusList); |
| | | return success(BeanUtils.toBean(queueDOList, CallingRespVO.class)); |
| | | |
| | | List<QueueDO> passedList = queueDOList.stream().filter(queue -> queue.getStatus() == QueueStatusEnum.PASSED.getStatus()).toList(); |
| | | queueDOList.removeIf(queue -> queue.getStatus() == QueueStatusEnum.PASSED.getStatus()); |
| | | |
| | | Map<Integer, List<CallingRespVO>> mapVO = new HashMap<>(); |
| | | mapVO.put(1, BeanUtils.toBean(queueDOList, CallingRespVO.class)); |
| | | mapVO.put(2, BeanUtils.toBean(passedList, CallingRespVO.class)); |
| | | return success( mapVO ); |
| | | } |
| | | |
| | | @GetMapping("/mark-called") |