From bb767d9be029935ee73b4a8e67b370a153f39c74 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期六, 31 八月 2024 09:58:06 +0800
Subject: [PATCH] update
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/queueServiceImpl.java | 18 ++++++++----------
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/room/RoomMapper.java | 4 ++--
2 files changed, 10 insertions(+), 12 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 0941682..69b0852 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
@@ -85,11 +85,11 @@
@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=#{docId} and doc_name=#{docName}" +
+ "where room_id=#{roomId} and bed_no=#{bedNo} and doc_id=#{docId} " +
"and status in ( " +
" <foreach collection='curStatusList' separator=',' item='curStatus'>" +
" #{curStatus.status} " +
" </foreach> );" +
"</script>")
- Integer setBedDoctorOff(@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);
+ Integer setBedDoctorOff(@Param("roomId")Long roomId, @Param("bedNo")String bedNo, @Param("docId")Long docId, @Param("newStatus") BedStatusEnum newStatus, @Param("curStatusList") List<BedStatusEnum> curStatusList);
}
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 7435063..5c80db5 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
@@ -267,9 +267,6 @@
if (bedQueueBO.getQueueNum().get() >0)
return QUEUE_HAVE_PATIENT;
- mapBedVsQueue.remove(String.format("%09d%s", roomId, bedNo));
- priorityQueue.remove(bedQueueBO);
-
// DB update
List statusList = new ArrayList<BedStatusEnum>();
statusList.add(BedStatusEnum.OPENING);
@@ -280,6 +277,8 @@
if ( null==updateNum || 0 == updateNum )
return ROOM_INVALID_STATUS;
+ mapBedVsQueue.remove(String.format("%09d%s", roomId, bedNo));
+ priorityQueue.remove(bedQueueBO);
return SUCCESS;
}
@@ -306,9 +305,6 @@
if (null == bedQueueBO)
return QUEUE_BED_ABNORMAL;
- bedQueueBO.setStatusEnum(BedStatusEnum.PAUSE);
- priorityQueue.remove(bedQueueBO);
-
// DB update
List statusList = new ArrayList<BedStatusEnum>();
statusList.add(BedStatusEnum.DOCTOR_ON);
@@ -317,6 +313,8 @@
if ( null==updateNum || 0 == updateNum )
return ROOM_INVALID_STATUS;
+ bedQueueBO.setStatusEnum(BedStatusEnum.PAUSE);
+ priorityQueue.remove(bedQueueBO);
return SUCCESS;
}
@@ -326,9 +324,6 @@
if (null == bedQueueBO)
return QUEUE_BED_ABNORMAL;
- bedQueueBO.setStatusEnum(BedStatusEnum.DOCTOR_ON);
- priorityQueue.offer(bedQueueBO);
-
// DB update
List statusList = new ArrayList<BedStatusEnum>();
statusList.add(BedStatusEnum.PAUSE);
@@ -336,6 +331,9 @@
BedStatusEnum.DOCTOR_ON, statusList);
if ( null==updateNum || 0 == updateNum )
return ROOM_INVALID_STATUS;
+
+ bedQueueBO.setStatusEnum(BedStatusEnum.DOCTOR_ON);
+ priorityQueue.offer(bedQueueBO);
hurryup();
return SUCCESS;
@@ -369,7 +367,7 @@
// DB update
List statusList = new ArrayList<BedStatusEnum>();
statusList.add(BedStatusEnum.DOCTOR_ON);
- Integer updateNum = roomMapper.setBedDoctorOff(roomId, bedNo, docId, docName,
+ Integer updateNum = roomMapper.setBedDoctorOff(roomId, bedNo, docId,
BedStatusEnum.OPENING, statusList);
if ( null==updateNum || 0 == updateNum )
return ROOM_INVALID_STATUS;
--
Gitblit v1.9.3