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; } } jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/room/RoomMapper.java
@@ -62,8 +62,8 @@ @Select("SELECT * FROM lihu.clinic_room where room_id=#{roomId} and bed_no=#{bedNo} and doc_id=#{docId}") RoomDO getRoomByRoomBedDoc(@Param("roomId")Long roomId, @Param("bedNo")String bedNo, @Param("docId")Long docId); @Select("SELECT * FROM lihu.clinic_room where doc_id=#{docId} limit 1") RoomDO getRoomByDocId(@Param("docId")Long docId); @Select("SELECT * FROM lihu.clinic_room where doc_id=#{docId}") List<RoomDO> getRoomByDocId(@Param("docId")Long docId); @Update("<script> " + "update lihu.clinic_room set status=#{newStatus.status} " + jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueService.java
@@ -139,7 +139,7 @@ Integer patientJump(String patId, Byte jumped ); RoomDO getDocRoomInfo(Long docId); List<RoomDO> getDocRoomInfo(Long docId); List<QueueDO> getToBeCheckedPatient(Long roomId, String bedNo); jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java
@@ -579,7 +579,7 @@ } @Override public RoomDO getDocRoomInfo(Long docId) { public List<RoomDO> getDocRoomInfo(Long docId) { return roomMapper.getRoomByDocId(docId); }