From a47e5cd452a405463c03d1d8c4f97884123a46b2 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期三, 04 九月 2024 11:41:33 +0800
Subject: [PATCH] update
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/RoomController.java | 36 ++++++++++++++++++++++++++++++++++++
1 files changed, 36 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 f23ac57..f511f68 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
@@ -7,7 +7,9 @@
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.*;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
@@ -40,6 +42,9 @@
@Resource
private RoomService roomService;
+
+ @Resource
+ private QueueService queueService;
@Resource
private DeptApi deptApi;
@@ -152,4 +157,35 @@
Map<String, List<RoomRespVO>> map = list2.stream().collect(Collectors.groupingBy(RoomRespVO::getRoomName));
return success(map);
}
+
+ @GetMapping(value = {"/reset-room"})
+ @Operation(summary = "閲嶇疆闂ㄨ瘖瀹�", description = "涓昏鐢ㄤ簬姣忓ぉ鍏抽棴宸ヤ綅")
+ public CommonResult<String> resetRoom() {
+ roomService.resetRoom();
+ return success("reset room ok");
+ }
+
+ @GetMapping(value = {"/monitor"})
+ @Operation(summary = "鐩戞帶鐘舵�佽幏鍙�", description = "鐩戞帶鐘舵�佽幏鍙� 鐩戞帶鐢�")
+ public CommonResult<MonitorInfoVO> getMonitorInfo() {
+ MonitorInfoVO monitorInfoVO = roomService.getMonitorInfo();
+ return success( monitorInfoVO );
+ }
+
+ @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