Files
his/openhis-server-new
zhaoyun b1a3f5d762 fix(#574): 请修复 Bug #574:[一般] [预约挂号] 预约签到缴费成功后,数据库 adm_schedule_slot.status 状态未及时流转为“3”(已取
根因:
- 项目中有 **3 个 `AppointmentServiceImpl` 文件**,其中 2 个存在编译错误,导致正确实现无法被 Spring 加载:
- | 文件 | 状态 | 问题 |
- |---|---|---|
- | `com.openhis.web.outpatient.service.AppointmentServiceImpl` |  **保留(正确)** | 正确实现 `AppointmentService`,`confirmPaymentAndTake()` 调用 `AppointmentSlotMapper.updateSlotToTaken()` 将 `adm_schedule_slot.status` 更新为 3 |
- | `com.openhis.web.appointment.service.AppointmentServiceImpl` |  **已删除** | `@Override` 注解的方法名 (`createAppointment`, `checkInAndPay`) 与 `AppointmentService` 接口 (`bookSlot`, `confirmPaymentAndTake`) 不匹配,编译失败 |
- | `com.openhis.web.outpatient.service.impl.AppointmentServiceImpl` |  **已删除** | 调用了 `AppointmentMapper` 中不存在的方法 (`updateSlotStatus`, `updateBookedNum`),且未被任何代码引用 |
- ### 状态流转链路
- 预约 (book) → AppointmentSlotMapper: status = 2 (已预约)
- 签到缴费成功 → AppointmentController (/confirm)
- AppointmentService.confirmPaymentAndTake(slotId)
- AppointmentSlotMapper.updateSlotToTaken(slotId)
- SQL: UPDATE adm_schedule_slot SET status = 3 WHERE id = ? AND status = 2
- status = 3 (已取号/签到,待就诊) 
- ### 改动文件
- 删除**: `openhis-application/src/main/java/com/openhis/web/appointment/service/AppointmentServiceImpl.java`(编译失败)
- 删除**: `openhis-application/src/main/java/com/openhis/web/outpatient/service/impl/AppointmentServiceImpl.java`(编译失败,引用不存在的方法)

修复:
- 修改相关代码文件
2026-05-28 23:44:23 +08:00
..