From 7105cd2dd94171feb6fa969f71f8f9ba491b0729 Mon Sep 17 00:00:00 2001 From: eight <641137800@qq.com> Date: 星期一, 02 十二月 2024 14:25:08 +0800 Subject: [PATCH] 登出时退出所有的工位 --- jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/api/doctor/DoctorApiImpl.java | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/api/doctor/DoctorApiImpl.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/api/doctor/DoctorApiImpl.java index 4bb24db..bfd0245 100644 --- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/api/doctor/DoctorApiImpl.java +++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/api/doctor/DoctorApiImpl.java @@ -7,6 +7,7 @@ import org.springframework.stereotype.Service; import javax.annotation.Resource; +import java.util.List; @Service public class DoctorApiImpl implements DoctorApi { @@ -16,13 +17,14 @@ @Override public ErrorCode bedDoctorOff(Long userId, String userName) { - RoomDO roomDO = queueService.getDocRoomInfo(userId); + List<RoomDO> roomDOList = queueService.getDocRoomInfo(userId); // 鏈叆搴�, 璺宠繃 - if (null == roomDO) { + if (roomDOList.isEmpty()) { return GlobalErrorCodeConstants.SUCCESS; } - return queueService.startBedDoctorOff(roomDO.getRoomId(), roomDO.getBedNo(), userId, userName); + roomDOList.forEach( bedItem -> queueService.startBedDoctorOff(bedItem.getRoomId(), bedItem.getBedNo(), userId, userName)); + return GlobalErrorCodeConstants.SUCCESS; } } -- Gitblit v1.9.3