| | |
| | | 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)); |
| | | } |
| | | |
| | |
| | | @GetMapping(value = {"/reset-room"}) |
| | | @Operation(summary = "重置门诊室", description = "主要用于每天关闭工位") |
| | | public CommonResult<String> resetRoom() { |
| | | roomService.resetRoom(); |
| | | roomService.resetRoom(true); |
| | | return success("reset room ok"); |
| | | } |
| | | |
| | |
| | | return success(0); |
| | | } |
| | | |
| | | |
| | | } |