From 24b7c98e01c211e93f00293e6e4e96ba1b9db93f Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期一, 14 十月 2024 14:50:43 +0800
Subject: [PATCH] 常规检查 step 2

---
 jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/doctor/DoctorController.java |   47 ++++++++++++++++++++++++++++++++++++++---------
 1 files changed, 38 insertions(+), 9 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 fdbc85f..9ce1e5b 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
@@ -195,15 +195,17 @@
         queueService.finishInstallNextPatient(roomId, bedNo);
 
         List<Byte> queueStatusList = new ArrayList<>();
-        queueStatusList.add(QueueStatusEnum.RECALLED.getStatus());
-        queueStatusList.add(QueueStatusEnum.READY.getStatus());
-        queueStatusList.add(QueueStatusEnum.ONSTAGE.getStatus());
-        queueStatusList.add(QueueStatusEnum.PASSED.getStatus());
-        List<QueueDO> queueDOList = queueService.getBedQueueByStatus(roomId, bedNo, queueStatusList);
+        queueStatusList.add(QueueStatusEnum.RECEIVED.getStatus());
+        List<QueueDO> queueDOList = queueService.getRoomQueueByStatus(roomId, queueStatusList);
 
-        // 杩囨护鍑�  灏辫瘖涓殑锛屽噯澶囧彨鍙�
-        QueueDO onStageItem = queueDOList.stream().filter(item -> Objects.equals(item.getStatus(), QueueStatusEnum.ONSTAGE.getStatus())).findFirst().orElse(null);
-        if (null != onStageItem) {
+        queueStatusList.clear();
+        queueStatusList.add(QueueStatusEnum.INSTALLING.getStatus());
+        List<QueueDO> installingQueueDOList = queueService.getBedQueueByStatus(roomId, bedNo, queueStatusList);
+        queueDOList.addAll(0, installingQueueDOList );
+
+        // 杩囨护鍑�  [瀹夎涓璢 鐨勶紝鍑嗗鍙彿   璇ュ伐浣嶅簲璇� 鏈�澶氬彧鏈変竴涓� [瀹夎涓璢
+        if (installingQueueDOList.size() > 0) {
+            QueueDO onStageItem = installingQueueDOList.getFirst();
             CallSaveReqVO callSaveReqVO = BeanUtils.toBean(onStageItem, CallSaveReqVO.class);
             callSaveReqVO.setId(null);
             callService.createCall(callSaveReqVO);
@@ -303,7 +305,7 @@
 
         queueStatusList.clear();
         queueStatusList.add(QueueStatusEnum.INSTALLING.getStatus());
-        queueDOList.addAll( queueService.getBedQueueByStatus(roomId, bedNo, queueStatusList) );
+        queueDOList.addAll(0, queueService.getBedQueueByStatus(roomId, bedNo, queueStatusList) );
         return success(BeanUtils.toBean(queueDOList, QueueRespVO.class));
     }
 
@@ -320,6 +322,33 @@
         return success(patientStatisticVO);
     }
 
+    @GetMapping("/get-dev-ready-statistic")
+    @Operation(summary = "璁惧棰嗙敤缁熻")
+    @Parameter(name = "roomId", description = "璇婂缂栧彿", required = true, example = "116")
+    @Parameter(name = "bedNo", description = "宸ヤ綅缂栧彿", required = true, example = "B2")
+    @PreAuthorize("@ss.hasPermission('ecg:doctor:task')")
+    public CommonResult<PatientStatisticVO> getDevReadyStatistic(
+            @RequestParam("roomId") Long roomId,
+            @RequestParam("bedNo") String bedNo)
+    {
+        PatientStatisticVO patientStatisticVO = queueService.getBedDevReadyStatistic(roomId, bedNo);
+        return success(patientStatisticVO);
+    }
+
+
+    @GetMapping("/get-dev-install-statistic")
+    @Operation(summary = "璁惧瑁呮満缁熻")
+    @Parameter(name = "roomId", description = "璇婂缂栧彿", required = true, example = "116")
+    @Parameter(name = "bedNo", description = "宸ヤ綅缂栧彿", required = true, example = "B2")
+    @PreAuthorize("@ss.hasPermission('ecg:doctor:task')")
+    public CommonResult<PatientStatisticVO> getDevInstallStatistic(
+            @RequestParam("roomId") Long roomId,
+            @RequestParam("bedNo") String bedNo)
+    {
+        PatientStatisticVO patientStatisticVO = queueService.getBedDevInstallStatistic(roomId, bedNo);
+        return success(patientStatisticVO);
+    }
+
     @GetMapping("/recall-patient")
     @Operation(summary = "杩囧彿鐥呬汉鍙洖")
     @Parameter(name = "roomId", description = "璇婂缂栧彿", required = true, example = "116")

--
Gitblit v1.9.3