From 6a4f07eaef8e64602c454975b607e36ac1d51776 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期一, 31 三月 2025 11:15:39 +0800
Subject: [PATCH] 诊间屏类型 新增
---
jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/RoomCallingScreenEnum.java | 7 ++++---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/room/RoomServiceImpl.java | 14 ++++++++++++--
2 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/RoomCallingScreenEnum.java b/jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/RoomCallingScreenEnum.java
index 0262adb..ab654a8 100644
--- a/jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/RoomCallingScreenEnum.java
+++ b/jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/RoomCallingScreenEnum.java
@@ -15,9 +15,10 @@
@AllArgsConstructor
public enum RoomCallingScreenEnum implements IntArrayValuable {
NONE(0, "鏃犲彨鍙峰睆"),
- CHECK_ONLY(10, "妫�鏌ュ彨鍙峰睆"),
- INSTALL_ONLY(20, "瀹夎鍙彿灞�"),
- HYBRID(30, "娣峰悎鍙彿灞�"); // 妫�鏌� + 瀹夎
+ CHECK_ONLY(10,"妫�鏌ュ彨鍙峰睆"),
+ RECEIVE_ONLY(20,"棰嗙敤鍙彿灞�"),
+ INSTALL_ONLY(30,"瀹夎鍙彿灞�"),
+ HYBRID(40, "娣峰悎鍙彿灞�"); // 棰嗙敤 + 瀹夎
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(RoomCallingScreenEnum::getCallingScreenType).toArray();
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 68554a7..ead4005 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
@@ -90,10 +90,14 @@
roomProfile.setRoomName(roomDO.getRoomName());
roomProfile.setBedNum( roomProfile.getBedNum() + 1);
+ // 0 妫�鏌� 1 棰嗙敤 2 瑁呮満
+
// 璁$畻 璇婇棿灞忕被鍨�
if (roomProfile.getCallingScreenType() == RoomCallingScreenEnum.NONE.getCallingScreenType()) {
- if ( roomDO.getOpType() == 0 || roomDO.getOpType() == 1 ) {
- roomProfile.setCallingScreenType( RoomCallingScreenEnum.CHECK_ONLY.getCallingScreenType());
+ if ( roomDO.getOpType() == 0 ) {
+ roomProfile.setCallingScreenType(RoomCallingScreenEnum.CHECK_ONLY.getCallingScreenType());
+ } else if ( roomDO.getOpType() == 1 ) {
+ roomProfile.setCallingScreenType( RoomCallingScreenEnum.RECEIVE_ONLY.getCallingScreenType());
} else if ( roomDO.getOpType() == 2 ) {
roomProfile.setCallingScreenType( RoomCallingScreenEnum.INSTALL_ONLY.getCallingScreenType());
}
@@ -103,6 +107,12 @@
} else if ( roomDO.getOpType() == 2 ) {
roomProfile.setCallingScreenType( RoomCallingScreenEnum.HYBRID.getCallingScreenType());
}
+ } else if (roomProfile.getCallingScreenType() == RoomCallingScreenEnum.RECEIVE_ONLY.getCallingScreenType()) {
+ if ( roomDO.getOpType() == 0 || roomDO.getOpType() == 1 ) {
+ // do nothing
+ } else if ( roomDO.getOpType() == 2 ) {
+ roomProfile.setCallingScreenType( RoomCallingScreenEnum.HYBRID.getCallingScreenType());
+ }
} else if (roomProfile.getCallingScreenType() == RoomCallingScreenEnum.INSTALL_ONLY.getCallingScreenType()) {
if ( roomDO.getOpType() == 0 || roomDO.getOpType() == 1 ) {
roomProfile.setCallingScreenType( RoomCallingScreenEnum.HYBRID.getCallingScreenType());
--
Gitblit v1.9.3