From ce9b0cd02c3357834e9921c2f96c55d9816defa9 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期一, 14 四月 2025 13:43:01 +0800
Subject: [PATCH] 获取 诊室 安装队列

---
 jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/callingscreen/CallingScreenServiceImpl.java |   19 ++++++++++++++++---
 1 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/callingscreen/CallingScreenServiceImpl.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/callingscreen/CallingScreenServiceImpl.java
index b629f61..059880b 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/callingscreen/CallingScreenServiceImpl.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/callingscreen/CallingScreenServiceImpl.java
@@ -58,7 +58,16 @@
         PageResult<CheckTypeDO> pageResult = checkTypeMapper.selectPageForCallingScreen(checkTypePageReqVO);
 
         // 鏄剧ず鍒� 鍖呭惈鐨勬鏌ョ被鍨嬪垪琛�
-        Map<Integer, List<CheckTypeDO>> mapDisplayColName = pageResult.getList().stream().collect(Collectors.groupingBy(CheckTypeDO::getCallingColumn));
+        Map<Integer, List<CheckTypeDO>> mapDisplayColName = pageResult.getList().stream().
+            collect(
+                Collectors.groupingBy(
+                    CheckTypeDO::getCallingColumn,
+                    Collectors.collectingAndThen(
+                        Collectors.toList(),
+                        list -> list.stream().sorted(Comparator.comparing(CheckTypeDO::getId)).toList()
+                    )
+                )
+            );
 
         // 妫�鏌ョ被鍨� 瀵瑰簲鐨勬樉绀哄垪
         mapCheckTypeVsDisplayColumn = pageResult.getList().stream().collect(Collectors.toMap(CheckTypeDO::getValue, item -> item.getCallingColumn()));
@@ -66,7 +75,8 @@
         // 鏄剧ず鍒� 瀵瑰簲鐨勬鏌ョ被鍨嬪悕鍒楄〃
         Map<Integer, List<String>> _map = new HashMap<>();
         mapDisplayColName.keySet().forEach(key -> {
-            _map.put(key, mapDisplayColName.get(key).stream().map(item->item.getName()+item.getSeqPrefix()).toList());
+            List<String> displayColNameList = mapDisplayColName.get(key).stream().map(item->item.getName()+item.getSeqPrefix()).toList();
+            _map.put(key, displayColNameList);
         });
         return _map;
     }
@@ -165,6 +175,9 @@
         return queueDOList;
     }
 
+    /**
+     * 璇婇棿灞� 瀹夎鎮h�呭垪琛�
+     */
     @Override
     public List<QueueDO> getRoomInstallRelatedPatient(String ip, Long roomId) {
         if (null == roomId) {
@@ -183,7 +196,7 @@
         queueStatusList.add(QueueStatusEnum.AFFINITY_INSTALL.getStatus());
         queueStatusList.add(QueueStatusEnum.INSTALLING.getStatus());
         queueStatusList.add(QueueStatusEnum.RECALLED_INSTALL.getStatus());
-        List<QueueDO> queueDOList = queueMapper.getRoomQueueByStatus(roomId, queueStatusList);
+        List<QueueDO> queueDOList = queueMapper.getRoomInstallQueueByStatus(roomId, queueStatusList);
 
         //鎶� [浜插拰鐨刔 鎸埌涓婚」鍚庨潰
         List<QueueDO> affinityReceivedList = new ArrayList<>();

--
Gitblit v1.9.3