From ffe01ae68e3d78a4f9005f75176d9bb9810759ab Mon Sep 17 00:00:00 2001 From: zhaoyun Date: Fri, 29 May 2026 01:45:04 +0800 Subject: [PATCH] =?UTF-8?q?fix(#570):=20=E8=AF=B7=E4=BF=AE=E5=A4=8D=20Bug?= =?UTF-8?q?=20#570=EF=BC=9A[=E4=B8=80=E8=88=AC]=20[=E9=97=A8=E8=AF=8A?= =?UTF-8?q?=E9=A2=84=E7=BA=A6=E6=8C=82=E5=8F=B7]=20=E6=82=A3=E8=80=85?= =?UTF-8?q?=E9=A2=84=E7=BA=A6=E6=88=90=E5=8A=9F=E5=90=8E=E7=9A=84=E7=8A=B6?= =?UTF-8?q?=E6=80=81=E6=98=BE=E7=A4=BA=E9=94=99=E8=AF=AF=E4=B8=BA=E2=80=9C?= =?UTF-8?q?=E5=B7=B2=E9=94=81=E5=AE=9A=E2=80=9D=EF=BC=8C=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E2=80=9C=E5=B7=B2=E9=A2=84=E7=BA=A6=E2=80=9D?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E6=95=B0=E6=8D=AE=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因: - 预约成功后,槽位状态从 `AVAILABLE(0)` → `LOCKED(2)`。后端 `TicketAppServiceImpl.listTicket` 方法中将 `LOCKED(2)` 映射为 `"已锁定"`,但业务上此状态应显示为 **"已预约"**(预约后未签到)。 - 状态流转正确语义: - `LOCKED(2)` = 已预约但未签到 → 应显示 **"已预约"** - `BOOKED(1)` = 已签到/已取号 → 应显示 **"已取号"**(原本正确) - ### 修改文件 - 后端(1 个文件)** - `openhis-server-new/openhis-application/src/main/java/com/openhis/web/appointmentmanage/appservice/impl/TicketAppServiceImpl.java` - 第 202 行:`dto.setStatus("已锁定")` → `dto.setStatus("已预约")` - 第 383 行:同上(两处相同逻辑) - 前端(1 个文件)** - `openhis-ui-vue3/src/views/appoinmentmanage/outpatientAppointment/index.vue` - 状态筛选下拉框移除 `"已锁定"` 选项 - 移除 `STATUS_CLASS_MAP` 中的 `"已锁定": "status-locked"` - 移除 `applyStatusFilter` 中的 `locked: ['已锁定']` - ### 验证结果 - ✅ 后端 `mvn compile` 通过 - ✅ 前端 `npm run lint` 通过(无新增错误) 修复: - Bug #570 修复 --- .../appservice/impl/TicketAppServiceImpl.java | 4 ++-- .../views/appoinmentmanage/outpatientAppointment/index.vue | 5 ----- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/appointmentmanage/appservice/impl/TicketAppServiceImpl.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/appointmentmanage/appservice/impl/TicketAppServiceImpl.java index 27105a9da..f6be7cdeb 100755 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/appointmentmanage/appservice/impl/TicketAppServiceImpl.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/appointmentmanage/appservice/impl/TicketAppServiceImpl.java @@ -199,7 +199,7 @@ public class TicketAppServiceImpl implements ITicketAppService { if (OrderStatus.PATIENT_CANCELLED.getValue().equals(raw.getOrderStatus())) { dto.setStatus("已退号"); } else { - dto.setStatus("已锁定"); + dto.setStatus("已预约"); } } else if (status == SlotStatus.BOOKED) { if (OrderStatus.PATIENT_CANCELLED.getValue().equals(raw.getOrderStatus())) { @@ -380,7 +380,7 @@ public class TicketAppServiceImpl implements ITicketAppService { if (OrderStatus.PATIENT_CANCELLED.getValue().equals(raw.getOrderStatus())) { dto.setStatus("已退号"); } else { - dto.setStatus("已锁定"); + dto.setStatus("已预约"); } } else if (status == SlotStatus.BOOKED) { if (OrderStatus.PATIENT_CANCELLED.getValue().equals(raw.getOrderStatus())) { diff --git a/openhis-ui-vue3/src/views/appoinmentmanage/outpatientAppointment/index.vue b/openhis-ui-vue3/src/views/appoinmentmanage/outpatientAppointment/index.vue index a615496f9..c321cb7fb 100755 --- a/openhis-ui-vue3/src/views/appoinmentmanage/outpatientAppointment/index.vue +++ b/openhis-ui-vue3/src/views/appoinmentmanage/outpatientAppointment/index.vue @@ -66,9 +66,6 @@ - @@ -473,7 +470,6 @@ import useUserStore from '@/store/modules/user'; const STATUS_CLASS_MAP = { '未预约': 'status-unbooked', - '已锁定': 'status-locked', '已预约': 'status-booked', '已取号': 'status-checked', '已退号': 'status-returned', @@ -1011,7 +1007,6 @@ export default { // 🔧 BugFix#399: 确保已取号状态正确匹配 const statusMap = { unbooked: ['未预约'], - locked: ['已锁定'], booked: ['已预约'], checked: ['已取号', '已签到'], cancelled: ['已停诊', '已取消'],