From 6f9f5260a6ccf2fb653707f54b44bc5f111d684a Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期五, 20 九月 2024 14:58:34 +0800
Subject: [PATCH] 移除 已不用的字段
---
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/queue/QueueDO.java | 4 -
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/callingscreen/CallingScreenController.java | 43 ++-----------
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/callingscreen/ScreenQueueRespVO.java | 9 --
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/callingscreen/CallingScreenService.java | 2
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/callingscreen/CallingScreenServiceImpl.java | 9 ---
sql/mysql/jh.sql | 63 ++++++++++----------
jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queue/queueMapper.java | 3 -
7 files changed, 41 insertions(+), 92 deletions(-)
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/callingscreen/CallingScreenController.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/callingscreen/CallingScreenController.java
index 353647a..e95b414 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/callingscreen/CallingScreenController.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/callingscreen/CallingScreenController.java
@@ -1,41 +1,25 @@
package cn.lihu.jh.module.ecg.controller.admin.callingscreen;
import cn.hutool.extra.servlet.ServletUtil;
-import cn.lihu.jh.framework.apilog.core.annotation.ApiAccessLog;
-import cn.lihu.jh.framework.common.exception.ErrorCode;
import cn.lihu.jh.framework.common.pojo.CommonResult;
-import cn.lihu.jh.framework.common.pojo.PageParam;
-import cn.lihu.jh.framework.common.pojo.PageResult;
import cn.lihu.jh.framework.common.util.object.BeanUtils;
-import cn.lihu.jh.framework.excel.core.util.ExcelUtils;
-import cn.lihu.jh.module.ecg.controller.admin.queue.vo.QueuePageReqVO;
-import cn.lihu.jh.module.ecg.controller.admin.queue.vo.QueueRespVO;
-import cn.lihu.jh.module.ecg.controller.admin.queue.vo.QueueSaveReqVO;
import cn.lihu.jh.module.ecg.dal.dataobject.queue.QueueDO;
import cn.lihu.jh.module.ecg.enums.QueueStatusEnum;
import cn.lihu.jh.module.ecg.service.callingscreen.CallingScreenService;
import cn.lihu.jh.module.ecg.service.config.EcgConfigService;
-import cn.lihu.jh.module.ecg.service.queue.QueueService;
import io.swagger.v3.oas.annotations.Operation;
-import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
-import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.annotation.security.PermitAll;
import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.validation.Valid;
-import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
-import static cn.lihu.jh.framework.apilog.core.enums.OperateTypeEnum.EXPORT;
-import static cn.lihu.jh.framework.common.exception.enums.GlobalErrorCodeConstants.SUCCESS;
import static cn.lihu.jh.framework.common.pojo.CommonResult.error;
import static cn.lihu.jh.framework.common.pojo.CommonResult.success;
@@ -51,16 +35,16 @@
@Resource
private EcgConfigService ecgConfigService;
- @GetMapping("/calling-data")
+ @GetMapping("/big-screen-data")
@Operation(summary = "澶у睆鍙彿鏁版嵁")
@PermitAll
- public CommonResult<Map<Integer, List<CallingRespVO>>> callingData()
+ public CommonResult<Map<Integer, List<ScreenQueueRespVO>>> callingData()
{
Map<Integer, List<QueueDO>> map = callingScreenService.callingData();
- Map<Integer, List<CallingRespVO>> mapVO = new HashMap<>();
+ Map<Integer, List<ScreenQueueRespVO>> mapVO = new HashMap<>();
map.keySet().forEach( key -> {
- mapVO.put(key, BeanUtils.toBean(map.get(key), CallingRespVO.class));
+ mapVO.put(key, BeanUtils.toBean(map.get(key), ScreenQueueRespVO.class));
});
return success( mapVO );
@@ -69,7 +53,7 @@
@GetMapping("/room-screen-data")
@Operation(summary = "璇婇棿灞忔暟鎹�")
@PermitAll
- public CommonResult<Map<Integer, List<CallingRespVO>>> callingDataRoom(HttpServletRequest request)
+ public CommonResult<Map<Integer, List<ScreenQueueRespVO>>> callingDataRoom(HttpServletRequest request)
{
String reqIp = ServletUtil.getClientIP(request);
@@ -83,21 +67,10 @@
List<QueueDO> passedList = queueDOList.stream().filter(queue -> queue.getStatus() == QueueStatusEnum.PASSED.getStatus()).toList();
queueDOList.removeIf(queue -> queue.getStatus() == QueueStatusEnum.PASSED.getStatus());
- Map<Integer, List<CallingRespVO>> mapVO = new HashMap<>();
- mapVO.put(1, BeanUtils.toBean(queueDOList, CallingRespVO.class));
- mapVO.put(2, BeanUtils.toBean(passedList, CallingRespVO.class));
+ Map<Integer, List<ScreenQueueRespVO>> mapVO = new HashMap<>();
+ mapVO.put(1, BeanUtils.toBean(queueDOList, ScreenQueueRespVO.class));
+ mapVO.put(2, BeanUtils.toBean(passedList, ScreenQueueRespVO.class));
return success( mapVO );
}
- @GetMapping("/mark-called")
- @Operation(summary = "璇婇棿灞忔暟鎹�")
- @PermitAll
- public CommonResult<Integer> markCalled(@RequestParam("patId") String patId)
- {
- ErrorCode result = callingScreenService.markCalled(patId);
- if (result.equals(SUCCESS))
- return success(0);
-
- return error(result);
- }
}
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/callingscreen/CallingRespVO.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/callingscreen/ScreenQueueRespVO.java
similarity index 85%
rename from jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/callingscreen/CallingRespVO.java
rename to jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/callingscreen/ScreenQueueRespVO.java
index b69d6f8..078f9fb 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/callingscreen/CallingRespVO.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/callingscreen/ScreenQueueRespVO.java
@@ -1,17 +1,14 @@
package cn.lihu.jh.module.ecg.controller.admin.callingscreen;
-import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.swagger.v3.oas.annotations.media.Schema;
-import io.swagger.v3.oas.models.security.SecurityScheme;
import lombok.Data;
import java.time.LocalDate;
-import java.time.LocalDateTime;
@Schema(description = "鍙彿灞忔暟鎹�")
@Data
-public class CallingRespVO {
+public class ScreenQueueRespVO {
@Schema(description = "鎮h�呯紪鍙�", requiredMode = Schema.RequiredMode.REQUIRED, example = "30473")
@ExcelProperty("鎮h�呯紪鍙�")
@@ -51,10 +48,6 @@
@Schema(description = "棰勭害杩囨湡鏍囪", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("棰勭害杩囨湡鏍囪")
private Byte expired;
-
- @Schema(description = "璇煶鍙彿鏍囪", requiredMode = Schema.RequiredMode.REQUIRED)
- @ExcelProperty("璇煶鍙彿鏍囪")
- private Integer called;
@Schema(description = "鎻掗槦鏍囪", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("鎻掗槦鏍囪")
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/queue/QueueDO.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/queue/QueueDO.java
index 39e6b9d..e05f19e 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/queue/QueueDO.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/queue/QueueDO.java
@@ -67,10 +67,6 @@
*/
private Byte expired;
/**
- * 璇煶鍙彿鏍囪
- */
- private Integer called;
- /**
* 鎻掗槦鏍囪
*/
private Byte jumpFlag;
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queue/queueMapper.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queue/queueMapper.java
index fc11c0f..0f917c6 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queue/queueMapper.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queue/queueMapper.java
@@ -104,9 +104,6 @@
"</script>")
List<QueueDO> getDoctorQueueByStatus(@Param("roomId")Long roomId, @Param("bedNo")String bedNo, @Param("statusList")List<Byte> statusList);
- @Update( "update lihu.queue set called = 1 where pat_id = #{patId}" )
- Integer markCalled(@Param("patId")String patId);
-
@Update("update lihu.queue set status = #{newStatus} where seq_num = \n" +
"(select a.min_seq_num from \n" +
" (select min(seq_num) as min_seq_num from lihu.queue where room_id = #{roomId} and bed_no = #{bedNo} and status = #{curStatus}) a )")
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/callingscreen/CallingScreenService.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/callingscreen/CallingScreenService.java
index bb9d394..73fbb60 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/callingscreen/CallingScreenService.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/callingscreen/CallingScreenService.java
@@ -26,6 +26,4 @@
Map<Integer, List<QueueDO>> callingData();
List<QueueDO> getRoomQueue(String ip, List<Byte> statusList);
-
- ErrorCode markCalled(String patientId);
}
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/callingscreen/CallingScreenServiceImpl.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/callingscreen/CallingScreenServiceImpl.java
index fa9b52c..6c1cc20 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/callingscreen/CallingScreenServiceImpl.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/service/callingscreen/CallingScreenServiceImpl.java
@@ -99,13 +99,4 @@
return queueDOList;
}
- @Override
- public ErrorCode markCalled(String patientId) {
- Integer rowNum = queueMapper.markCalled(patientId);
- if (rowNum == 1)
- return GlobalErrorCodeConstants.SUCCESS;
-
- return PATIENT_NOT_EXISTS;
- }
-
}
diff --git a/sql/mysql/jh.sql b/sql/mysql/jh.sql
index a55d596..d15c42f 100644
--- a/sql/mysql/jh.sql
+++ b/sql/mysql/jh.sql
@@ -43,34 +43,33 @@
-- ----------------------------
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 '棰勭害杩囨湡鏍囪',
- `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='鎺掗槦琛�';
+ `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=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='鎺掗槦琛�';
-- ----------------------------
-- Table structure for clinic_room
@@ -178,6 +177,7 @@
`summary` varchar(200) DEFAULT NULL COMMENT '浣滀笟姒傝',
`remark` varchar(100) DEFAULT NULL COMMENT '澶囨敞',
`cancelled` int DEFAULT '0' COMMENT '鏈畨瑁�',
+ `lost` int DEFAULT '0',
`tenant_id` int DEFAULT '1' COMMENT '绉熸埛缂栧彿',
`creator` varchar(10) DEFAULT '' COMMENT '鍒涘缓鑰�',
`create_time` datetime NOT NULL COMMENT '鍒涘缓鏃堕棿',
@@ -186,11 +186,12 @@
`deleted` bit(1) DEFAULT b'0' COMMENT '鍒犻櫎鏍囪',
PRIMARY KEY (`id`),
KEY `idx_pat_job` (`pat_id`,`job_time`,`job_type`),
- KEY `idx_rent_id` (`rent_id`)
-) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='宸ヤ綔璁板綍琛�';
+ KEY `idx_rent_id` (`rent_id`),
+ KEY `idx_rent_doc_job` (`job_time`,`doc_id`,`job_type`) USING BTREE
+) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='宸ヤ綔璁板綍琛�';
-- ----------------------------
--- Table structure for call
+-- Table structure for call_patient
-- ----------------------------
DROP TABLE IF EXISTS `call_patient`;
SELECT * FROM lihu.call_patient;CREATE TABLE `call_patient` (
--
Gitblit v1.9.3