From b39f9e15518fda74d33c9e3fbfb3818db5027093 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期一, 18 十一月 2024 10:00:56 +0800
Subject: [PATCH] 亲和-叫号处理
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/doctor/DoctorController.java | 12 +++++++++---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/queue/QueueDO.java | 4 ++++
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/vo/QueueSaveReqVO.java | 2 ++
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java | 1 +
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceTxFunctions.java | 1 +
5 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/doctor/DoctorController.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/doctor/DoctorController.java
index a687d57..47bf81c 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/doctor/DoctorController.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/doctor/DoctorController.java
@@ -138,7 +138,9 @@
List<QueueDO> queueDOList = queueService.getToBeCheckedPatient(roomId, bedNo);
// 杩囨护鍑� 灏辫瘖涓殑锛屽噯澶囧彨鍙�
- QueueDO onStageItem = queueDOList.stream().filter(item -> Objects.equals(item.getStatus(), QueueStatusEnum.ONSTAGE.getStatus())).findFirst().orElse(null);
+ QueueDO onStageItem = queueDOList.stream().filter(item ->
+ item.getStatus() == QueueStatusEnum.ONSTAGE.getStatus() && item.getAffinityItem() == 0
+ ).findFirst().orElse(null);
if (null != onStageItem) {
CallSaveReqVO callSaveReqVO = BeanUtils.toBean(onStageItem, CallSaveReqVO.class);
callSaveReqVO.setId(null);
@@ -162,7 +164,9 @@
List<QueueDO> queueDOList = queueService.getToBeCheckedPatient(roomId, bedNo);
// 杩囨护鍑� 灏辫瘖涓殑锛屽噯澶囧彨鍙�
- QueueDO onStageItem = queueDOList.stream().filter(item -> Objects.equals(item.getStatus(), QueueStatusEnum.ONSTAGE.getStatus())).findFirst().orElse(null);
+ QueueDO onStageItem = queueDOList.stream().filter(item ->
+ item.getStatus() == QueueStatusEnum.ONSTAGE.getStatus() && item.getAffinityItem() == 0
+ ).findFirst().orElse(null);
if (null != onStageItem) {
CallSaveReqVO callSaveReqVO = BeanUtils.toBean(onStageItem, CallSaveReqVO.class);
callSaveReqVO.setId(null);
@@ -185,7 +189,9 @@
List<QueueDO> queueDOList = queueService.getToBeInstalledPatient(roomId, bedNo); // 寰呭畨瑁呯殑鎮h��
- List<QueueDO> installingQueueDOList = queueDOList.stream().filter(queueDO -> queueDO.getStatus() == QueueStatusEnum.INSTALLING.getStatus()).toList();
+ List<QueueDO> installingQueueDOList = queueDOList.stream().filter(queueDO ->
+ queueDO.getStatus() == QueueStatusEnum.INSTALLING.getStatus() && queueDO.getAffinityItem() == 0
+ ).toList();
// 杩囨护鍑� [瀹夎涓璢 鐨勶紝鍑嗗鍙彿 璇ュ伐浣嶅簲璇� 鏈�澶氬彧鏈変竴涓� [瀹夎涓璢
if (installingQueueDOList.size() > 0) {
QueueDO onStageItem = installingQueueDOList.getFirst();
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/vo/QueueSaveReqVO.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/vo/QueueSaveReqVO.java
index 85b00a5..0295694 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/vo/QueueSaveReqVO.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/vo/QueueSaveReqVO.java
@@ -67,6 +67,8 @@
@NotNull(message = "棰勭害杩囨湡鏍囪涓嶈兘涓虹┖")
private Byte expired;
+ private Integer affinityItem;
+
@Schema(description = "璇婂缂栧彿")
private Long roomId;
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/queue/QueueDO.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/queue/QueueDO.java
index 986bfab..c88619d 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/queue/QueueDO.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/queue/QueueDO.java
@@ -85,6 +85,10 @@
*/
private Byte jumpFlag;
/**
+ * 鏄惁浜插拰椤�
+ */
+ private Integer affinityItem;
+ /**
* 璇婂缂栧彿
*/
private Long roomId;
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java
index 432fe0c..573d8a8 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java
@@ -655,6 +655,7 @@
if (!affinityItems.isEmpty()) {
QueueDO queueItem = affinityItems.get(0);
queueSaveReqVO.setStatus(QueueStatusEnum.AFFINITY_WAITING.getStatus()); // [浜插拰-鎺掗槦] 鐘舵��
+ queueSaveReqVO.setAffinityItem( 1 );
queueSaveReqVO.setRoomId(queueItem.getRoomId());
queueSaveReqVO.setRoomName(queueItem.getRoomName());
queueSaveReqVO.setBedNo(queueItem.getBedNo());
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 387bc26..de43da8 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
@@ -514,6 +514,7 @@
for (int i = 0; i < affinityItems.size(); i++) {
QueueDO queueItem = affinityItems.get(i);
queueItem.setStatus(QueueStatusEnum.AFFINITY_WAITING.getStatus()); //鏀瑰彉 鎺掗槦鐘舵��
+ queueItem.setAffinityItem( 1 );
queueItem.setRoomId(preemptQueueItem.getRoomId());
queueItem.setRoomName(preemptQueueItem.getRoomName());
queueItem.setBedNo(preemptQueueItem.getBedNo());
--
Gitblit v1.9.3