eight
2024-09-27 e8f1b8e0380d7c868f4e3218688796f595151724
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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.startBedDoctorOff(roomDO.getRoomId(), roomDO.getBedNo(), userId, userName);
    }
 
}