From 3bb8bf000afddb769315d30f5387fe5844883837 Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期三, 04 九月 2024 09:48:18 +0800
Subject: [PATCH] 叫号功能 step 1
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/queueController.java | 29 ++++++++++++++
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/vo/RoomPageReqVO.java | 4 ++
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/vo/RoomSaveReqVO.java | 3 +
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/queueServiceImpl.java | 6 +++
sql/mysql/jh.sql | 56 ++++++++++++++-------------
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/vo/RoomRespVO.java | 4 ++
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/room/RoomDO.java | 5 ++
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/queue/queueService.java | 2 +
8 files changed, 82 insertions(+), 27 deletions(-)
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/queueController.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/queueController.java
index 381f824..1a65df1 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/queueController.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/queueController.java
@@ -3,6 +3,7 @@
import cn.lihu.jh.framework.common.exception.ErrorCode;
import cn.lihu.jh.framework.security.core.util.SecurityFrameworkUtils;
import cn.lihu.jh.module.ecg.controller.admin.room.vo.RoomRespVO;
+import cn.lihu.jh.module.ecg.enums.QueueStatusEnum;
import cn.lihu.jh.module.ecg.service.config.EcgConfigService;
import cn.lihu.jh.module.ecg.service.config.EcgConfigServiceImpl;
import org.springframework.scheduling.config.ScheduledTaskRegistrar;
@@ -154,4 +155,32 @@
ecgConfigService.resetScheduler();
return success(0);
}
+
+ @GetMapping("/calling-data")
+ @Operation(summary = "澶у睆鍙彿鏁版嵁")
+ @PreAuthorize("@ss.hasPermission('ecg:queue:setting')")
+ public CommonResult<List<QueueRespVO>> callingData(
+ @RequestParam("waitingNum") Integer waitingNum,
+ @RequestParam("passedNum") Integer passedNum)
+ {
+ List<QueueDO> queueDOList = queueService.callingData(waitingNum, passedNum);
+ return success( BeanUtils.toBean(queueDOList, QueueRespVO.class) );
+ }
+
+ @GetMapping("/room-screen-data")
+ @Operation(summary = "璇婇棿灞忔暟鎹�")
+ @PreAuthorize("@ss.hasPermission('ecg:queue:setting')")
+ public CommonResult<List<QueueRespVO>> callingDataRoom(
+ @RequestParam("roomId") Long roomId,
+ @RequestParam("bedNo") String bedNo)
+ {
+ List<Byte> queueStatusList = new ArrayList<>();
+ queueStatusList.add(QueueStatusEnum.READY.getStatus());
+ queueStatusList.add(QueueStatusEnum.ONSTAGE.getStatus());
+ queueStatusList.add(QueueStatusEnum.PASSED.getStatus());
+
+ List<QueueDO> queueDOList = queueService.getDoctorQueueByStatus(roomId, bedNo, queueStatusList);
+ return success(BeanUtils.toBean(queueDOList, QueueRespVO.class));
+ }
+
}
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/vo/RoomPageReqVO.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/vo/RoomPageReqVO.java
index 99d343d..d5b92ca 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/vo/RoomPageReqVO.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/vo/RoomPageReqVO.java
@@ -1,5 +1,6 @@
package cn.lihu.jh.module.ecg.controller.admin.room.vo;
+import com.alibaba.excel.annotation.ExcelProperty;
import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
@@ -24,6 +25,9 @@
@Schema(description = "璇婄枟搴婄紪鍙�")
private String bedNo;
+ @Schema(description = "璇婂IP")
+ private String ip;
+
@Schema(description = "寮�璇婄姸鎬�")
private Integer status;
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/vo/RoomRespVO.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/vo/RoomRespVO.java
index 17bb027..e7f6ad3 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/vo/RoomRespVO.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/vo/RoomRespVO.java
@@ -28,6 +28,10 @@
@ExcelProperty("璇婄枟搴婄紪鍙�")
private String bedNo;
+ @Schema(description = "璇婂IP")
+ @ExcelProperty("璇婂IP")
+ private String ip;
+
@Schema(description = "寮�璇婄姸鎬�", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("寮�璇婄姸鎬�")
private Integer status;
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/vo/RoomSaveReqVO.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/vo/RoomSaveReqVO.java
index ba2d9f2..b436b76 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/vo/RoomSaveReqVO.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/room/vo/RoomSaveReqVO.java
@@ -28,6 +28,9 @@
@NotEmpty(message = "璇婄枟搴婄紪鍙蜂笉鑳戒负绌�")
private String bedNo;
+ @Schema(description = "璇婂IP")
+ private String ip;
+
@Schema(description = "寮�璇婄姸鎬�", requiredMode = Schema.RequiredMode.REQUIRED)
private Integer status;
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/room/RoomDO.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/room/RoomDO.java
index f8f139e..5e7a481 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/room/RoomDO.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/room/RoomDO.java
@@ -42,6 +42,11 @@
private String bedNo;
/**
+ * 璇婂IP
+ */
+ private String ip;
+
+ /**
* 璇婄枟搴婄姸鎬�
* @see BedStatusEnum
*/
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 c671170..39e7114 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
@@ -118,4 +118,6 @@
Integer patientJump(String patId, Byte jumped );
void monitorInfo();
+
+ List<QueueDO> callingData(Integer waitingNum, Integer passedNum);
}
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 63ed788..831784f 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
@@ -679,4 +679,10 @@
+ " opening " + openingFlag.get());
}
+ @Override
+ public List<QueueDO> callingData(Integer waitingNum, Integer passedNum) {
+ //queueMapper.
+ return null;
+ }
+
}
diff --git a/sql/mysql/jh.sql b/sql/mysql/jh.sql
index 97f3bc7..491a578 100644
--- a/sql/mysql/jh.sql
+++ b/sql/mysql/jh.sql
@@ -43,33 +43,34 @@
-- ----------------------------
DROP TABLE IF EXISTS `queue`;
CREATE TABLE `queue` (
- `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
- `pat_id` varchar(30) NOT NULL COMMENT '鎮h�呯紪鍙�',
- `pat_name` varchar(10) NOT NULL COMMENT '鎮h�呭鍚�',
- `pat_gender` tinyint DEFAULT NULL COMMENT '鎮h�呮�у埆',
- `book_date` date NOT NULL COMMENT '棰勭害鏃ユ湡',
- `book_timeslot` int NOT NULL COMMENT '棰勭害鏃堕棿娈�',
- `book_check_type` tinyint DEFAULT NULL COMMENT '棰勭害妫�鏌ョ被鍨�',
- `seq_num` int DEFAULT NULL COMMENT '鎺掗槦搴忓彿',
- `status` tinyint NOT NULL COMMENT '10:鎺掗槦涓� 20:鍊欒瘖鍑嗗 30:灏辫瘖涓� 40:灏辫瘖瀹屾垚 50:杩囧彿 60:杩囨湡',
- `passed` tinyint DEFAULT '0' COMMENT '杩囧彿鏍囪',
- `expired` tinyint DEFAULT '0' COMMENT '棰勭害杩囨湡鏍囪',
- `jump_flag` tinyint DEFAULT '0' COMMENT '鎻掗槦鏍囪',
- `room_id` bigint DEFAULT '0' COMMENT '璇婂缂栧彿',
- `room_name` varchar(10) DEFAULT '' COMMENT '璇婂鍚嶇О',
- `bed_no` varchar(10) DEFAULT '' COMMENT '璇婄枟搴婄紪鍙�',
- `tenant_id` int DEFAULT '1' COMMENT '绉熸埛缂栧彿',
- `creator` varchar(10) DEFAULT '' COMMENT '鍒涘缓鑰�',
- `create_time` datetime NOT NULL COMMENT '鍒涘缓鏃堕棿',
- `updater` varchar(10) DEFAULT '' COMMENT '鏇存柊鑰�',
- `update_time` datetime NOT NULL COMMENT '鏇存柊鏃堕棿',
- `deleted` bit(1) DEFAULT b'0' COMMENT '鍒犻櫎鏍囪',
- PRIMARY KEY (`id`),
- UNIQUE KEY `unique_pat_id` (`pat_id`) USING BTREE,
- KEY `idx_status` (`status`) USING BTREE,
- KEY `idx_seq_num` (`seq_num`) USING BTREE,
- KEY `idx_room_bed_status` (`room_id`,`bed_no`,`status`) USING BTREE
-) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='鎺掗槦琛�';
+ `id` int NOT NULL AUTO_INCREMENT COMMENT 'id',
+ `pat_id` varchar(30) NOT NULL COMMENT '鎮h�呯紪鍙�',
+ `pat_name` varchar(10) NOT NULL COMMENT '鎮h�呭鍚�',
+ `pat_gender` tinyint DEFAULT NULL COMMENT '鎮h�呮�у埆',
+ `book_date` date NOT NULL COMMENT '棰勭害鏃ユ湡',
+ `book_timeslot` int NOT NULL COMMENT '棰勭害鏃堕棿娈�',
+ `book_check_type` tinyint DEFAULT NULL COMMENT '棰勭害妫�鏌ョ被鍨�',
+ `seq_num` int DEFAULT NULL COMMENT '鎺掗槦搴忓彿',
+ `status` tinyint NOT NULL COMMENT '10:鎺掗槦涓� 20:鍊欒瘖鍑嗗 30:灏辫瘖涓� 40:灏辫瘖瀹屾垚 50:杩囧彿 60:杩囨湡',
+ `passed` tinyint DEFAULT '0' COMMENT '杩囧彿鏍囪',
+ `expired` tinyint DEFAULT '0' COMMENT '棰勭害杩囨湡鏍囪',
+ `called` int DEFAULT '0' COMMENT '鍙彿鐘舵�� 0 鏈挱 1 宸叉挱 ',
+ `jump_flag` tinyint DEFAULT '0' COMMENT '鎻掗槦鏍囪',
+ `room_id` bigint DEFAULT '0' COMMENT '璇婂缂栧彿',
+ `room_name` varchar(10) DEFAULT '' COMMENT '璇婂鍚嶇О',
+ `bed_no` varchar(10) DEFAULT '' COMMENT '璇婄枟搴婄紪鍙�',
+ `tenant_id` int DEFAULT '1' COMMENT '绉熸埛缂栧彿',
+ `creator` varchar(10) DEFAULT '' COMMENT '鍒涘缓鑰�',
+ `create_time` datetime NOT NULL COMMENT '鍒涘缓鏃堕棿',
+ `updater` varchar(10) DEFAULT '' COMMENT '鏇存柊鑰�',
+ `update_time` datetime NOT NULL COMMENT '鏇存柊鏃堕棿',
+ `deleted` bit(1) DEFAULT b'0' COMMENT '鍒犻櫎鏍囪',
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `unique_pat_id` (`pat_id`) USING BTREE,
+ KEY `idx_status` (`status`) USING BTREE,
+ KEY `idx_seq_num` (`seq_num`) USING BTREE,
+ KEY `idx_room_bed_status` (`room_id`,`bed_no`,`status`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='鎺掗槦琛�';
-- ----------------------------
-- Table structure for clinic_room
@@ -83,6 +84,7 @@
`status` int NOT NULL DEFAULT '0',
`doc_id` bigint DEFAULT NULL,
`doc_name` varchar(10) DEFAULT '',
+ `ip` char(15) DEFAULT '',
`creator` varchar(10) DEFAULT '' COMMENT '鍒涘缓鑰�',
`create_time` datetime NOT NULL COMMENT '鍒涘缓鏃堕棿',
`updater` varchar(10) DEFAULT '' COMMENT '鏇存柊鑰�',
--
Gitblit v1.9.3