| | |
| | | QueueDO onStageItem = installingQueueDOList.getFirst(); |
| | | CallSaveReqVO callSaveReqVO = BeanUtils.toBean(onStageItem, CallSaveReqVO.class); |
| | | callSaveReqVO.setId(null); |
| | | callSaveReqVO.setCallType(1); // 装机叫号 |
| | | callService.createCall(callSaveReqVO); |
| | | } |
| | | |
| | |
| | | |
| | | List<QueueDO> queueDOList = queueService.getToBeInstalledPatient(roomId, bedNo); |
| | | |
| | | /* |
| | | // 过滤出 就诊中的,准备叫号 |
| | | QueueDO onStageItem = queueDOList.stream().filter(item -> Objects.equals(item.getStatus(), QueueStatusEnum.ONSTAGE.getStatus())).findFirst().orElse(null); |
| | | if (null != onStageItem) { |
| | | List<QueueDO> installingQueueDOList = queueDOList.stream().filter(queueDO -> queueDO.getStatus() == QueueStatusEnum.INSTALLING.getStatus()).toList(); |
| | | // 过滤出 [安装中] 的,准备叫号 该工位应该 最多只有一个 [安装中] |
| | | if (installingQueueDOList.size() > 0) { |
| | | QueueDO onStageItem = installingQueueDOList.getFirst(); |
| | | CallSaveReqVO callSaveReqVO = BeanUtils.toBean(onStageItem, CallSaveReqVO.class); |
| | | callSaveReqVO.setId(null); |
| | | callSaveReqVO.setCallType(1); // 装机叫号 |
| | | callService.createCall(callSaveReqVO); |
| | | } |
| | | */ |
| | | |
| | | return success(BeanUtils.toBean(queueDOList, QueueRespVO.class)); |
| | | } |
| | | |
| | | @GetMapping("/call-again") |
| | | @Operation(summary = "重叫、患者") |
| | | @Operation(summary = "[常规检查]或[领用] 重叫、患者") |
| | | @Parameter(name = "roomId", description = "诊室编号", required = true, example = "116") |
| | | @Parameter(name = "bedNo", description = "工位编号", required = true, example = "B2") |
| | | @PreAuthorize("@ss.hasPermission('ecg:doctor:task')") |
| | | public CommonResult<String> callAgainPatient( |
| | | public CommonResult<String> callPatientAgain( |
| | | @RequestParam("roomId") Long roomId, |
| | | @RequestParam("bedNo") String bedNo) |
| | | { |
| | |
| | | return success("操作成功"); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/call-install-again") |
| | | @Operation(summary = "重叫、患者") |
| | | @Parameter(name = "roomId", description = "诊室编号", required = true, example = "116") |
| | | @Parameter(name = "bedNo", description = "工位编号", required = true, example = "B2") |
| | | @PreAuthorize("@ss.hasPermission('ecg:doctor:task')") |
| | | public CommonResult<String> callInstallingPatientAgain( |
| | | @RequestParam("roomId") Long roomId, |
| | | @RequestParam("bedNo") String bedNo) |
| | | { |
| | | List<Byte> queueStatusList = new ArrayList<>(); |
| | | queueStatusList.add(QueueStatusEnum.INSTALLING.getStatus()); |
| | | List<QueueDO> queueDOList = queueService.getBedQueueByStatus(roomId, bedNo, queueStatusList); |
| | | |
| | | if (queueDOList.isEmpty()) |
| | | return success("无安装中的患者"); |
| | | |
| | | if (queueDOList.size() > 1) { |
| | | log.error("room {} bed {} have {} 安装中的患者", roomId, bedNo, queueDOList.size()); |
| | | return error(ECG_INNER_ERROR); |
| | | } |
| | | |
| | | QueueDO onStageItem = queueDOList.get(0); |
| | | CallSaveReqVO callSaveReqVO = BeanUtils.toBean(onStageItem, CallSaveReqVO.class); |
| | | callSaveReqVO.setId(null); |
| | | callSaveReqVO.setCallType(1); // 装机叫号 |
| | | callService.callAgain(callSaveReqVO); |
| | | |
| | | return success("操作成功"); |
| | | } |
| | | |
| | | @GetMapping("/get-to-be-checked-list") |
| | | @Operation(summary = "取 [常规检查] 或 [待领用] 患者列表") |
| | | @Parameter(name = "roomId", description = "诊室编号", required = true, example = "116") |