From d37e1f573a732c6138c53e3e15db616a671367ad Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期三, 09 四月 2025 10:54:05 +0800
Subject: [PATCH] 诊间屏 测试支持
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/RoomController.java | 4 ++--
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/room/RoomServiceImpl.java | 9 +++++++--
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/room/RoomService.java | 2 +-
3 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/RoomController.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/RoomController.java
index 85a6409..6f0b3de 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/RoomController.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/RoomController.java
@@ -88,9 +88,9 @@
@GetMapping("/get-room-by-ip")
@Operation(summary = "鑾峰緱璇婂鍜岃瘖鐤楀簥")
@PermitAll
- public CommonResult<RoomProfileRespVO> getRoomByIP(HttpServletRequest request) {
+ public CommonResult<RoomProfileRespVO> getRoomByIP(HttpServletRequest request, @RequestParam(value = "roomId", required = false) Long roomId) {
String reqIp = ServletUtil.getClientIP(request);
- RoomProfile roomProfile = roomService.getRoomByIP(reqIp);
+ RoomProfile roomProfile = roomService.getRoomByIP(reqIp, roomId);
return success(BeanUtils.toBean(roomProfile, RoomProfileRespVO.class));
}
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/room/RoomService.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/room/RoomService.java
index 4677d4d..b42fa27 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/room/RoomService.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/room/RoomService.java
@@ -47,7 +47,7 @@
*/
RoomDO getRoom(Integer id);
- RoomProfile getRoomByIP(String ip);
+ RoomProfile getRoomByIP(String ip, Long roomId);
/**
* 鑾峰緱璇婂鍜岃瘖鐤楀簥鍒嗛〉
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/room/RoomServiceImpl.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/room/RoomServiceImpl.java
index 15f6542..532d6de 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/room/RoomServiceImpl.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/room/RoomServiceImpl.java
@@ -78,8 +78,13 @@
}
@Override
- public RoomProfile getRoomByIP(String ip) {
- List<RoomDO> roomDOList = roomMapper.queueByIp(ip);
+ public RoomProfile getRoomByIP(String ip, Long roomId) {
+ List<RoomDO> roomDOList = null;
+ if (null != roomId) {
+ roomDOList = roomMapper.selectList(RoomDO::getRoomId, roomId);
+ } else {
+ roomDOList = roomMapper.queueByIp(ip);
+ }
RoomProfile roomProfile = new RoomProfile();
roomProfile.setBedNum( 0 );
--
Gitblit v1.9.3