From 1f23e7dfc186c65434eda46fd6756d41fd01e867 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期三, 11 十一月 2026 00:00:37 +0800
Subject: [PATCH] ai优化
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueService.java | 182 +++++++++++++++++++++++++++++++++++++++-----
1 files changed, 159 insertions(+), 23 deletions(-)
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueService.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueService.java
index 2f9de52..34c755c 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueService.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueService.java
@@ -19,7 +19,7 @@
*/
public interface QueueService {
- void setQueueReadyMax(Integer max);
+ void initCheckType();
void startBiz();
void closeBiz();
@@ -40,6 +40,13 @@
void updatequeue(@Valid QueueSaveReqVO updateReqVO);
/**
+ * 鏇存柊鍋滆瘖
+ *
+ * @param
+ */
+ void updateStop(long roomId,String bedNo);
+
+ /**
* 鍒犻櫎鎺掗槦
*
* @param id 缂栧彿
@@ -47,29 +54,71 @@
void deletequeue(Integer id);
/**
- *
+ * 涓�涓伐浣� 鍙兘鏀寔澶氫釜妫�鏌ョ被鍨嬶紝
*/
- void startHurryUp();
+ void startHurryUpOneBed(Long roomId, String bedNo);
+
+ /**
+ * 绔嬪嵆琛ヤ汉锛堢幇鍦鸿嚜鏁� + 鑷姪璇婃柇锛夛細鎵嬪姩瑙﹀彂涓�娆¤宸ヤ綅鐨勮嚜鍔ㄥ垎娴侊紝
+ * 骞惰繑鍥炪�岀郴缁熷紑璇婄姸鎬� / 鏄惁鍋滄鍊欒瘖 / 鍊欒瘖涓婇檺 / 琛ヤ汉鍓嶅悗浜烘暟 / 缁撹銆嶃��
+ *
+ * <p>璋冪敤鏂瑰繀椤讳繚璇�"褰撳墠鐧诲綍浜烘槸璇ュ伐浣嶄富浜�"锛圕ontroller 涓婄敤 {@code @RequireBedOwner}锛夈��
+ */
+ java.util.Map<String, Object> hurryUpNow(Long roomId, String bedNo);
+ void startHurryUpOneCheckType(Integer checkType);
+
+ /**
+ * 鍏滃簳锛氬**鎵�鏈�**寮�璇婂伐浣嶈Е鍙戜竴娆¤嚜鍔ㄨˉ浜猴紙绛変环浜庨�愪釜 {@link #startHurryUpOneBed}锛夈��
+ *
+ * <p>鐢� {@code QueueAutoRefillJob} 鍛ㄦ湡鎬ц皟鐢細鍒嗘祦鏈韩鏄�"浜嬩欢椹卞姩"鐨�
+ * 锛堢鍒� / 鍏ュ骇 / 寮�璇� / 鍙彿 / 瀹屾垚鍚勮Е鍙戜竴娆★級锛屼换浣曚竴娆¤Е鍙戞病璺戝埌鎴栬窇鏃╀簡
+ * 锛堜緥濡傜鍒颁簨鍔¤繕娌℃彁浜ゃ�佹墽琛屽櫒寮傚父锛夛紝鎮h�呭氨浼氫竴鐩村仠鍦ㄣ�屾帓闃熶腑銆嶏紝
+ * 鍙兘鐢卞尰鐢熸墜宸ャ�屾媺鍏ャ�嶃�傚懆鏈熷厹搴曚繚璇佽繖绉嶆紡缃戞渶澶� 1 鍒嗛挓灏辫琛ヤ笂銆�
+ *
+ * <p>闂ㄩ椄涓嶅彉锛氭湭寮�璇� / 鍋滄鍊欒瘖 / 鍊欒瘖鍖哄凡婊� 鏃剁収鏍蜂笉浼氳ˉ浜恒��
+ */
+ void startHurryUpAll();
+
void startBedReload();
+ void startResetRoom(Boolean needCloseBed);
MonitorInfoVO getMonitorInfo();
ErrorCode startBedOpen(Long roomId, String roomName, String bedNo);
ErrorCode startBedClose(Long roomId, String bedNo);
ErrorCode startBedDoctorPause(Long roomId, String bedNo, Long docId, String docName);
ErrorCode startBedDoctorResume(Long roomId, String bedNo, Long docId, String docName);
- ErrorCode startBedDoctorOn(Long roomId, String bedNo, Long docId, String docName);
+ /**
+ * 鍖荤敓鍏ュ骇锛堟妸宸ヤ綅涓讳汉璁句负璇ュ尰鐢燂級銆�
+ *
+ * @param bedId 宸ヤ綅涓婚敭锛堝彲閫夛級锛氫紶鍏ユ椂**浼樺厛鎸夊畠瀹氫綅**锛岄伩鍏� bed_no 涓庤姹傚�煎瓨鍦�
+ * 鑲夌溂闅捐鲸宸紓锛堢粨灏剧┖鏍�/澶у皬鍐�/鍏ㄨ锛夊鑷�"鏄庢槑绌洪棽鍗村叆搴уけ璐�"
+ */
+ ErrorCode startBedDoctorOn(Long roomId, String bedNo, Long docId, String docName, Integer bedId);
+
+ /**
+ * 銆屾湰璇婂鎺掗槦涓紙鏈垎閰嶅伐浣嶏級銆嶇殑鎮h�呭垪琛紙宸ヤ綔鍙�"鏈瘖瀹ゆ帓闃熶腑锛堟湭鍒嗛厤锛�"鍒嗗尯鐢級銆�
+ *
+ * <p>鍊欒瘖鍒楄〃鎸� {@code room_id + bed_no} 鏌ワ紝鍙惈**宸插垎娴佸埌鏈伐浣�**鐨勬偅鑰咃紱
+ * 鎺掗槦涓�(10) 鐨勬偅鑰� {@code bed_no} 涓虹┖锛堝ぇ灞忎細鏄剧ず銆佸伐浣滃彴鐪嬩笉鍒帮級锛岃繖閲屾寜鏈伐浣�
+ * 寮�灞曠殑妫�鏌ラ」鐩崟鐙煡鍑烘潵锛屼緵鍖荤敓鎵嬪伐鎷夊叆銆�
+ */
+ List<cn.lihu.jh.module.ecg.dal.dataobject.queue.QueueDO> getUnassignedWaitingPatient(Long roomId, String bedNo);
+
+ /**
+ * 鎵嬪伐鎶婃煇浣嶃�屾帓闃熶腑銆嶆偅鑰呮媺鍏ユ湰宸ヤ綅锛堚啋 鍑嗗涓級銆�
+ *
+ * <p>璋冪敤鏂瑰繀椤讳繚璇�"褰撳墠鐧诲綍浜烘槸璇ュ伐浣嶄富浜�"锛圕ontroller 涓婄敤 {@code @RequireBedOwner}锛夈��
+ */
+ ErrorCode pullWaitingPatient(Long roomId, String bedNo, Integer queueId);
ErrorCode startBedDoctorOff(Long roomId, String bedNo, Long docId, String docName);
+
+ /**
+ * 銆愭湰娆¢渶姹傘�戠鐞嗗憳寮哄埗娓呯┖宸ヤ綅锛堜笉瑕佹眰鏄湰浜猴級鈥斺�� 鍖荤敓涓嬬彮蹇樼搴� / 鎹汉浣跨敤鍚屼竴宸ヤ綅鏃剁敤銆�
+ */
+ ErrorCode startBedDoctorOffByAdmin(Long roomId, String bedNo);
ErrorCode startNextPatient(Long roomId, String bedNo);
+ ErrorCode startNextInstallPatient(Long roomId, String bedNo);
- ErrorCode bedOpen(Long roomId, String roomName, String bedNo);
- ErrorCode bedClose(Long roomId, String bedNo);
- ErrorCode bedDoctorPause(Long roomId, String bedNo, Long docId, String docName);
- ErrorCode bedDoctorResume(Long roomId, String bedNo, Long docId, String docName);
- ErrorCode bedDoctorOn(Long roomId, String bedNo, Long docId, String docName);
- ErrorCode bedDoctorOff(Long roomId, String bedNo, Long docId, String docName);
- ErrorCode nextPatient(Long roomId, String bedNo);
-
- ErrorCode bedReload();
CommonResult<RoomRespVO> getRoom(Long roomId, String bedNo, Long docId);
/**
@@ -94,31 +143,118 @@
*/
void queue(QueueSaveReqVO queueSaveReqVO);
-
/**
- * 鎶婂尰鐢熷�欒瘖鐨勯槦鍒楀婊�
+ * 鎸夐绾﹀崟 id 鎵归噺鍙� queue 琛岋紙棰勭害绛惧埌鍓嶅洖濉�屽凡鎺掗槦 + 鎺掗槦鍙� seq_num銆嶇敤锛夈��
+ * <p>鍘熸柟娉曞悕涓� {@code selectBookSeqNumByAppointIdList}锛屽彿缁熶竴鍒� seq_num 鍚庢敼鍚嶃��
*/
- void hurryup();
+ List<QueueDO> selectQueueByAppointIdList(List<Long> appointIdList);
/**
- * 鍖荤敓鍙笅涓�浣嶆偅鑰�
+ * 甯歌妫�鏌� 鍖荤敓鍙笅涓�浣嶆偅鑰�
*/
void finishNextPatient(Long roomId, String bedNo);
/**
- * 鍖荤敓鐪嬪畬鎮h��
+ * 棰嗙敤 鍖荤敓鍙笅涓�浣嶆偅鑰�
+ */
+ void finishReceiveNextPatient(Long roomId, String bedNo);
+
+ /**
+ * 瑁呮満 鍖荤敓鍙笅涓�浣嶆偅鑰�
+ */
+ void finishInstallNextPatient(Long roomId, String bedNo);
+
+ /**
+ * 杩囧彿鎺掗槦涓偅鑰�
+ */
+ void passWaitingPatient( String patId, Integer bookCheckType );
+
+ /**
+ * 甯歌杩囧彿銆侀鐢ㄨ繃鍙�
*/
void passNextPatient(Long roomId, String bedNo);
- List<QueueDO> getDoctorQueueByStatus(Long roomId, String bedNo, List<Byte> statusList);
+ /**
+ * 瑁呮満杩囧彿
+ */
+ void passInstallNextPatient(Long roomId, String bedNo);
+
+ List<QueueDO> getBedQueueByStatus(Long roomId, String bedNo, List<Integer> statusList);
+
+ List<QueueDO> getRoomQueueByStatus(Long roomId, List<Integer> statusList);
PatientStatisticVO getPatientStatistic(Long roomId, String bedNo);
- Integer recallPatient(Long roomId, String bedNo, String patId);
+ PatientStatisticVO getBedDevReadyStatistic(Long roomId, String bedNo);
- Integer patientJump(String patId, Byte jumped );
+ PatientStatisticVO getBedDevInstallStatistic(Long roomId, String bedNo);
- void monitorInfo();
+ Integer recallPassWaitingPatient(String patId, Integer checkType);
- RoomDO getDocRoomInfo(Long docId);
+ Integer recallPatient(Long roomId, String bedNo, String patId, Integer checkType);
+
+ Integer recallInstallPatient(Long roomId, String bedNo, String patId, Integer checkType, Long roomId_operator, String bedNo_operator);
+
+ // ==================== 闇�姹�2锛氭挙閿�銆屽彨鍙� / 妫�鏌ュ畬鎴愩�� ====================
+
+ /**
+ * 鎾ら攢銆屾鏌ュ畬鎴愩�嶏細鎶婃湰宸ヤ綅浠婃棩鐨勬寚瀹氭偅鑰呬粠 宸插氨璇�(40) 閫�鍥� 鍊欒瘖涓�(20)銆�
+ * <p>
+ * 蹇呴』鎻愪緵 patId + checkType 鍋氱簿纭畾浣嶏紝閬垮厤璇敼鍏朵粬鎮h�呫��
+ *
+ * @return 鍙楀奖鍝嶈鏁帮紱0 琛ㄧず鏈壘鍒拌鎮h�呬粖鏃ョ殑宸插畬鎴愯褰�
+ */
+ Integer undoFinishPatient(Long roomId, String bedNo, String patId, Integer checkType);
+
+ /**
+ * 鎾ら攢銆岃鐐瑰彨鍙枫�嶏細鎶婃湰宸ヤ綅褰撳墠 灏辫瘖涓�(30) 鐨勬偅鑰呴��鍥� 鍊欒瘖涓�(20)銆�
+ *
+ * @return 鍙楀奖鍝嶈鏁帮紱0 琛ㄧず褰撳墠鏃犲氨璇婁腑鎮h��
+ */
+ Integer undoCallPatient(Long roomId, String bedNo);
+
+ /**
+ * 鍙栨湰宸ヤ綅浠婃棩**鏈�杩戜竴浣嶅凡瀹屾垚**鐨勬偅鑰咃紙渚涚晫闈㈡彁绀哄彲鎾ら攢瀵硅薄锛夈��
+ */
+ QueueDO getBedLastFinishedQueueItem(Long roomId, String bedNo);
+
+ // ==================== 闇�姹�3锛氬仠姝㈠�欒瘖寮�鍏� ====================
+
+ /**
+ * 璁剧疆銆屽仠姝㈠�欒瘖銆嶅紑鍏筹紙鎸佷箙鍖栧埌 {@code clinic_room.stop_ready}锛夈��
+ * <p>
+ * 寮�鍚悗锛�**宸叉湁鍊欒瘖鐥呬汉缁х画鍙彿锛屼絾涓嶅啀鏂板鍊欒瘖鐥呬汉**锛�
+ * 鍏抽棴鍚庢仮澶嶆甯告帴鏀躲��
+ *
+ * @param stop true=鍋滄鍊欒瘖锛沠alse=鎭㈠
+ * @return 鎴愬姛杩斿洖 SUCCESS
+ */
+ ErrorCode setStopReady(Long roomId, String bedNo, boolean stop);
+
+ /** 鏌ヨ銆屽仠姝㈠�欒瘖銆嶇姸鎬侊紱宸ヤ綅涓嶅瓨鍦ㄨ繑鍥� null */
+ Boolean getStopReady(Long roomId, String bedNo);
+
+ Integer patientJump(String patId, Integer bookCheckType, Byte jumped );
+
+ List<RoomDO> getDocRoomInfo(Long docId);
+
+ List<QueueDO> getCheckRelatedPatient(Long roomId, String bedNo);
+
+ List<QueueDO> getInstallRelatedPatient(Long roomId, String bedNo);
+
+ // ==================== 闇�姹�1锛氭偅鑰呬俊鎭洖濉� ====================
+
+ /**
+ * 鎸� {@code applyNo} 浠庨绾﹀崟锛坅ppointment锛夊洖濉槦鍒楀璞$殑鎮h�呬俊鎭��
+ * <p>
+ * queue 琛ㄥ彧瀛樹簡鎮h�呯紪鍙�/濮撳悕锛屽叾浣欙紙鎬у埆銆佸嚭鐢熸棩鏈熴�佺梾鍖恒�佸簥鍙枫�佺數璇濄�佹潵婧愩��
+ * 灏辫瘖鍗″彿銆佺櫥璁版椂闂淬�佸紑鍗曞尰甯堛�佸紑鍗曟棩鏈熴�佸鑰愯嵂锛夐兘鍦� appointment 琛ㄣ��
+ * <p>
+ * 涔嬫墍浠ュ澶栨毚闇诧細澶у睆/璇婇棿灞忥紙{@code CallingScreenServiceImpl}锛夌洿鎺ユ煡
+ * {@code queueMapper}锛屼笉缁忚繃鏈� Service 鐨勬煡璇㈡柟娉曪紝闇�瑕佹樉寮忚皟鐢ㄦ湰鏂规硶琛ラ綈銆�
+ * 涓嶈ˉ榻愬垯澶у睆/璇婇棿灞忕殑鎮h�呬俊鎭彧鏈夊鍚嶏紙鎬у埆/鐥呭尯/搴婂彿绛夊叏涓虹┖锛夈��
+ *
+ * @param queueDOList 闃熷垪瀵硅薄鍒楄〃锛堢┖/null 瀹夊叏锛�
+ */
+ void fillAppointmentInfo(List<QueueDO> queueDOList);
}
--
Gitblit v1.9.3