From b63358eeefeb4c7d0078cffe5dbba0380a740afc Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期二, 01 四月 2025 11:45:03 +0800
Subject: [PATCH] update 亲和功能
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java | 11 +++++++++--
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/devrent/DevRentServiceImpl.java | 12 +++++++++---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceTxFunctions.java | 7 ++++++-
README.md | 5 ++++-
4 files changed, 28 insertions(+), 7 deletions(-)
diff --git a/README.md b/README.md
index b183721..b4590b9 100644
--- a/README.md
+++ b/README.md
@@ -12,4 +12,7 @@
3. HurryUP 浠� 璇ュ伐浣嶆敮鎸佺殑鎵�鏈夋鏌ラ」鐩� + 棰勭害鏃堕棿鏈�鏃� 鐨勩�愭帓闃熶腑銆戞偅鑰� 鎶撳埌 璇ュ伐浣� 鍙樻垚 銆愬氨璇婂噯澶囥��
4. 甯歌妫�鏌ュ彨涓嬩竴浣嶃�侀鐢ㄥ彨涓嬩竴浣� 浠� 宸ヤ綅涓� 绗竴浣嶃�愬氨璇婂噯澶囥�戞偅鑰� 鍙樻垚 銆愬氨璇婁腑銆戯紝鐢变簬 灏辫瘖鍑嗗 浜烘暟鍙樺皯锛屽惎鍔� HurryUP
5. 棰勭害纭銆佸姞鎬� 涔熶細鍚姩 HurryUP锛屽皾璇� 鍒嗘祦鍒� 璇婂 + 鍒嗛厤鍐呴儴 seqNum
-6.
+6. 浜插拰锛氭偅鑰呯殑澶氫釜妫�鏌ラ」鐩彲浠ュ湪宸ヤ綅涓婁竴骞跺仛锛岄伩鍏嶅娆℃帓闃燂紝姣斿鍔ㄦ�佸績鐢点�佸姩鎬佽鍘�
+7. 浜插拰椤癸細鏄緷闄勮�咃紝渚濋檮鍒板凡鍒嗘祦鍒拌瘖瀹ょ殑妫�鏌ラ」鐩紝涔熷氨璇存湁宸ヤ綅鍜屽唴閮ㄥ簭鍙�
+7. 鍙洖锛屾洿鏂板唴閮ㄥ簭鍙�
+8.
\ No newline at end of file
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 69f3e1a..efc9b51 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
@@ -846,10 +846,15 @@
}
}
+ /**
+ * 棰嗙敤瀹屾垚锛屼富鍔ㄥ姹備緷闄�
+ */
private void procAffinityWhenReadyFinish(/*IN,OUT*/QueueDO bedOnStageQueueItem, Integer[] affinityCheckTypes) {
- // 濡傛灉瀛樺湪 [瀹夎涓璢 浜插拰椤癸紝鍒欒窡闅忓叾涓竴涓翰鍜岄」
- List<QueueDO> affinityInstallingItems = queueMapper.getCurPatGivenCheckTypesAndStatus(
- bedOnStageQueueItem.getPatId(), affinityCheckTypes, QueueStatusEnum.INSTALLING.getStatus());
+ // 濡傛灉瀛樺湪 [瀹夎涓璢 [瀹夎杩囧彿] [瀹夎鍙洖] 鑳借渚濋檮鐨勬鏌ラ」锛屽垯渚濋檮鍒板叾涓竴涓鏌ラ」
+ List<QueueDO> affinityInstallingItems = queueMapper.getCurPatGivenCheckTypesAndStatusList(
+ bedOnStageQueueItem.getPatId(), affinityCheckTypes,
+ List.of(QueueStatusEnum.INSTALLING.getStatus(), QueueStatusEnum.PASSED_INSTALL.getStatus(),
+ QueueStatusEnum.RECALLED_INSTALL.getStatus()));
if (!affinityInstallingItems.isEmpty()) {
QueueDO affinityInstallingItem = affinityInstallingItems.get(0);
bedOnStageQueueItem.setStatus(QueueStatusEnum.AFFINITY_RECEIVED.getStatus()); // 浜插拰-棰嗙敤
@@ -867,6 +872,7 @@
}
}
+ // 濡傛灉瀛樺湪 [浜插拰-棰嗙敤] 浜插拰椤癸紝鍒欓�夋嫨 鍏朵腑涓�涓翰鍜岄」 鎺ユ浛鍏� 澶勪簬 [瀹夎涓璢
private void procAffinityWhenInstallFinish(QueueDO bedInstallingQueueItem, Integer[] affinityCheckTypes) {
List<QueueDO> affinityAffinityReceivedItems = queueMapper.getCurPatGivenCheckTypesAndStatus(
bedInstallingQueueItem.getPatId(), affinityCheckTypes, QueueStatusEnum.AFFINITY_RECEIVED.getStatus());
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 50c0a46..20aee9f 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
@@ -664,6 +664,9 @@
return roomDO;
}
+ /**
+ * 瑁呮満鍙洖锛屾槸鎶㈠崰寮忕殑锛屼細鏀瑰彉瑁呮満宸ヤ綅
+ */
private void procAffinityWhenInstallRecall(String patId, Integer[] affinityCheckTypes, Long roomId_operator, String bedNo_operator) {
List<QueueDO> affinityItems = queueMapper.getCurPatGivenCheckTypesAndStatus(
patId, affinityCheckTypes, QueueStatusEnum.AFFINITY_RECEIVED.getStatus());
@@ -676,11 +679,15 @@
}
}
+ /**
+ * 棰勭害纭鍚庯紝涓诲姩瀵绘眰渚濋檮
+ */
private void procAffinityWhenQueue(/*IN, OUT*/QueueSaveReqVO queueSaveReqVO, Integer[] affinityCheckTypes) {
- // 濡傛灉瀛樺湪 澶勪簬 [灏辫瘖鍑嗗涓璢 | [灏辫瘖涓璢 鐨勪翰鍜岄」锛屽垯璺熼殢鍏朵腑涓�涓翰鍜岄」
+ // 濡傛灉瀛樺湪 [灏辫瘖鍑嗗] [灏辫瘖涓璢 [杩囧彿] [宸插彫鍥瀅 鑳借渚濋檮鐨勬鏌ラ」锛屽垯渚濋檮鍒板叾涓竴涓�
List<QueueDO> affinityItems = queueMapper.getCurPatGivenCheckTypesAndStatusList(
queueSaveReqVO.getPatId(), affinityCheckTypes,
- List.of(QueueStatusEnum.READY.getStatus(), QueueStatusEnum.ONSTAGE.getStatus()));
+ List.of(QueueStatusEnum.READY.getStatus(), QueueStatusEnum.ONSTAGE.getStatus(),
+ QueueStatusEnum.PASSED.getStatus(), QueueStatusEnum.RECALLED.getStatus()));
if (!affinityItems.isEmpty()) {
QueueDO queueItem = affinityItems.get(0);
queueSaveReqVO.setStatus(QueueStatusEnum.AFFINITY_WAITING.getStatus()); // [浜插拰-鎺掗槦] 鐘舵��
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 4f22cfb..a08dd72 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
@@ -548,6 +548,9 @@
refreshPriorityQueue(bedQueueBO);
}
+ /**
+ * 鏈夋鏌ラ」鍒嗘祦鍒拌瘖瀹ゅ悗锛屼篃灏辨槸杩涘叆[灏辫瘖鍑嗗]鍚庯紝鎷� [鎺掗槦涓璢 + 鍏锋湁浜插拰鎬х殑 妫�鏌ラ」 鏉ヤ緷闄勮妫�鏌ラ」
+ */
private void procAffinityWhenPreempt(QueueDO preemptQueueItem, Integer[] affinityCheckTypes) {
List<QueueDO> affinityItems = queueMapper.getCurPatGivenCheckTypesAndStatus(
preemptQueueItem.getPatId(), affinityCheckTypes, QueueStatusEnum.WAITING.getStatus());
@@ -626,8 +629,10 @@
});
}
+ /**
+ * 妫�鏌ラ」杩涘叆鍒� [瀹夎涓璢 鏃讹紝鎷� [宸查鐢╙ + 鍏锋湁浜插拰鎬х殑 妫�鏌ラ」 鏉ヤ緷闄勮妫�鏌ラ」
+ */
private void procAffinityWhenSomeOneEntryInstalling(String patId, Long roomId_operator, String bedNo_operator, Integer[] affinityCheckTypes) {
- // 瀵逛簬 鍒氳繘鍏ュ埌 [瀹夎涓璢鐨勯」, 濡傛灉瀛樺湪 [宸查鐢╙ 鐨勪翰鍜岄」锛屽垯闇�瑕佸叾璺熼殢
List<QueueDO> affinityItems = queueMapper.getCurPatGivenCheckTypesAndStatus(
patId, affinityCheckTypes, QueueStatusEnum.RECEIVED.getStatus());
for (int i = 0; i < affinityItems.size(); i++) {
--
Gitblit v1.9.3