From 05466007a40b6a22d68ef47b784fb3738760d18b Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期四, 10 十月 2024 16:36:15 +0800
Subject: [PATCH] 工位状态 动态查看
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/vo/MonitorInfoVO.java | 5 +++--
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceTxFunctions.java | 26 ++++++++++++++++----------
2 files changed, 19 insertions(+), 12 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 d244fc7..a9fd72a 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
@@ -2,11 +2,12 @@
import lombok.Data;
+import java.util.Map;
+
@Data
public class MonitorInfoVO {
private Integer queueNum;
private Integer activeQueueNum;
private Integer openingFlag;
- private String openingInfo;
- private String operatingInfo;
+ private Map<Integer, String> checkTypeBedInfo;
}
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 2c13a09..2a3b853 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
@@ -411,16 +411,15 @@
public MonitorInfoVO getMonitorInfo() {
MonitorInfoVO monitorInfoVO = new MonitorInfoVO();
monitorInfoVO.setOpeningFlag( openingFlag.get() );
- String[] arrStatInfo = roomBedStatistic();
- monitorInfoVO.setOpeningInfo(arrStatInfo[0]);
- monitorInfoVO.setOperatingInfo(arrStatInfo[1]);
+ roomBedStatistic(monitorInfoVO);
return monitorInfoVO;
}
public void monitorInfo() {
- String[] arrStatInfo = roomBedStatistic();
- log.info(" opening " + openingFlag.get() + " openingInfo " + arrStatInfo[0] + " operatingInfo " + arrStatInfo[1] );
+ MonitorInfoVO monitorInfoVO = new MonitorInfoVO();
+ roomBedStatistic(monitorInfoVO);
+ log.info(" opening " + openingFlag.get() + " " + monitorInfoVO.getQueueNum() + " " + monitorInfoVO.getActiveQueueNum() + " " + monitorInfoVO.getCheckTypeBedInfo().toString() );
}
private Integer getBedReadyMax(Long roomId, String bedNo) {
@@ -464,7 +463,7 @@
});
}
- private String[] roomBedStatistic() {
+ private void roomBedStatistic(MonitorInfoVO monitorInfoVO) {
Map<Integer, Integer> mapOpeningCheckBedStatInfo = new HashMap<>();
Map<Integer, Integer> mapOpeningReadyBedStatInfo = new HashMap<>();
Map<Integer, Integer> mapOperatingCheckBedStatInfo = new HashMap<>();
@@ -487,8 +486,6 @@
});
});
- String openingBedInfo = "鎬绘暟锛�" + mapBedVsQueue.size() + " 妫�鏌ュ伐浣嶆暟: " + mapOpeningCheckBedStatInfo.toString() + " 棰嗙敤宸ヤ綅鏁�: " + mapOpeningReadyBedStatInfo.toString();
-
//杩愯惀涓伐浣嶇粺璁�
HashSet<BedQueueBO> hashSetOperatingBedQueue = new HashSet<>();
mapCheckTypeVsPriorityQueue.values().forEach(priorityQueue->{
@@ -505,9 +502,18 @@
});
});
- String operatingBedInfo = "鎬绘暟锛�" + hashSetOperatingBedQueue.size() + " 妫�鏌ュ伐浣嶆暟: " + mapOperatingCheckBedStatInfo.toString() + " 棰嗙敤宸ヤ綅鏁�: " + mapOperatingReadyBedStatInfo.toString();
+ Map<Integer, String> mapCheckTypeBedInfo = new HashMap<>();
+ mapCheckTypeVsReadyMax.keySet().forEach( checkType -> {
+ String str = mapOpeningCheckBedStatInfo.get(checkType) + " " +
+ mapOpeningReadyBedStatInfo.get(checkType) + " " +
+ mapOperatingCheckBedStatInfo.get(checkType) + " " +
+ mapOperatingReadyBedStatInfo.get(checkType) + " ";
+ mapCheckTypeBedInfo.put( checkType, str);
+ });
- return new String[]{openingBedInfo, operatingBedInfo};
+ monitorInfoVO.setCheckTypeBedInfo(mapCheckTypeBedInfo);
+ monitorInfoVO.setQueueNum(mapBedVsQueue.size());
+ monitorInfoVO.setActiveQueueNum(hashSetOperatingBedQueue.size());
}
}
--
Gitblit v1.9.3