| | |
| | | import cn.lihu.jh.framework.common.pojo.PageResult; |
| | | import cn.lihu.jh.framework.common.util.object.BeanUtils; |
| | | import cn.lihu.jh.framework.excel.core.util.ExcelUtils; |
| | | import cn.lihu.jh.module.ecg.controller.admin.queue.vo.PatientStatisticVO; |
| | | import cn.lihu.jh.module.ecg.controller.admin.queue.vo.QueuePageReqVO; |
| | | import cn.lihu.jh.module.ecg.controller.admin.queue.vo.QueueRespVO; |
| | | import cn.lihu.jh.module.ecg.controller.admin.queue.vo.QueueSaveReqVO; |
| | |
| | | @Resource |
| | | private QueueService queueService; |
| | | |
| | | @GetMapping("/nextpatient") |
| | | @Operation(summary = "下一位患者") |
| | | @GetMapping("/finish-next-patient") |
| | | @Operation(summary = "完成、下一位患者") |
| | | @Parameter(name = "roomId", description = "诊室编号", required = true, example = "116") |
| | | @Parameter(name = "bedNo", description = "工位编号", required = true, example = "B2") |
| | | @PreAuthorize("@ss.hasPermission('ecg:doctor:nextpatient')") |
| | | public CommonResult<List<QueueRespVO>> nextPatient( |
| | | public CommonResult<List<QueueRespVO>> finishNextPatient( |
| | | @RequestParam("roomId") Long roomId, |
| | | @RequestParam("bedNo") String bedNo) |
| | | { |
| | | queueService.nextPatient(roomId, bedNo); |
| | | queueService.finishNextPatient(roomId, bedNo); |
| | | |
| | | List<Byte> queueStatusList = new ArrayList<>(); |
| | | queueStatusList.add(QueueStatusEnum.READY.getStatus()); |
| | |
| | | return success(BeanUtils.toBean(queueDOList, QueueRespVO.class)); |
| | | } |
| | | |
| | | @GetMapping("/page") |
| | | @Operation(summary = "获得排队分页") |
| | | @PreAuthorize("@ss.hasPermission('ecg:queue:query')") |
| | | public CommonResult<PageResult<QueueRespVO>> getqueuePage(@Valid QueuePageReqVO pageReqVO) { |
| | | PageResult<QueueDO> pageResult = queueService.getqueuePage(pageReqVO); |
| | | return success(BeanUtils.toBean(pageResult, QueueRespVO.class)); |
| | | @GetMapping("/pass-next-patient") |
| | | @Operation(summary = "过号、下一位患者") |
| | | @Parameter(name = "roomId", description = "诊室编号", required = true, example = "116") |
| | | @Parameter(name = "bedNo", description = "工位编号", required = true, example = "B2") |
| | | @PreAuthorize("@ss.hasPermission('ecg:doctor:nextpatient')") |
| | | public CommonResult<List<QueueRespVO>> passNextPatient( |
| | | @RequestParam("roomId") Long roomId, |
| | | @RequestParam("bedNo") String bedNo) |
| | | { |
| | | queueService.passNextPatient(roomId, bedNo); |
| | | |
| | | List<Byte> queueStatusList = new ArrayList<>(); |
| | | queueStatusList.add(QueueStatusEnum.READY.getStatus()); |
| | | queueStatusList.add(QueueStatusEnum.ONSTAGE.getStatus()); |
| | | queueStatusList.add(QueueStatusEnum.PASSED.getStatus()); |
| | | List<QueueDO> queueDOList = queueService.getDoctorQueueByStatus(roomId, bedNo, queueStatusList); |
| | | return success(BeanUtils.toBean(queueDOList, QueueRespVO.class)); |
| | | } |
| | | |
| | | @GetMapping("/opening-setting") |
| | | @Operation(summary = "开诊设置") |
| | | @PreAuthorize("@ss.hasPermission('ecg:queue:setting')") |
| | | public CommonResult<Integer> openingSetting() { |
| | | queueService.initQueue(); |
| | | queueService.hurryup(); |
| | | return success(0); |
| | | @GetMapping("/get-patient-list") |
| | | @Operation(summary = "取患者列表") |
| | | @Parameter(name = "roomId", description = "诊室编号", required = true, example = "116") |
| | | @Parameter(name = "bedNo", description = "工位编号", required = true, example = "B2") |
| | | @PreAuthorize("@ss.hasPermission('ecg:doctor:patientlist')") |
| | | public CommonResult<List<QueueRespVO>> getPatientList( |
| | | @RequestParam("roomId") Long roomId, |
| | | @RequestParam("bedNo") String bedNo) |
| | | { |
| | | List<Byte> queueStatusList = new ArrayList<>(); |
| | | queueStatusList.add(QueueStatusEnum.READY.getStatus()); |
| | | queueStatusList.add(QueueStatusEnum.ONSTAGE.getStatus()); |
| | | queueStatusList.add(QueueStatusEnum.PASSED.getStatus()); |
| | | List<QueueDO> queueDOList = queueService.getDoctorQueueByStatus(roomId, bedNo, queueStatusList); |
| | | return success(BeanUtils.toBean(queueDOList, QueueRespVO.class)); |
| | | } |
| | | } |
| | | |
| | | @GetMapping("/get-patient-statistic") |
| | | @Operation(summary = "取患者统计") |
| | | @Parameter(name = "roomId", description = "诊室编号", required = true, example = "116") |
| | | @Parameter(name = "bedNo", description = "工位编号", required = true, example = "B2") |
| | | @PreAuthorize("@ss.hasPermission('ecg:doctor:patientstatistic')") |
| | | public CommonResult<PatientStatisticVO> getPatientStatistic( |
| | | @RequestParam("roomId") Long roomId, |
| | | @RequestParam("bedNo") String bedNo) |
| | | { |
| | | PatientStatisticVO patientStatisticVO = queueService.getPatientStatistic(roomId, bedNo); |
| | | return success(patientStatisticVO); |
| | | } |
| | | } |