| | |
| | | return success(BeanUtils.toBean(appointment, AppointmentRespVO.class)); |
| | | } |
| | | |
| | | @GetMapping("/get-by-patient") |
| | | @Operation(summary = "获得预约") |
| | | @Parameter(name = "id", description = "编号", required = true, example = "1024") |
| | | @PreAuthorize("@ss.hasPermission('ecg:appointment:query')") |
| | | public CommonResult<AppointmentRespVO> getAppointmentByPatient(@RequestParam("patId") String patId) { |
| | | AppointmentDO appointment = appointmentService.getAppointmentByPatId( patId ); |
| | | return success(BeanUtils.toBean(appointment, AppointmentRespVO.class)); |
| | | } |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "获得预约分页") |
| | | @PreAuthorize("@ss.hasPermission('ecg:appointment:query')") |
| | |
| | | queueSaveReqVO.setBookCheckType(appointment.getBookCheckType()); |
| | | queueSaveReqVO.setPassed((byte) 0); |
| | | queueSaveReqVO.setExpired((byte) 0); |
| | | queueSaveReqVO.setPatDetails( appointment.getPatDeptDesc() + "-" + appointment.getPatWardDesc() + "-" + appointment.getPatBedNo()); |
| | | queueService.queue(queueSaveReqVO); |
| | | } catch (DuplicateKeyException duplicateKeyException) { |
| | | return success("您已经在排队中了"); |