From 4b278300e8b3b1faabd5d080990cd3124f68612c Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期二, 26 十一月 2024 13:09:28 +0800
Subject: [PATCH] 会取下一个时段的序号

---
 jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceTxFunctions.java |   19 ++++++++++---------
 1 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceTxFunctions.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceTxFunctions.java
index 387bc26..5fcef0c 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceTxFunctions.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceTxFunctions.java
@@ -357,16 +357,16 @@
     }
 
     public void resetRoom(Boolean needCloseBed) {
-        // 韪㈠嚭鍦ㄥ骇鐨勫尰鐢�
-        List<BedStatusEnum> bedStatusEnumList = new ArrayList<BedStatusEnum>();
-        bedStatusEnumList.add(BedStatusEnum.DOCTOR_ON);
-        bedStatusEnumList.add(BedStatusEnum.PAUSE);
-        List<RoomDO> roomDOList = roomMapper.simpleRoomList(bedStatusEnumList);
-        List<Long> userIdList = roomDOList.stream().map(roomDO -> roomDO.getDocId()).toList();
-        oAuth2TokenApi.tick(userIdList);
-
-        // 鍏抽棴鎵�鏈夊伐浣�
         if (needCloseBed) {
+            // 韪㈠嚭鍦ㄥ骇鐨勫尰鐢�
+            List<BedStatusEnum> bedStatusEnumList = new ArrayList<BedStatusEnum>();
+            bedStatusEnumList.add(BedStatusEnum.DOCTOR_ON);
+            bedStatusEnumList.add(BedStatusEnum.PAUSE);
+            List<RoomDO> roomDOList = roomMapper.simpleRoomList(bedStatusEnumList);
+            List<Long> userIdList = roomDOList.stream().map(roomDO -> roomDO.getDocId()).toList();
+            oAuth2TokenApi.tick(userIdList);
+
+            // 鎵�鏈夊伐浣嶇姸鎬� => 鍏抽棴
             Integer ret = roomMapper.resetRoom(BedStatusEnum.CLOSED.getStatus());
         }
     }
@@ -514,6 +514,7 @@
         for (int i = 0; i < affinityItems.size(); i++) {
             QueueDO queueItem = affinityItems.get(i);
             queueItem.setStatus(QueueStatusEnum.AFFINITY_WAITING.getStatus()); //鏀瑰彉 鎺掗槦鐘舵��
+            queueItem.setAffinityItem( 1 );
             queueItem.setRoomId(preemptQueueItem.getRoomId());
             queueItem.setRoomName(preemptQueueItem.getRoomName());
             queueItem.setBedNo(preemptQueueItem.getBedNo());

--
Gitblit v1.9.3