| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import cn.lihu.jh.module.ecg.controller.admin.room.vo.MonitorInfoVO; |
| | | import cn.lihu.jh.module.ecg.dal.dataobject.devrent.DevRentDO; |
| | | import cn.lihu.jh.module.ecg.dal.mysql.call.CallMapper; |
| | | import cn.lihu.jh.module.ecg.dal.mysql.devrent.DevRentMapper; |
| | | import cn.lihu.jh.module.ecg.enums.DevRentStateEnum; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | |
| | |
| | | |
| | | @Resource |
| | | private CallMapper callMapper; |
| | | |
| | | @Resource |
| | | private DevRentMapper devRentMapper; |
| | | |
| | | AtomicInteger openingFlag = new AtomicInteger(0); |
| | | AtomicInteger curSeqNum = new AtomicInteger(0); |
| | |
| | | * @param queueSaveReqVO |
| | | */ |
| | | @Override |
| | | @Transactional |
| | | public void queue(QueueSaveReqVO queueSaveReqVO) { |
| | | queueSaveReqVO.setStatus(QueueStatusEnum.WAITING.getStatus()); //排队中 |
| | | QueueDO queue = BeanUtils.toBean(queueSaveReqVO, QueueDO.class); |
| | | queueMapper.insert(queue); |
| | | |
| | | DevRentDO devRent = BeanUtils.toBean(queueSaveReqVO, DevRentDO.class); |
| | | devRent.setState( DevRentStateEnum.FREE.getState() ); |
| | | devRentMapper.insert(devRent); |
| | | |
| | | startHurryUp(); |
| | | } |
| | |
| | | + " opening " + openingFlag.get()); |
| | | } |
| | | |
| | | @Override |
| | | public RoomDO getDocRoomInfo(Long docId) { |
| | | return roomMapper.getRoomByDocId(docId); |
| | | } |
| | | |
| | | } |