fix: 过滤医生余号时排除已过期的号源,只统计当前日期及未来日期的号源

This commit is contained in:
关羽
2026-04-09 09:38:28 +08:00
parent 4d976ade19
commit 3a02e327c7

View File

@@ -379,9 +379,12 @@
AND org.delete_flag = '0' AND org.delete_flag = '0'
<where> <where>
p.delete_flag = '0' p.delete_flag = '0'
<!-- 过滤未来号源:只统计当前日期及未来日期的号源 -->
<if test="query.date != null and query.date != ''"> <if test="query.date != null and query.date != ''">
AND p.schedule_date = CAST(#{query.date} AS DATE) AND p.schedule_date = CAST(#{query.date} AS DATE)
</if> </if>
<!-- 增加时间过滤:排除已过去的就诊日期 -->
AND p.schedule_date >= CURRENT_DATE
<if test="query.department != null and query.department != '' and query.department != 'all'"> <if test="query.department != null and query.department != '' and query.department != 'all'">
AND org.name = #{query.department} AND org.name = #{query.department}
</if> </if>