eight
2024-09-02 1aecee3a44782899685bd2a098a16533f7a20846
monitor info function
已添加1个文件
已修改5个文件
44 ■■■■■ 文件已修改
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/RoomController.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/vo/MonitorInfoVO.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/queueService.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/queueServiceImpl.java 9 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/room/RoomService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/room/RoomServiceImpl.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/RoomController.java
@@ -7,6 +7,7 @@
import javax.servlet.http.HttpServletResponse;
import javax.validation.Valid;
import cn.lihu.jh.module.ecg.controller.admin.room.vo.MonitorInfoVO;
import cn.lihu.jh.module.ecg.dal.dataobject.room.RoomDO;
import cn.lihu.jh.module.ecg.service.queue.QueueService;
import org.springframework.web.bind.annotation.*;
@@ -164,11 +165,11 @@
        return success("reset room ok");
    }
    @GetMapping(value = {"/get-opening-flag"})
    @Operation(summary = "当前开诊状态获取", description = "当前开诊状态获取 ç›‘控用")
    public CommonResult<Integer> getOpeningFlag() {
        Integer openingFlag = roomService.getOpeningFlag();
        return success( openingFlag );
    @GetMapping(value = {"/monitor"})
    @Operation(summary = "监控状态获取", description = "监控状态获取 ç›‘控用")
    public CommonResult<MonitorInfoVO> getMonitorInfo() {
        MonitorInfoVO monitorInfoVO = roomService.getMonitorInfo();
        return success( monitorInfoVO );
    }
    @GetMapping("/start-biz")
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/vo/MonitorInfoVO.java
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,10 @@
package cn.lihu.jh.module.ecg.controller.admin.room.vo;
import lombok.Data;
@Data
public class MonitorInfoVO {
    private Integer queueNum;
    private Integer activeQueueNum;
    private Integer openingFlag;
}
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/queueService.java
@@ -1,16 +1,15 @@
package cn.lihu.jh.module.ecg.service.queue;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;
import cn.lihu.jh.framework.common.exception.ErrorCode;
import cn.lihu.jh.framework.common.pojo.CommonResult;
import cn.lihu.jh.module.ecg.controller.admin.queue.vo.*;
import cn.lihu.jh.module.ecg.controller.admin.room.vo.MonitorInfoVO;
import cn.lihu.jh.module.ecg.controller.admin.room.vo.RoomRespVO;
import cn.lihu.jh.module.ecg.dal.dataobject.queue.QueueDO;
import cn.lihu.jh.framework.common.pojo.PageResult;
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
/**
 * æŽ’队 Service æŽ¥å£
@@ -51,7 +50,7 @@
     */
    void startHurryUp();
    void startBedReload();
    Integer getOpeningFlag();
    MonitorInfoVO getMonitorInfo();
    ErrorCode startBedOpen(Long roomId, String bedNo);
    ErrorCode startBedClose(Long roomId, String bedNo);
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/queueServiceImpl.java
@@ -5,6 +5,7 @@
import java.util.concurrent.atomic.AtomicInteger;
import javax.annotation.Resource;
import cn.lihu.jh.module.ecg.controller.admin.room.vo.MonitorInfoVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
@@ -227,8 +228,12 @@
    }
    @Override
    public Integer getOpeningFlag() {
        return openingFlag.get();
    public MonitorInfoVO getMonitorInfo() {
        MonitorInfoVO monitorInfoVO = new MonitorInfoVO();
        monitorInfoVO.setOpeningFlag( openingFlag.get() );
        monitorInfoVO.setQueueNum( mapBedVsQueue.size() );
        monitorInfoVO.setActiveQueueNum( priorityQueue.size() );
        return monitorInfoVO;
    }
    /**
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/room/RoomService.java
@@ -3,6 +3,7 @@
import java.util.*;
import javax.validation.Valid;
import cn.lihu.jh.framework.common.pojo.PageResult;
import cn.lihu.jh.module.ecg.controller.admin.room.vo.MonitorInfoVO;
import cn.lihu.jh.module.ecg.controller.admin.room.vo.RoomPageReqVO;
import cn.lihu.jh.module.ecg.controller.admin.room.vo.RoomSaveReqVO;
import cn.lihu.jh.module.ecg.dal.dataobject.room.RoomDO;
@@ -60,6 +61,6 @@
    void resetRoom();
    Integer getOpeningFlag();
    MonitorInfoVO getMonitorInfo();
}
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/room/RoomServiceImpl.java
@@ -4,7 +4,7 @@
import javax.annotation.Resource;
import cn.lihu.jh.framework.common.pojo.PageResult;
import cn.lihu.jh.module.ecg.controller.admin.room.vo.RoomRespVO;
import cn.lihu.jh.module.ecg.controller.admin.room.vo.MonitorInfoVO;
import cn.lihu.jh.module.ecg.dal.dataobject.room.RoomDO;
import cn.lihu.jh.module.ecg.service.queue.QueueService;
import cn.lihu.jh.module.system.api.oauth2.OAuth2TokenApi;
@@ -112,7 +112,7 @@
    }
    @Override
    public Integer getOpeningFlag() {
        return queueService.getOpeningFlag();
    public MonitorInfoVO getMonitorInfo() {
        return queueService.getMonitorInfo();
    }
}