bug343:门诊预约挂号:系统未校验重复预约,允许同一患者在同一科室同一天/时间段内多次预约

This commit is contained in:
2026-04-08 10:04:30 +08:00
parent e7413396b2
commit 5d280640e8
3 changed files with 25 additions and 14 deletions

View File

@@ -222,7 +222,17 @@
from order_main
<where>
and patient_id = #{patientId}
and department_id = #{departmentId}
<choose>
<when test="departmentId != null">
and department_id = #{departmentId}
</when>
<when test="departmentName != null and departmentName != ''">
and trim(department_name) = trim(#{departmentName})
</when>
<otherwise>
and 1 = 0
</otherwise>
</choose>
and appointment_time &gt;= #{startTime}
and appointment_time &lt; #{endTime}
<if test="statuses != null and statuses.size() &gt; 0">