From 1dde635cf9b539cd1971cfebe3c3984f13ed473e Mon Sep 17 00:00:00 2001
From: eight <641137800@qq.com>
Date: 星期五, 20 九月 2024 13:35:14 +0800
Subject: [PATCH] 开诊界面 患者顺序

---
 jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/doctor/DoctorController.java     |    3 ++-
 jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/dataobject/queue/QueueDO.java                 |    2 +-
 jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/vo/QueueSaveReqVO.java     |    4 ++--
 jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/QueueStatusEnum.java                        |    6 +++---
 jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/vo/QueuePageReqVO.java     |    2 +-
 jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/vo/QueueRespVO.java        |    4 ++--
 jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/dal/mysql/queue/queueMapper.java                  |    2 +-
 jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/callingscreen/CallingRespVO.java |    2 +-
 8 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/QueueStatusEnum.java b/jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/QueueStatusEnum.java
index d3799ad..c4f6965 100644
--- a/jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/QueueStatusEnum.java
+++ b/jh-module-ecg/jh-module-ecg-api/src/main/java/cn/lihu/jh/module/ecg/enums/QueueStatusEnum.java
@@ -15,13 +15,13 @@
 @AllArgsConstructor
 public enum QueueStatusEnum implements IntArrayValuable {
 
-    //10:鎺掗槦涓� 15:宸插彫鍥� 20:鍊欒瘖鍑嗗 30:灏辫瘖涓� 40:灏辫瘖瀹屾垚 50:杩囧彿
+    //5:杩囧彿 10:鎺掗槦涓� 15:宸插彫鍥� 20:鍊欒瘖鍑嗗 30:灏辫瘖涓� 40:灏辫瘖瀹屾垚
+    PASSED((byte)5, "杩囧彿"),
     WAITING((byte)10, "鎺掗槦涓�"),
     RECALLED((byte)15, "宸插彫鍥�"),
     READY((byte)20, "鍊欒瘖鍑嗗"),
     ONSTAGE((byte)30, "灏辫瘖涓�"),
-    FINISH((byte)40, "灏辫瘖瀹屾垚"),
-    PASSED((byte)50, "杩囧彿");
+    FINISH((byte)40, "灏辫瘖瀹屾垚");
 
     public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(QueueStatusEnum::getStatus).toArray();
 
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/CallingRespVO.java
index e51e8b6..b69d6f8 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/CallingRespVO.java
@@ -38,7 +38,7 @@
     private Integer seqNum;
 
     /**
-     * 10:鎺掗槦涓� 15:宸插彫鍥� 20:鍊欒瘖鍑嗗 30:灏辫瘖涓� 40:灏辫瘖瀹屾垚 50:杩囧彿
+     * 5:杩囧彿 10:鎺掗槦涓� 15:宸插彫鍥� 20:鍊欒瘖鍑嗗 30:灏辫瘖涓� 40:灏辫瘖瀹屾垚
      */
     @Schema(description = "鎺掗槦鐘舵��", example = "1")
     @ExcelProperty("鎺掗槦鐘舵��")
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 9bfa6fc..72d9a6b 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
@@ -29,6 +29,7 @@
 import static cn.lihu.jh.framework.common.pojo.CommonResult.error;
 import static cn.lihu.jh.framework.common.pojo.CommonResult.success;
 import static cn.lihu.jh.module.ecg.enums.ErrorCodeConstants.ECG_INNER_ERROR;
+import static cn.lihu.jh.module.ecg.enums.ErrorCodeConstants.PATIENT_NOT_EXISTS;
 
 @Tag(name = "绠$悊鍚庡彴 - 鍖荤敓鍙彿")
 @RestController
@@ -252,7 +253,7 @@
     {
         Integer result = queueService.recallPatient(roomId, bedNo, patId);
         if (null == result || 0 == result)
-            return error( new ErrorCode(201, "鎵句笉鍒版偅鑰�") );
+            return error(PATIENT_NOT_EXISTS);
 
         return success("success");
     }
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/vo/QueuePageReqVO.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/vo/QueuePageReqVO.java
index 1346326..312e68d 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/vo/QueuePageReqVO.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/vo/QueuePageReqVO.java
@@ -36,7 +36,7 @@
 
     @Schema(description = "鎺掗槦搴忓彿")
     private Integer seqNum;
-    @Schema(description = "10:鎺掗槦涓� 15:宸插彫鍥� 20:鍊欒瘖鍑嗗 30:灏辫瘖涓� 40:灏辫瘖瀹屾垚 50:杩囧彿", example = "1")
+    @Schema(description = "5:杩囧彿 10:鎺掗槦涓� 15:宸插彫鍥� 20:鍊欒瘖鍑嗗 30:灏辫瘖涓� 40:灏辫瘖瀹屾垚 ", example = "1")
     private Byte status;
 
     @Schema(description = "杩囧彿鏍囪")
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/vo/QueueRespVO.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/vo/QueueRespVO.java
index 31f469f..bab8f32 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/vo/QueueRespVO.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/vo/QueueRespVO.java
@@ -44,8 +44,8 @@
     @ExcelProperty("鎺掗槦搴忓彿")
     private Integer seqNum;
 
-    @Schema(description = "10:鎺掗槦涓� 15:宸插彫鍥� 20:鍊欒瘖鍑嗗 30:灏辫瘖涓� 40:灏辫瘖瀹屾垚 50:杩囧彿", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
-    @ExcelProperty("10:鎺掗槦涓� 15:宸插彫鍥� 20:鍊欒瘖鍑嗗 30:灏辫瘖涓� 40:灏辫瘖瀹屾垚 50:杩囧彿")
+    @Schema(description = "5:杩囧彿 10:鎺掗槦涓� 15:宸插彫鍥� 20:鍊欒瘖鍑嗗 30:灏辫瘖涓� 40:灏辫瘖瀹屾垚 ", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
+    @ExcelProperty("5:杩囧彿 10:鎺掗槦涓� 15:宸插彫鍥� 20:鍊欒瘖鍑嗗 30:灏辫瘖涓� 40:灏辫瘖瀹屾垚 ")
     private Byte status;
 
     @Schema(description = "杩囧彿鏍囪", requiredMode = Schema.RequiredMode.REQUIRED)
diff --git a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/vo/QueueSaveReqVO.java b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/vo/QueueSaveReqVO.java
index 15ecc0b..f7defb0 100644
--- a/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/vo/QueueSaveReqVO.java
+++ b/jh-module-ecg/jh-module-ecg-biz/src/main/java/cn/lihu/jh/module/ecg/controller/admin/queue/vo/QueueSaveReqVO.java
@@ -41,8 +41,8 @@
     @NotNull(message = "鎺掗槦搴忓彿涓嶈兘涓虹┖")
     private Integer seqNum;
 
-    @Schema(description = "10:鎺掗槦涓� 15:宸插彫鍥� 20:鍊欒瘖鍑嗗 30:灏辫瘖涓� 40:灏辫瘖瀹屾垚 50:杩囧彿", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
-    @NotNull(message = "10:鎺掗槦涓� 15:宸插彫鍥� 20:鍊欒瘖鍑嗗 30:灏辫瘖涓� 40:灏辫瘖瀹屾垚 50:杩囧彿 涓嶈兘涓虹┖")
+    @Schema(description = "5:杩囧彿 10:鎺掗槦涓� 15:宸插彫鍥� 20:鍊欒瘖鍑嗗 30:灏辫瘖涓� 40:灏辫瘖瀹屾垚 ", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
+    @NotNull(message = "5:杩囧彿 10:鎺掗槦涓� 15:宸插彫鍥� 20:鍊欒瘖鍑嗗 30:灏辫瘖涓� 40:灏辫瘖瀹屾垚 涓嶈兘涓虹┖")
     private Byte status;
 
     @Schema(description = "杩囧彿鏍囪", requiredMode = Schema.RequiredMode.REQUIRED)
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 5132e40..39e6b9d 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
@@ -55,7 +55,7 @@
      */
     private Integer seqNum;
     /**
-     * 10:鎺掗槦涓� 15:宸插彫鍥� 20:鍊欒瘖鍑嗗 30:灏辫瘖涓� 40:灏辫瘖瀹屾垚 50:杩囧彿
+     * 5:杩囧彿 10:鎺掗槦涓� 15:宸插彫鍥� 20:鍊欒瘖鍑嗗 30:灏辫瘖涓� 40:灏辫瘖瀹屾垚
      */
     private Byte status;
     /**
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 9b4188b..fc11c0f 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
@@ -100,7 +100,7 @@
             " <foreach collection='statusList' separator=',' item='status'>" +
             " #{status} " +
             " </foreach> )" +
-            " order by seq_num" +
+            " order by status desc, seq_num" +
             "</script>")
     List<QueueDO> getDoctorQueueByStatus(@Param("roomId")Long roomId, @Param("bedNo")String bedNo, @Param("statusList")List<Byte> statusList);
 

--
Gitblit v1.9.3