From f6d581971666da6653a298c45d18143765e461b1 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期二, 08 四月 2025 23:10:43 +0800
Subject: [PATCH] refactor - rename
---
jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/BedStatusEnum.java | 2 +-
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/room/RoomServiceImpl.java | 2 +-
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/QueueServiceTxFunctions.java | 20 ++++++++++----------
3 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/BedStatusEnum.java b/jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/BedStatusEnum.java
index d28ea84..f582c9e 100644
--- a/jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/BedStatusEnum.java
+++ b/jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/BedStatusEnum.java
@@ -17,7 +17,7 @@
CLOSED(0, "宸插叧闂�"),
OPENING(10, "宸插紑閫�"),
DOCTOR_ON(20, "鏈夊尰鐢�"),
- PAUSE(30, "鏆傚仠");
+ DOCTOR_PAUSE(30, "鏆傚仠");
public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(BedStatusEnum::getStatus).toArray();
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 c7f6a90..4c2f2be 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
@@ -145,7 +145,7 @@
List statusList = new ArrayList<BedStatusEnum>();
statusList.add(BedStatusEnum.OPENING);
statusList.add(BedStatusEnum.DOCTOR_ON);
- statusList.add(BedStatusEnum.PAUSE);
+ statusList.add(BedStatusEnum.DOCTOR_PAUSE);
Integer updateNum = roomMapper.setBedOpeningClosed(roomId, bedNo,
BedStatusEnum.CLOSED, statusList);
if ( null==updateNum || 0 == updateNum ) {
@@ -168,27 +168,27 @@
// DB update
List statusList = new ArrayList<BedStatusEnum>();
statusList.add(BedStatusEnum.DOCTOR_ON);
- Integer updateNum = roomMapper.setBedDoctorStatus(roomId, bedNo, docId, BedStatusEnum.PAUSE, statusList);
+ Integer updateNum = roomMapper.setBedDoctorStatus(roomId, bedNo, docId, BedStatusEnum.DOCTOR_PAUSE, statusList);
if ( null==updateNum || 0 == updateNum ) {
log.error("bedDoctorPause DB invalid status. " + roomId + " " + bedNo);
return ROOM_INVALID_STATUS;
}
- routingBedBO.setStatus(BedStatusEnum.PAUSE.getStatus());
+ routingBedBO.setStatus(BedStatusEnum.DOCTOR_PAUSE.getStatus());
removeRoutingQueue(routingBedBO);
return GlobalErrorCodeConstants.SUCCESS;
}
public ErrorCode bedDoctorResume(Long roomId, String bedNo, Long docId, String docName) {
RoutingBedBO routingBedBO = mapOpeningBed.get( Utils.formatRoomBed(roomId, bedNo) );
- if (null == routingBedBO || !routingBedBO.getStatus().equals(BedStatusEnum.PAUSE.getStatus())) {
+ if (null == routingBedBO || !routingBedBO.getStatus().equals(BedStatusEnum.DOCTOR_PAUSE.getStatus())) {
log.error("bedDoctorResume mapBedVsQueue DONOT existed OR NOT Paused. " + roomId + " " + bedNo);
return QUEUE_BED_NOT_EXIST;
}
// DB update
List statusList = new ArrayList<BedStatusEnum>();
- statusList.add(BedStatusEnum.PAUSE);
+ statusList.add(BedStatusEnum.DOCTOR_PAUSE);
Integer updateNum = roomMapper.setBedDoctorStatus(roomId, bedNo, docId,
BedStatusEnum.DOCTOR_ON, statusList);
if ( null==updateNum || 0 == updateNum ) {
@@ -232,7 +232,7 @@
// DB update
List statusList = new ArrayList<BedStatusEnum>();
statusList.add(BedStatusEnum.DOCTOR_ON);
- statusList.add(BedStatusEnum.PAUSE);
+ statusList.add(BedStatusEnum.DOCTOR_PAUSE);
Integer updateNum = roomMapper.setBedDoctorOff(roomId, bedNo, docId, BedStatusEnum.OPENING, statusList);
if ( null==updateNum || 0 == updateNum ) {
log.error("bedDoctorOff DB invalid status. " + roomId + " " + bedNo);
@@ -330,7 +330,7 @@
List<BedStatusEnum> bedStatusEnumList = new ArrayList<BedStatusEnum>();
bedStatusEnumList.add(BedStatusEnum.OPENING);
bedStatusEnumList.add(BedStatusEnum.DOCTOR_ON);
- bedStatusEnumList.add(BedStatusEnum.PAUSE);
+ bedStatusEnumList.add(BedStatusEnum.DOCTOR_PAUSE);
List<RoomDO> roomDOList = roomMapper.simpleRoomList(bedStatusEnumList);
List<RoutingBedBO> routingBedBOList = roomDOList.stream().map(item -> BeanUtils.toBean(item, RoutingBedBO.class)).toList();
@@ -364,7 +364,7 @@
// 韪㈠嚭鍦ㄥ骇鐨勫尰鐢�
List<BedStatusEnum> bedStatusEnumList = new ArrayList<BedStatusEnum>();
bedStatusEnumList.add(BedStatusEnum.DOCTOR_ON);
- bedStatusEnumList.add(BedStatusEnum.PAUSE);
+ bedStatusEnumList.add(BedStatusEnum.DOCTOR_PAUSE);
List<RoomDO> roomDOList = roomMapper.simpleRoomList(bedStatusEnumList);
List<Long> userIdList = roomDOList.stream().map(roomDO -> roomDO.getDocId()).toList();
oAuth2TokenApi.tick(userIdList);
@@ -679,7 +679,7 @@
mapOpeningInstallBedStatInfo.put(checkType, mapOpeningInstallBedStatInfo.get(checkType) + 1 );
if (bedQueueBO.getStatus() == BedStatusEnum.DOCTOR_ON.getStatus() ||
- bedQueueBO.getStatus() == BedStatusEnum.PAUSE.getStatus()) {
+ bedQueueBO.getStatus() == BedStatusEnum.DOCTOR_PAUSE.getStatus()) {
if (bedQueueBO.opType == 0 || bedQueueBO.opType == 1)
mapDocCheckBedStatInfo.put(checkType, mapDocCheckBedStatInfo.get(checkType) + 1);
else
@@ -708,7 +708,7 @@
monitorInfoVO.setOpeningBedNum(mapOpeningBed.size());
monitorInfoVO.setDocBedNum((int) mapOpeningBed.values().stream().filter(item ->
item.getStatus() == BedStatusEnum.DOCTOR_ON.getStatus() ||
- item.getStatus() == BedStatusEnum.PAUSE.getStatus())
+ item.getStatus() == BedStatusEnum.DOCTOR_PAUSE.getStatus())
.count());
monitorInfoVO.setRoutingBedNum( hashSetOperatingBedQueue.size() );
monitorInfoVO.setMapBedVsQueue(mapOpeningBed);
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 a745187..15f6542 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
@@ -141,7 +141,7 @@
List<BedStatusEnum> bedStatusEnumList = new ArrayList<BedStatusEnum>();
bedStatusEnumList.add(BedStatusEnum.OPENING);
bedStatusEnumList.add(BedStatusEnum.DOCTOR_ON);
- bedStatusEnumList.add(BedStatusEnum.PAUSE);
+ bedStatusEnumList.add(BedStatusEnum.DOCTOR_PAUSE);
return roomMapper.simpleRoomList(bedStatusEnumList);
}
--
Gitblit v1.9.3