From 4abbab0da3fe61b237795e5e9a8d10ba5db4c706 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期三, 28 八月 2024 11:37:43 +0800
Subject: [PATCH] update

---
 jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/queueController.java |   21 ++++++++++++++++++---
 jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/queueServiceImpl.java         |    4 ++--
 2 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/queueController.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/queueController.java
index d1fad05..c145fe5 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/queueController.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/queueController.java
@@ -130,9 +130,7 @@
     @PreAuthorize("@ss.hasPermission('ecg:queue:bedcontrol')")
     public CommonResult<Integer> bedPause(
         @RequestParam("roomId") Long roomId,
-        @RequestParam("bedNo") String bedNo,
-        @RequestParam("docId") Long docId,
-        @RequestParam("docName") String docName)
+        @RequestParam("bedNo") String bedNo)
     {
         Long userId = SecurityFrameworkUtils.getLoginUserId();
         String userNickname = SecurityFrameworkUtils.getLoginUserNickname();
@@ -144,6 +142,23 @@
         return error(result);
     }
 
+    @GetMapping("/bed-doctor-resume")
+    @Operation(summary = "鍖荤敓鏆傚仠")
+    @PreAuthorize("@ss.hasPermission('ecg:queue:bedcontrol')")
+    public CommonResult<Integer> bedResume(
+        @RequestParam("roomId") Long roomId,
+        @RequestParam("bedNo") String bedNo)
+    {
+        Long userId = SecurityFrameworkUtils.getLoginUserId();
+        String userNickname = SecurityFrameworkUtils.getLoginUserNickname();
+
+        ErrorCode result = queueService.startBedDoctorResume(roomId, bedNo, userId, userNickname);
+        if (result.equals(SUCCESS))
+            return success(0);
+
+        return error(result);
+    }
+
     @GetMapping("/bed-doctor-on")
     @Operation(summary = "鍖荤敓鍏ュ骇")
     @PreAuthorize("@ss.hasPermission('ecg:queue:bedcontrol')")
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/queueServiceImpl.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/queueServiceImpl.java
index b63807c..a987611 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/queueServiceImpl.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/queueServiceImpl.java
@@ -278,9 +278,9 @@
 
         // DB update
         List statusList = new ArrayList<BedStatusEnum>();
-        statusList.add(BedStatusEnum.DOCTOR_ON);
+        statusList.add(BedStatusEnum.PAUSE);
         Integer updateNum = roomMapper.setBedDoctorPause(roomId, bedNo, docId, docName,
-                BedStatusEnum.PAUSE, statusList);
+                BedStatusEnum.DOCTOR_ON, statusList);
         if ( null==updateNum || 0 == updateNum )
             return ROOM_INVALID_STATUS;
 

--
Gitblit v1.9.3