From 7049a3710a5d38ac72303eae01704c1a82bc38bf Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期一, 02 九月 2024 16:01:03 +0800
Subject: [PATCH] 检测 当天预约

---
 jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/RoomController.java |   27 +++++++++++++++++++++++++++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/RoomController.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/RoomController.java
index 483972c..d5e8195 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/RoomController.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/RoomController.java
@@ -8,6 +8,7 @@
 import javax.validation.Valid;
 
 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.*;
 import org.springframework.validation.annotation.Validated;
 import org.springframework.security.access.prepost.PreAuthorize;
@@ -40,6 +41,9 @@
 
     @Resource
     private RoomService roomService;
+
+    @Resource
+    private QueueService queueService;
 
     @Resource
     private DeptApi deptApi;
@@ -160,4 +164,27 @@
         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("/start-biz")
+    @Operation(summary = "鎵嬪姩寮�璇�")
+    @PreAuthorize("@ss.hasPermission('ecg:room:setting')")
+    public CommonResult<Integer> startBiz() {
+        queueService.startBiz();
+        return success(0);
+    }
+
+    @GetMapping("/close-biz")
+    @Operation(summary = "鎵嬪姩闂瘖")
+    @PreAuthorize("@ss.hasPermission('ecg:room:setting')")
+    public CommonResult<Integer> stopBiz() {
+        queueService.closeBiz();
+        return success(0);
+    }
+
 }

--
Gitblit v1.9.3