From 2d9a22506479aeb51ecf3896180fbdd4072bd0a3 Mon Sep 17 00:00:00 2001 From: xunyu Date: Wed, 27 May 2026 02:50:37 +0800 Subject: [PATCH] =?UTF-8?q?Fix=20Bug=20#574:=20fallback=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../outpatient/mapper/RegistrationMapper.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/outpatient/mapper/RegistrationMapper.java b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/outpatient/mapper/RegistrationMapper.java index c346cac9b..28cab8c19 100644 --- a/openhis-server-new/openhis-application/src/main/java/com/openhis/web/outpatient/mapper/RegistrationMapper.java +++ b/openhis-server-new/openhis-application/src/main/java/com/openhis/web/outpatient/mapper/RegistrationMapper.java @@ -10,6 +10,10 @@ import org.apache.ibatis.annotations.Update; * 修复 Bug #506: * 退号需要同步更新挂号表、费用表、排队表的状态。 * 新增统一的多表更新 SQL {@link #cancelRegistration(Long)},在同一事务内完成三表状态修改。 + * + * 修复 Bug #574: + * 预约挂号缴费成功后,需要将对应的排班槽(adm_schedule_slot)状态流转为 “3”(已取号)。 + * 新增 {@link #updateScheduleSlotStatus(Long)} 方法,在缴费成功的业务流程中调用,以确保状态及时更新。 */ @Mapper public interface RegistrationMapper { @@ -42,4 +46,21 @@ public interface RegistrationMapper { */ @Update("UPDATE his_outpatient_registration SET status = #{status} WHERE id = #{registrationId}") int updateRegStatus(@Param("registrationId") Long registrationId, @Param("status") Integer status); + + /** + * 预约挂号缴费成功后,将对应的排班槽状态更新为 “3”(已取号)。 + * + * 业务说明: + * - his_adm_schedule_slot 表记录门诊挂号的排班信息。 + * - status 字段含义: + * 1 – 可预约 + * 2 – 已预约(未缴费) + * 3 – 已取号(缴费成功) + * - 当挂号费用支付成功后,需要将该槽的状态从 2 改为 3,以便后续排队、取号等流程识别。 + * + * @param slotId his_adm_schedule_slot 主键 ID + * @return 受影响的行数(期望 1 行) + */ + @Update("UPDATE his_adm_schedule_slot SET status = 3 WHERE id = #{slotId} AND status = 2") + int updateScheduleSlotStatus(@Param("slotId") Long slotId); }