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