| | |
| | | import java.io.IOException; |
| | | import java.util.stream.Collectors; |
| | | import javax.annotation.Resource; |
| | | import javax.annotation.security.PermitAll; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.Valid; |
| | | |
| | | import cn.hutool.extra.servlet.ServletUtil; |
| | | import cn.lihu.jh.module.ecg.controller.admin.room.vo.MonitorInfoVO; |
| | | import cn.lihu.jh.module.ecg.dal.dataobject.queue.QueueDO; |
| | | import cn.lihu.jh.module.ecg.dal.dataobject.room.RoomDO; |
| | | import cn.lihu.jh.module.ecg.service.queue.QueueService; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | |
| | | @PreAuthorize("@ss.hasPermission('clinic:room:query')") |
| | | public CommonResult<RoomRespVO> getRoom(@RequestParam("id") Integer id) { |
| | | RoomDO room = roomService.getRoom(id); |
| | | return success(BeanUtils.toBean(room, RoomRespVO.class)); |
| | | } |
| | | |
| | | @GetMapping("/get-room-by-ip") |
| | | @Operation(summary = "获得诊室和诊疗床") |
| | | @PermitAll |
| | | public CommonResult<RoomRespVO> getRoomByIP(HttpServletRequest request) { |
| | | String reqIp = ServletUtil.getClientIP(request); |
| | | RoomDO room = roomService.getRoomByIP(reqIp); |
| | | return success(BeanUtils.toBean(room, RoomRespVO.class)); |
| | | } |
| | | |
| | |
| | | return success("reset room ok"); |
| | | } |
| | | |
| | | @GetMapping(value = {"/get-opening-flag"}) |
| | | @Operation(summary = "当前开诊状态获取", description = "当前开诊状态获取 监控用") |
| | | public CommonResult<Integer> getOpeningFlag() { |
| | | Integer openingFlag = roomService.getOpeningFlag(); |
| | | return success( openingFlag ); |
| | | @GetMapping(value = {"/monitor"}) |
| | | @Operation(summary = "监控状态获取", description = "监控状态获取 监控用") |
| | | public CommonResult<MonitorInfoVO> getMonitorInfo() { |
| | | MonitorInfoVO monitorInfoVO = roomService.getMonitorInfo(); |
| | | return success( monitorInfoVO ); |
| | | } |
| | | |
| | | @GetMapping("/start-biz") |
| | |
| | | return success(0); |
| | | } |
| | | |
| | | |
| | | } |