From 66fd4f82f8567454d0b93cfe6e519801857d156a Mon Sep 17 00:00:00 2001
From: sinake <sinake1@qq.com>
Date: 星期四, 23 七月 2026 14:37:53 +0800
Subject: [PATCH] 新增停止

---
 jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/doctor/DoctorController.java |    5 ++++-
 jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java           |   20 ++++++++++++++++++++
 jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueService.java               |    7 +++++++
 jh-server/src/main/resources/application-stage.yaml                                                               |    4 ++--
 jh-server/src/main/resources/application.yaml                                                                     |    2 +-
 5 files changed, 34 insertions(+), 4 deletions(-)

diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/doctor/DoctorController.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/doctor/DoctorController.java
index a3a4fe6..142830f 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/doctor/DoctorController.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/doctor/DoctorController.java
@@ -7,6 +7,7 @@
 import cn.lihu.jh.module.ecg.controller.admin.call.vo.CallSaveReqVO;
 import cn.lihu.jh.module.ecg.controller.admin.queue.vo.PatientStatisticVO;
 import cn.lihu.jh.module.ecg.controller.admin.queue.vo.QueueRespVO;
+import cn.lihu.jh.module.ecg.controller.admin.queue.vo.QueueSaveReqVO;
 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.module.ecg.enums.QueueStatusEnum;
@@ -54,8 +55,10 @@
         String userNickname = SecurityFrameworkUtils.getLoginUserNickname();
 
         ErrorCode result = queueService.startBedDoctorPause(roomId, bedNo, userId, userNickname);
-        if (result.equals(SUCCESS))
+        if (result.equals(SUCCESS)) {
+            queueService.updateStop(roomId, bedNo);
             return success(SUCCESS.getCode());
+        }
 
         return error(result);
     }
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueService.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueService.java
index 0f5fcb1..83f7e59 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueService.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueService.java
@@ -40,6 +40,13 @@
     void updatequeue(@Valid QueueSaveReqVO updateReqVO);
 
     /**
+     * 鏇存柊鍋滆瘖
+     *
+     * @param
+     */
+    void updateStop(long roomId,String bedNo);
+
+    /**
      * 鍒犻櫎鎺掗槦
      *
      * @param id 缂栧彿
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 4926a0b..a7042f0 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
@@ -12,7 +12,9 @@
 import cn.lihu.jh.module.ecg.dal.mysql.devrent.DevRentMapper;
 import cn.lihu.jh.module.ecg.enums.DevRentStateEnum;
 import cn.lihu.jh.module.system.api.oauth2.OAuth2TokenApi;
+import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
 import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang3.ObjectUtils;
 import org.apache.cxf.common.util.CollectionUtils;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
@@ -86,6 +88,24 @@
         queueMapper.updateById(updateObj);
     }
 
+    public void updateStop(long roomId,String bedNo) {
+        // 鏍¢獙瀛樺湪
+       if(ObjectUtils.isNotEmpty(roomId)) {
+           QueueDO updateObj=new QueueDO();
+           updateObj.setStatus(40);
+           UpdateWrapper<QueueDO> wrapper=new UpdateWrapper<>();
+           wrapper.eq("room_id",roomId).eq("bed_no",bedNo).eq("status","30");
+           queueMapper.update(updateObj,wrapper);
+
+           QueueDO updateObj1=new QueueDO();
+           updateObj1.setRoomId(0l);
+           updateObj1.setBedNo(" ");
+           UpdateWrapper<QueueDO> wrapper1=new UpdateWrapper<>();
+           wrapper1.eq("room_id",roomId).eq("bed_no",bedNo).eq("status","20");
+           queueMapper.update(updateObj1,wrapper1);
+       }
+    }
+
     @Override
     public void deletequeue(Integer id) {
         // 鏍¢獙瀛樺湪
diff --git a/jh-server/src/main/resources/application-stage.yaml b/jh-server/src/main/resources/application-stage.yaml
index 3116ea8..49d5b6a 100644
--- a/jh-server/src/main/resources/application-stage.yaml
+++ b/jh-server/src/main/resources/application-stage.yaml
@@ -51,7 +51,7 @@
       primary: master
       datasource:
         master:
-          url: jdbc:mysql://116.62.18.175:6002/lihu?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 杩炴帴鐨勭ず渚�
+          url: jdbc:mysql://192.168.100.10:3306/lihu?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 杩炴帴鐨勭ず渚�
           #          url: jdbc:mysql://127.0.0.1:3306/ruoyi-vue-pro?useSSL=true&allowPublicKeyRetrieval=true&useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai # MySQL Connector/J 5.X 杩炴帴鐨勭ず渚�
           #          url: jdbc:postgresql://127.0.0.1:5432/ruoyi-vue-pro # PostgreSQL 杩炴帴鐨勭ず渚�
           #          url: jdbc:oracle:thin:@127.0.0.1:1521:xe # Oracle 杩炴帴鐨勭ず渚�
@@ -59,7 +59,7 @@
           #          url: jdbc:dm://127.0.0.1:5236?schema=RUOYI_VUE_PRO # DM 杩炴帴鐨勭ず渚�
           #          url: jdbc:kingbase8://127.0.0.1:54321/test  # 浜哄ぇ閲戜粨 KingbaseES 杩炴帴鐨勭ず渚�
           #          url: jdbc:postgresql://127.0.0.1:5432/postgres # OpenGauss 杩炴帴鐨勭ず渚�
-          username: hxsoft
+          username: smartor
           password: Smartor.2023
           #          username: sa # SQL Server 杩炴帴鐨勭ず渚�
           #          password: Jh@2024 # SQL Server 杩炴帴鐨勭ず渚�
diff --git a/jh-server/src/main/resources/application.yaml b/jh-server/src/main/resources/application.yaml
index 4da62e7..e01dff2 100644
--- a/jh-server/src/main/resources/application.yaml
+++ b/jh-server/src/main/resources/application.yaml
@@ -3,7 +3,7 @@
     name: jh-server
 
   profiles:
-    active: prod
+    active: stage
   #    active: stage
 
   main:

--
Gitblit v1.9.3