From cb2507b0fddb4aeda36ea21addf77459d32d9996 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期二, 08 四月 2025 12:10:01 +0800
Subject: [PATCH] 大屏 亲和项 处理
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/callingscreen/CallingScreenController.java | 17 ++++++-----------
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/callingscreen/CallingScreenServiceImpl.java | 21 +++++++++++++++++++++
2 files changed, 27 insertions(+), 11 deletions(-)
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/callingscreen/CallingScreenController.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/callingscreen/CallingScreenController.java
index 6e8abc4..44c62b3 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/callingscreen/CallingScreenController.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/callingscreen/CallingScreenController.java
@@ -43,21 +43,16 @@
@GetMapping("/big-screen-data")
@Operation(summary = "澶у睆鍙彿鏁版嵁")
@PermitAll
- public CommonResult<Map<Integer, Map<Integer, List<ScreenQueueRespVO>>>> callingData()
+ public CommonResult<Map<Integer, List<ScreenQueueRespVO>>> callingData()
{
- Map<Integer, Map<Integer, List<QueueDO>>> map = callingScreenService.getBigScreenPatient();
+ Map<Integer, List<QueueDO>> map = callingScreenService.getBigScreenPatient();
- Map<Integer, Map<Integer, List<ScreenQueueRespVO>>> mapVO = new HashMap<>();
+ Map<Integer, List<ScreenQueueRespVO>> mapVO = new HashMap<>();
map.keySet().forEach( displayCol -> {
//log.info("dispayCol: " + displayCol);
- Map<Integer, List<QueueDO>> mapSoltQueueDO = map.get(displayCol);
- Map<Integer, List<ScreenQueueRespVO>> mapSoltQueueVO = new HashMap<>();
- mapSoltQueueDO.keySet().forEach( displaySlot -> {
- //log.info("displaySlot: " + displaySlot);
- mapSoltQueueVO.put(displaySlot, BeanUtils.toBean(mapSoltQueueDO.get(displaySlot), ScreenQueueRespVO.class));
- });
-
- mapVO.put(displayCol, mapSoltQueueVO);
+ List<QueueDO> columnQueueDOList = map.get(displayCol);
+ List<ScreenQueueRespVO> screenQueueRespVOList = BeanUtils.toBean(columnQueueDOList, ScreenQueueRespVO.class);
+ mapVO.put(displayCol, screenQueueRespVOList);
});
return success( mapVO );
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 e152f46..b914470 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
@@ -100,6 +100,27 @@
columnQueueData.add( queueDO );
});
+ mapDisplayColQueue.values().forEach( _queueDOList -> {
+ //鎶� [浜插拰鐨刔 鎸埌涓婚」鍚庨潰
+ List<QueueDO> affinityWaitingList = new ArrayList<>();
+ ListIterator<QueueDO> iterator = _queueDOList.listIterator();
+ while (iterator.hasNext()) {
+ QueueDO item = iterator.next();
+ if (item.getStatus() == QueueStatusEnum.AFFINITY.getStatus()) {
+ iterator.remove();
+ affinityWaitingList.add(item);
+ }
+ }
+ affinityWaitingList.forEach( affinityWaitingItem -> {
+ for (int i = _queueDOList.size()-1; i >= 0; i--) {
+ if ( affinityWaitingItem.getSeqNum() == _queueDOList.get(i).getSeqNum() ) {
+ _queueDOList.add(i + 1, affinityWaitingItem);
+ break;
+ }
+ }
+ });
+ });
+
return mapDisplayColQueue;
}
--
Gitblit v1.9.3