| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | |
| | | import cn.lihu.jh.module.ecg.controller.admin.room.vo.MonitorInfoVO; |
| | | import cn.lihu.jh.module.ecg.dal.dataobject.room.RoomDO; |
| | | import cn.lihu.jh.module.ecg.service.queue.QueueService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | |
| | | @Resource |
| | | private RoomService roomService; |
| | | |
| | | @Resource |
| | | private QueueService queueService; |
| | | |
| | | @Resource |
| | | private DeptApi deptApi; |
| | |
| | | Map<String, List<RoomRespVO>> map = list2.stream().collect(Collectors.groupingBy(RoomRespVO::getRoomName)); |
| | | return success(map); |
| | | } |
| | | |
| | | @GetMapping(value = {"/reset-room"}) |
| | | @Operation(summary = "重置门诊室", description = "主要用于每天关闭工位") |
| | | public CommonResult<String> resetRoom() { |
| | | roomService.resetRoom(); |
| | | return success("reset room ok"); |
| | | } |
| | | |
| | | @GetMapping(value = {"/monitor"}) |
| | | @Operation(summary = "监控状态获取", description = "监控状态获取 监控用") |
| | | public CommonResult<MonitorInfoVO> getMonitorInfo() { |
| | | MonitorInfoVO monitorInfoVO = roomService.getMonitorInfo(); |
| | | return success( monitorInfoVO ); |
| | | } |
| | | |
| | | @GetMapping("/start-biz") |
| | | @Operation(summary = "手动开诊") |
| | | @PreAuthorize("@ss.hasPermission('ecg:room:setting')") |
| | | public CommonResult<Integer> startBiz() { |
| | | queueService.startBiz(); |
| | | return success(0); |
| | | } |
| | | |
| | | @GetMapping("/close-biz") |
| | | @Operation(summary = "手动闭诊") |
| | | @PreAuthorize("@ss.hasPermission('ecg:room:setting')") |
| | | public CommonResult<Integer> stopBiz() { |
| | | queueService.closeBiz(); |
| | | return success(0); |
| | | } |
| | | |
| | | } |