新增校验,防止删除存在有效患者预约的医生排班。

更新 SurgeryDto,为计划手术时间添加 JSON 格式配置。

改进接诊确认逻辑,使医师确认流程更加健壮。

在 OrderMapper 中新增方法,用于统计患者在指定时间段内的有效预约订单数量。

增强 TicketServiceImpl,防止同一患者在相同科室与时间段内重复预约。
This commit is contained in:
2026-04-07 17:37:53 +08:00
parent 2584c8f076
commit e573d9f68b
7 changed files with 88 additions and 6 deletions

View File

@@ -217,6 +217,23 @@
where id = #{id}
</update>
<select id="countPatientDeptOrdersInPeriod" resultType="int">
select count(*)
from order_main
<where>
and patient_id = #{patientId}
and department_id = #{departmentId}
and appointment_time &gt;= #{startTime}
and appointment_time &lt; #{endTime}
<if test="statuses != null and statuses.size() &gt; 0">
and status in
<foreach item="s" collection="statuses" open="(" separator="," close=")">
#{s}
</foreach>
</if>
</where>
</select>
<update id="updateOrderStatusById">
update order_main set status = #{status} where id = #{id}
</update>