eight
2025-03-31 6a4f07eaef8e64602c454975b607e36ac1d51776
诊间屏类型 新增
已修改2个文件
21 ■■■■ 文件已修改
jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/RoomCallingScreenEnum.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/room/RoomServiceImpl.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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();
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());