From 11e73608f1a558c094811aae97a5bccd60317bc2 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期三, 13 十一月 2024 10:24:34 +0800
Subject: [PATCH] Fix Bug: 工位 准备中数量 不对
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/vo/MonitorInfoVO.java | 3 +++
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentServiceImpl.java | 13 +++----------
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceTxFunctions.java | 13 +------------
3 files changed, 7 insertions(+), 22 deletions(-)
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/vo/MonitorInfoVO.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/vo/MonitorInfoVO.java
index 3697ac1..8d11b5a 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/vo/MonitorInfoVO.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/vo/MonitorInfoVO.java
@@ -1,8 +1,10 @@
package cn.lihu.jh.module.ecg.controller.admin.room.vo;
+import cn.lihu.jh.module.ecg.service.queue.BedQueueBO;
import lombok.Data;
import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
@Data
public class MonitorInfoVO {
@@ -11,4 +13,5 @@
private Integer priorityQueueNum;
private Integer openingFlag;
private Map<Integer, String> checkTypeBedInfo;
+ private ConcurrentHashMap<String, BedQueueBO> mapBedVsQueue;
}
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentServiceImpl.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentServiceImpl.java
index d1b9401..d850e27 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentServiceImpl.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentServiceImpl.java
@@ -227,18 +227,11 @@
// 妫�鏌ラ」鐩�.浜插拰鎬� 澶勭悊閫昏緫
if (checkTypeDO.getAffinityCheckTypes().length > 0) {
- List<QueueDO> affinityReadyItems = queueMapper.getCurPatGivenCheckTypesAndStatus(firstOnStageQueueItem.getPatId(), checkTypeDO.getAffinityCheckTypes(), QueueStatusEnum.READY.getStatus());
- if (!affinityReadyItems.isEmpty()) {
- QueueDO tmpQueueDO = affinityReadyItems.get(0);
+ List<QueueDO> affinityAffinityWaitingItems = queueMapper.getCurPatGivenCheckTypesAndStatus(firstOnStageQueueItem.getPatId(), checkTypeDO.getAffinityCheckTypes(), QueueStatusEnum.AFFINITY_WAITING.getStatus());
+ if (!affinityAffinityWaitingItems.isEmpty()) {
+ QueueDO tmpQueueDO = affinityAffinityWaitingItems.get(0);
tmpQueueDO.setStatus(QueueStatusEnum.ONSTAGE.getStatus());
queueMapper.updateById(tmpQueueDO);
- } else {
- List<QueueDO> affinityAffinityWaitingItems = queueMapper.getCurPatGivenCheckTypesAndStatus(firstOnStageQueueItem.getPatId(), checkTypeDO.getAffinityCheckTypes(), QueueStatusEnum.AFFINITY_WAITING.getStatus());
- if (!affinityAffinityWaitingItems.isEmpty()) {
- QueueDO tmpQueueDO = affinityAffinityWaitingItems.get(0);
- tmpQueueDO.setStatus(QueueStatusEnum.ONSTAGE.getStatus());
- queueMapper.updateById(tmpQueueDO);
- }
}
}
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 8eafbaa..6c7db20 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
@@ -274,18 +274,6 @@
firstReadyQueueItem.setStatus(QueueStatusEnum.ONSTAGE.getStatus());
queueMapper.updateById( firstReadyQueueItem );
- // 妫�鏌ラ」鐩�.浜插拰鎬� 澶勭悊閫昏緫
- CheckTypeDO checkTypeDO = getCheckTypeItem( firstReadyQueueItem.getBookCheckType() );
- if (checkTypeDO.getAffinityCheckTypes().length > 0) {
- List<QueueDO> affinityItems = queueMapper.getCurPatGivenCheckTypesAndStatus(firstReadyQueueItem.getPatId(), checkTypeDO.getAffinityCheckTypes(), QueueStatusEnum.AFFINITY_WAITING.getStatus());
- if (!affinityItems.isEmpty()) {
- QueueDO tmpQueueDO = affinityItems.get(0);
- tmpQueueDO.setStatus( QueueStatusEnum.READY.getStatus() );
- queueMapper.updateById( tmpQueueDO );
- return GlobalErrorCodeConstants.SUCCESS; // 鍑嗗涓� 鏁伴噺娌℃湁鍙樺寲锛屾晠鐩存帴杩斿洖
- }
- }
-
// 浼樺厛闃熷垪涓� 璇ュ伐浣� 灏辫瘖鍑嗗涓汉鐨勬暟閲� 鍑忎竴
BedQueueBO bo = mapBedVsQueue.get( Utils.formatRoomBed( roomId, bedNo ) );
bo.queueNum.getAndDecrement(); // 鍙兘宸茬粡銆愬苟鍙戠殑銆戝湪 hurry-up 涓敼鍙樹簡鍊�
@@ -631,6 +619,7 @@
monitorInfoVO.setQueueNum(mapBedVsQueue.size());
monitorInfoVO.setActiveQueueNum((int) mapBedVsQueue.values().stream().filter(item -> item.getStatus() == BedStatusEnum.DOCTOR_ON.getStatus()).count());
monitorInfoVO.setPriorityQueueNum( hashSetOperatingBedQueue.size() );
+ monitorInfoVO.setMapBedVsQueue( mapBedVsQueue );
}
}
--
Gitblit v1.9.3