From 0e0d74df77bdbc0d7ac886d187b3cfbf9b30718d Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期二, 27 八月 2024 14:33:23 +0800
Subject: [PATCH] update
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/BedQueueBO.java | 1 +
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/room/RoomMapper.java | 4 ++--
sql/mysql/jh.sql | 27 ++++++++++++++-------------
3 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/room/RoomMapper.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/room/RoomMapper.java
index 3cebdea..f62617b 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/room/RoomMapper.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/room/RoomMapper.java
@@ -67,9 +67,9 @@
Integer setBedDoctorOn(@Param("roomId")Long roomId, @Param("bedNo")String bedNo, @Param("docId")Long docId, @Param("docName")String docName, @Param("newStatus") BedStatusEnum newStatus, @Param("curStatusList") List<BedStatusEnum> curStatusList);
@Update("<script> " +
- "update lihu.clinic_room set status=#{newStatus.status}, doc_id=null, doc_name='' " +
+ "update lihu.clinic_room set status=#{newStatus.status}, doc_id=null, doc_name=null " +
"where room_id=#{roomId} and bed_no=#{bedNo} and doc_id=#{docId} and doc_name=#{docName}" +
- "and status=( " +
+ "and status in ( " +
" <foreach collection='curStatusList' separator=',' item='curStatus'>" +
" #{curStatus.status} " +
" </foreach> );" +
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/BedQueueBO.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/BedQueueBO.java
index 67d71d6..124c5dc 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/BedQueueBO.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/BedQueueBO.java
@@ -13,6 +13,7 @@
String roomName;
AtomicInteger queueNum = new AtomicInteger(0);
Integer maxQueueNum;
+ BedStatusEnum statusEnum;
@Override
public int compareTo(@NotNull BedQueueBO o) {
diff --git a/sql/mysql/jh.sql b/sql/mysql/jh.sql
index 70a6f3a..97f3bc7 100644
--- a/sql/mysql/jh.sql
+++ b/sql/mysql/jh.sql
@@ -76,19 +76,20 @@
-- ----------------------------
DROP TABLE IF EXISTS `clinic_room`;
CREATE TABLE `clinic_room` (
- `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
- `room_id` bigint NOT NULL COMMENT '璇婂缂栧彿',
- `room_name` varchar(10) NOT NULL COMMENT '璇婂鍚嶇О',
- `bed_no` varchar(10) NOT NULL COMMENT '璇婄枟搴婄紪鍙�',
- `status` int NOT NULL DEFAULT '0',
- `doc_id` bigint DEFAULT NULL,
- `doc_name` varchar(10) DEFAULT '',
- `creator` varchar(10) DEFAULT '' COMMENT '鍒涘缓鑰�',
- `create_time` datetime NOT NULL COMMENT '鍒涘缓鏃堕棿',
- `updater` varchar(10) DEFAULT '' COMMENT '鏇存柊鑰�',
- `update_time` datetime NOT NULL COMMENT '鏇存柊鏃堕棿',
- `deleted` bit(1) DEFAULT b'0' COMMENT '鍒犻櫎鏍囪',
- PRIMARY KEY (`id`)
+ `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
+ `room_id` bigint NOT NULL COMMENT '璇婂缂栧彿',
+ `room_name` varchar(10) NOT NULL COMMENT '璇婂鍚嶇О',
+ `bed_no` varchar(10) NOT NULL COMMENT '璇婄枟搴婄紪鍙�',
+ `status` int NOT NULL DEFAULT '0',
+ `doc_id` bigint DEFAULT NULL,
+ `doc_name` varchar(10) DEFAULT '',
+ `creator` varchar(10) DEFAULT '' COMMENT '鍒涘缓鑰�',
+ `create_time` datetime NOT NULL COMMENT '鍒涘缓鏃堕棿',
+ `updater` varchar(10) DEFAULT '' COMMENT '鏇存柊鑰�',
+ `update_time` datetime NOT NULL COMMENT '鏇存柊鏃堕棿',
+ `deleted` bit(1) DEFAULT b'0' COMMENT '鍒犻櫎鏍囪',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique-room-bed` (`room_id`,`bed_no`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='璇婂鍜岃瘖鐤楀簥琛�';
-- ----------------------------
--
Gitblit v1.9.3