eight
2024-09-02 347f8c9cf8c75e420125715e0b08fcf4f6978eeb
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/queueServiceImpl.java
@@ -1,23 +1,16 @@
package cn.lihu.jh.module.ecg.service.queue;
import java.time.LocalTime;
import java.util.*;
import java.util.concurrent.*;
import java.util.concurrent.atomic.AtomicInteger;
import javax.annotation.Resource;
import cn.lihu.jh.framework.common.exception.enums.GlobalErrorCodeConstants;
import cn.lihu.jh.module.ecg.Utils;
import cn.lihu.jh.module.ecg.config.DynamicSchedulingConfig;
import cn.lihu.jh.module.ecg.dal.dataobject.room.RoomDO;
import cn.lihu.jh.module.ecg.service.room.RoomService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.config.CronTask;
import org.springframework.scheduling.config.ScheduledTask;
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
import cn.lihu.jh.framework.common.exception.enums.GlobalErrorCodeConstants;
import cn.lihu.jh.module.ecg.dal.dataobject.room.RoomDO;
import cn.lihu.jh.framework.common.exception.ErrorCode;
import cn.lihu.jh.framework.common.pojo.CommonResult;
import cn.lihu.jh.module.ecg.controller.admin.room.vo.RoomRespVO;
@@ -26,19 +19,15 @@
import cn.lihu.jh.module.ecg.dal.mysql.room.RoomMapper;
import cn.lihu.jh.module.ecg.enums.BedStatusEnum;
import cn.lihu.jh.module.ecg.enums.QueueStatusEnum;
import cn.lihu.jh.module.infra.api.config.ConfigApi;
import cn.lihu.jh.module.ecg.controller.admin.queue.vo.*;
import cn.lihu.jh.module.ecg.dal.dataobject.queue.QueueDO;
import cn.lihu.jh.framework.common.pojo.PageResult;
import cn.lihu.jh.framework.common.util.object.BeanUtils;
import cn.lihu.jh.module.ecg.dal.mysql.queue.queueMapper;
import static cn.lihu.jh.module.ecg.enums.ErrorCodeConstants.*;
import static cn.lihu.jh.framework.common.exception.util.ServiceExceptionUtil.exception;
import static cn.lihu.jh.framework.common.pojo.CommonResult.error;
import static cn.lihu.jh.framework.common.pojo.CommonResult.success;
import static cn.lihu.jh.module.ecg.Constants.ECG_OPENING_TIME_KEY;
import static cn.lihu.jh.module.ecg.Constants.ECG_ROOM_RESET_TIME_KEY;
import static cn.lihu.jh.module.ecg.enums.ErrorCodeConstants.*;
/**
 * 排队 Service 实现类
@@ -233,9 +222,15 @@
        singleThreadExecutor.execute( () -> {
            bedReload();
            hurryup();
            monitorInfo();
        });
    }
    @Override
    public Integer getOpeningFlag() {
        return openingFlag.get();
    }
    /**
     * 已关闭 或者 关闭中,可以开通工位
     * @param roomId