From 68ff33beff11310e830b0615b5a81f83fad0f683 Mon Sep 17 00:00:00 2001
From: yxh <172933527@qq.com>
Date: 星期日, 08 十一月 2026 23:33:14 +0800
Subject: [PATCH] ai优化

---
 jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueService.java |  142 ++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 134 insertions(+), 8 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 73ea58f..b80062c 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
@@ -40,6 +40,13 @@
     void updatequeue(@Valid QueueSaveReqVO updateReqVO);
 
     /**
+     * 鏇存柊鍋滆瘖
+     *
+     * @param
+     */
+    void updateStop(long roomId,String bedNo);
+
+    /**
      * 鍒犻櫎鎺掗槦
      *
      * @param id 缂栧彿
@@ -47,9 +54,17 @@
     void deletequeue(Integer id);
 
     /**
-     *
+     * 涓�涓伐浣� 鍙兘鏀寔澶氫釜妫�鏌ョ被鍨嬶紝
      */
     void startHurryUpOneBed(Long roomId, String bedNo);
+
+    /**
+     * 绔嬪嵆琛ヤ汉锛堢幇鍦鸿嚜鏁� + 鑷姪璇婃柇锛夛細鎵嬪姩瑙﹀彂涓�娆¤宸ヤ綅鐨勮嚜鍔ㄥ垎娴侊紝
+     * 骞惰繑鍥炪�岀郴缁熷紑璇婄姸鎬� / 鏄惁鍋滄鍊欒瘖 / 鍊欒瘖涓婇檺 / 琛ヤ汉鍓嶅悗浜烘暟 / 缁撹銆嶃��
+     *
+     * <p>璋冪敤鏂瑰繀椤讳繚璇�"褰撳墠鐧诲綍浜烘槸璇ュ伐浣嶄富浜�"锛圕ontroller 涓婄敤 {@code @RequireBedOwner}锛夈��
+     */
+    java.util.Map<String, Object> hurryUpNow(Long roomId, String bedNo);
     void startHurryUpOneCheckType(Integer checkType);
 
     void startBedReload();
@@ -60,9 +75,37 @@
     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);
 
     CommonResult<RoomRespVO> getRoom(Long roomId, String bedNo, Long docId);
 
@@ -89,6 +132,12 @@
     void queue(QueueSaveReqVO queueSaveReqVO);
 
     /**
+     * 鎸夐绾﹀崟 id 鎵归噺鍙� queue 琛岋紙棰勭害绛惧埌鍓嶅洖濉�屽凡鎺掗槦 + 鎺掗槦鍙� seq_num銆嶇敤锛夈��
+     * <p>鍘熸柟娉曞悕涓� {@code selectBookSeqNumByAppointIdList}锛屽彿缁熶竴鍒� seq_num 鍚庢敼鍚嶃��
+     */
+    List<QueueDO> selectQueueByAppointIdList(List<Long> appointIdList);
+
+    /**
      * 甯歌妫�鏌� 鍖荤敓鍙笅涓�浣嶆偅鑰�
      */
     void finishNextPatient(Long roomId, String bedNo);
@@ -104,19 +153,96 @@
     void finishInstallNextPatient(Long roomId, String bedNo);
 
     /**
-     * 鍖荤敓鐪嬪畬鎮h��
+     * 杩囧彿鎺掗槦涓偅鑰�
+     */
+    void passWaitingPatient( String patId, Integer bookCheckType );
+
+    /**
+     * 甯歌杩囧彿銆侀鐢ㄨ繃鍙�
      */
     void passNextPatient(Long roomId, String bedNo);
 
-    List<QueueDO> getBedQueueByStatus(Long roomId, String bedNo, List<Byte> statusList);
+    /**
+     * 瑁呮満杩囧彿
+     */
+    void passInstallNextPatient(Long roomId, String bedNo);
 
-    List<QueueDO> getRoomQueueByStatus(Long roomId, List<Byte> statusList);
+    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);
 
-    RoomDO getDocRoomInfo(Long docId);
+    Integer recallPassWaitingPatient(String patId, Integer checkType);
+
+    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