From b54d1d876fc2b8e927be31221a185c64814338e4 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期二, 08 十月 2024 15:33:30 +0800
Subject: [PATCH] 每天不需要关闭工位,仅提出医生
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceImpl.java | 4 ++--
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/RoomController.java | 2 +-
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueService.java | 2 +-
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/config/EcgConfigServiceImpl.java | 2 +-
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/room/RoomServiceImpl.java | 4 ++--
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceTxFunctions.java | 6 ++++--
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/room/RoomService.java | 2 +-
7 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/RoomController.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/RoomController.java
index ce78549..15a95f0 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/RoomController.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/RoomController.java
@@ -175,7 +175,7 @@
@GetMapping(value = {"/reset-room"})
@Operation(summary = "閲嶇疆闂ㄨ瘖瀹�", description = "涓昏鐢ㄤ簬姣忓ぉ鍏抽棴宸ヤ綅")
public CommonResult<String> resetRoom() {
- roomService.resetRoom();
+ roomService.resetRoom(true);
return success("reset room ok");
}
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/config/EcgConfigServiceImpl.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/config/EcgConfigServiceImpl.java
index 0f8570f..7659720 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/config/EcgConfigServiceImpl.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/config/EcgConfigServiceImpl.java
@@ -71,7 +71,7 @@
resetRoomTask = taskRegistrar.scheduleCronTask(new CronTask(() -> {
System.out.println("Room Reset Task executed at: " + System.currentTimeMillis());
- roomService.resetRoom();
+ roomService.resetRoom(false);
}, roomResetCronExpression));
taskRegistrar.afterPropertiesSet();
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 0a34b8d..52764bd 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
@@ -51,7 +51,7 @@
*/
void startHurryUp();
void startBedReload();
- void startResetRoom();
+ void startResetRoom(Boolean needCloseBed);
MonitorInfoVO getMonitorInfo();
ErrorCode startBedOpen(Long roomId, String roomName, String bedNo);
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 f5224de..f4407b9 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
@@ -239,9 +239,9 @@
}
@Override
- public void startResetRoom() {
+ public void startResetRoom(Boolean needCloseBed) {
singleThreadExecutor.execute( () -> {
- queueServiceTxFunctions.resetRoom();
+ queueServiceTxFunctions.resetRoom(needCloseBed);
queueServiceTxFunctions.bedReload();
queueServiceTxFunctions.monitorInfo();
});
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 93ed504..e378814 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
@@ -313,7 +313,7 @@
return GlobalErrorCodeConstants.SUCCESS;
}
- public void resetRoom() {
+ public void resetRoom(Boolean needCloseBed) {
// 韪㈠嚭鍦ㄥ骇鐨勫尰鐢�
List<BedStatusEnum> bedStatusEnumList = new ArrayList<BedStatusEnum>();
bedStatusEnumList.add(BedStatusEnum.DOCTOR_ON);
@@ -323,7 +323,9 @@
oAuth2TokenApi.tick(userIdList);
// 鍏抽棴鎵�鏈夊伐浣�
- Integer ret = roomMapper.resetRoom(BedStatusEnum.CLOSED.getStatus());
+ if (needCloseBed) {
+ Integer ret = roomMapper.resetRoom(BedStatusEnum.CLOSED.getStatus());
+ }
}
/**
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/room/RoomService.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/room/RoomService.java
index c218f74..e67ed46 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/room/RoomService.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/room/RoomService.java
@@ -61,7 +61,7 @@
List<RoomDO> simpleRoomList();
- void resetRoom();
+ void resetRoom(Boolean needCloseBed);
MonitorInfoVO getMonitorInfo();
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/room/RoomServiceImpl.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/room/RoomServiceImpl.java
index 398650b..c6d02df 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/room/RoomServiceImpl.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/room/RoomServiceImpl.java
@@ -109,8 +109,8 @@
}
@Override
- public void resetRoom() {
- queueService.startResetRoom();
+ public void resetRoom(Boolean needCloseBed) {
+ queueService.startResetRoom(needCloseBed);
}
@Override
--
Gitblit v1.9.3