From a0cb526759c40821f0c98fab6dd24e4b8d4ba2c8 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期二, 15 十月 2024 15:26:31 +0800
Subject: [PATCH] 装机叫号
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/call/vo/CallSaveReqVO.java | 3 +++
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/doctor/DoctorController.java | 46 +++++++++++++++++++++++++++++++++++++++-------
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/call/CallDO.java | 4 ++++
3 files changed, 46 insertions(+), 7 deletions(-)
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/call/vo/CallSaveReqVO.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/call/vo/CallSaveReqVO.java
index 1c261da..57d748d 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/call/vo/CallSaveReqVO.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/call/vo/CallSaveReqVO.java
@@ -44,6 +44,9 @@
@Schema(description = "鎻掗槦鏍囪")
private Integer jumpFlag;
+ @Schema(description = "鍙彿绫诲瀷")
+ private Integer callType;
+
@Schema(description = "璇婂缂栧彿", example = "30859")
private Long roomId;
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 a82fd0c..b214488 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
@@ -192,6 +192,7 @@
QueueDO onStageItem = installingQueueDOList.getFirst();
CallSaveReqVO callSaveReqVO = BeanUtils.toBean(onStageItem, CallSaveReqVO.class);
callSaveReqVO.setId(null);
+ callSaveReqVO.setCallType(1); // 瑁呮満鍙彿
callService.createCall(callSaveReqVO);
}
@@ -236,25 +237,25 @@
List<QueueDO> queueDOList = queueService.getToBeInstalledPatient(roomId, bedNo);
-/*
- // 杩囨护鍑� 灏辫瘖涓殑锛屽噯澶囧彨鍙�
- QueueDO onStageItem = queueDOList.stream().filter(item -> Objects.equals(item.getStatus(), QueueStatusEnum.ONSTAGE.getStatus())).findFirst().orElse(null);
- if (null != onStageItem) {
+ List<QueueDO> installingQueueDOList = queueDOList.stream().filter(queueDO -> queueDO.getStatus() == QueueStatusEnum.INSTALLING.getStatus()).toList();
+ // 杩囨护鍑� [瀹夎涓璢 鐨勶紝鍑嗗鍙彿 璇ュ伐浣嶅簲璇� 鏈�澶氬彧鏈変竴涓� [瀹夎涓璢
+ if (installingQueueDOList.size() > 0) {
+ QueueDO onStageItem = installingQueueDOList.getFirst();
CallSaveReqVO callSaveReqVO = BeanUtils.toBean(onStageItem, CallSaveReqVO.class);
callSaveReqVO.setId(null);
+ callSaveReqVO.setCallType(1); // 瑁呮満鍙彿
callService.createCall(callSaveReqVO);
}
-*/
return success(BeanUtils.toBean(queueDOList, QueueRespVO.class));
}
@GetMapping("/call-again")
- @Operation(summary = "閲嶅彨銆佹偅鑰�")
+ @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<String> callAgainPatient(
+ public CommonResult<String> callPatientAgain(
@RequestParam("roomId") Long roomId,
@RequestParam("bedNo") String bedNo)
{
@@ -278,6 +279,37 @@
return success("鎿嶄綔鎴愬姛");
}
+
+ @GetMapping("/call-install-again")
+ @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<String> callInstallingPatientAgain(
+ @RequestParam("roomId") Long roomId,
+ @RequestParam("bedNo") String bedNo)
+ {
+ List<Byte> queueStatusList = new ArrayList<>();
+ queueStatusList.add(QueueStatusEnum.INSTALLING.getStatus());
+ List<QueueDO> queueDOList = queueService.getBedQueueByStatus(roomId, bedNo, queueStatusList);
+
+ if (queueDOList.isEmpty())
+ return success("鏃犲畨瑁呬腑鐨勬偅鑰�");
+
+ if (queueDOList.size() > 1) {
+ log.error("room {} bed {} have {} 瀹夎涓殑鎮h��", roomId, bedNo, queueDOList.size());
+ return error(ECG_INNER_ERROR);
+ }
+
+ QueueDO onStageItem = queueDOList.get(0);
+ CallSaveReqVO callSaveReqVO = BeanUtils.toBean(onStageItem, CallSaveReqVO.class);
+ callSaveReqVO.setId(null);
+ callSaveReqVO.setCallType(1); // 瑁呮満鍙彿
+ callService.callAgain(callSaveReqVO);
+
+ return success("鎿嶄綔鎴愬姛");
+ }
+
@GetMapping("/get-to-be-checked-list")
@Operation(summary = "鍙� [甯歌妫�鏌 鎴� [寰呴鐢╙ 鎮h�呭垪琛�")
@Parameter(name = "roomId", description = "璇婂缂栧彿", required = true, example = "116")
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/call/CallDO.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/call/CallDO.java
index d51b3fc..2d673fe 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/call/CallDO.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/call/CallDO.java
@@ -66,6 +66,10 @@
*/
private Integer jumpFlag;
/**
+ * 鍙彿绫诲瀷
+ */
+ private Integer callType;
+ /**
* 璇婂缂栧彿
*/
private Long roomId;
--
Gitblit v1.9.3