| package cn.lihu.jh.module.ecg.api.doctor; | 
|   | 
| import cn.lihu.jh.framework.common.exception.ErrorCode; | 
| import cn.lihu.jh.framework.common.exception.enums.GlobalErrorCodeConstants; | 
| import cn.lihu.jh.module.ecg.dal.dataobject.room.RoomDO; | 
| import cn.lihu.jh.module.ecg.service.queue.QueueService; | 
| import org.springframework.stereotype.Service; | 
|   | 
| import javax.annotation.Resource; | 
|   | 
| @Service | 
| public class DoctorApiImpl implements DoctorApi { | 
|   | 
|     @Resource | 
|     private QueueService queueService; | 
|   | 
|     @Override | 
|     public ErrorCode bedDoctorOff(Long userId, String userName) { | 
|         RoomDO roomDO = queueService.getDocRoomInfo(userId); | 
|         // 未入座, 跳过 | 
|         if (null == roomDO) { | 
|             return GlobalErrorCodeConstants.SUCCESS; | 
|         } | 
|   | 
|         return queueService.bedDoctorOff(roomDO.getRoomId(), roomDO.getBedNo(), userId, userName); | 
|     } | 
|   | 
| } |