From f5d724112f59af209442b3ca8e932b37f05cebb7 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期一, 14 四月 2025 09:21:22 +0800
Subject: [PATCH] 大屏 显示列内 排序
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/callingscreen/CallingScreenServiceImpl.java | 14 ++++++++++++--
1 files changed, 12 insertions(+), 2 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..3f8911a 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;
}
--
Gitblit v1.9.3