From 91a6d065f948fd9f47ee43616c509d286e80d0d6 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期日, 01 九月 2024 19:35:44 +0800
Subject: [PATCH] update
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/room/RoomMapper.java | 8 ++++----
1 files changed, 4 insertions(+), 4 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 3863bb2..65326de 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
@@ -54,8 +54,8 @@
RoomDO getRoom(@Param("roomId")Long roomId, @Param("bedNo")String bedNo, @Param("docId")Long docId);
@Update("<script> " +
- "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 = null " +
+ "update lihu.clinic_room set status=#{newStatus.status} " +
+ " where room_id=#{roomId} and bed_no=#{bedNo} and isNull(doc_id) " +
" and status in ( " +
" <foreach collection='curStatusList' separator=',' item='curStatus'>" +
" #{curStatus.status} " +
@@ -65,7 +65,7 @@
@Update("<script> " +
"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 != null " +
+ " where room_id=#{roomId} and bed_no=#{bedNo} and isNull(doc_id) " +
" and status in ( " +
" <foreach collection='curStatusList' separator=',' item='curStatus'>" +
" #{curStatus.status} " +
@@ -85,7 +85,7 @@
@Update("<script> " +
"update lihu.clinic_room set status=#{newStatus.status}, doc_id=#{docId}, doc_name=#{docName} " +
- "where room_id=#{roomId} and bed_no=#{bedNo} " +
+ "where room_id=#{roomId} and bed_no=#{bedNo} and isNull(doc_id)" +
"and status in ( " +
" <foreach collection='curStatusList' separator=',' item='curStatus'>" +
" #{curStatus.status} " +
--
Gitblit v1.9.3