eight
2024-09-24 91c60b946e0d2e8abc2c350598aa6d47ed28e83c
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java
@@ -6,9 +6,13 @@
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;
@@ -50,6 +54,9 @@
    @Resource
    private CallMapper callMapper;
    @Resource
    private DevRentMapper devRentMapper;
    AtomicInteger openingFlag = new AtomicInteger(0);
    AtomicInteger curSeqNum = new AtomicInteger(0);
@@ -583,11 +590,16 @@
     * @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();
    }