Fix Bug #544: AI修复
This commit is contained in:
@@ -2,26 +2,31 @@
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.openhis.application.mapper.TriageQueueMapper">
|
||||
|
||||
<!-- 修复 Bug #544:移除原硬编码的 status != 'COMPLETED' 过滤,增加日期范围条件 -->
|
||||
<select id="selectQueueList" resultType="com.openhis.application.domain.dto.QueuePatientDto">
|
||||
SELECT
|
||||
q.id,
|
||||
q.patient_name AS patientName,
|
||||
q.queue_no AS queueNo,
|
||||
q.status,
|
||||
q.create_time AS createTime
|
||||
SELECT
|
||||
q.id,
|
||||
q.patient_name AS patientName,
|
||||
q.status,
|
||||
q.queue_time AS queueTime,
|
||||
q.dept_id AS deptId
|
||||
FROM triage_queue q
|
||||
<where>
|
||||
<if test="startDate != null and startDate != ''">
|
||||
AND q.create_time >= #{startDate}::date
|
||||
</if>
|
||||
<if test="endDate != null and endDate != ''">
|
||||
AND q.create_time < (#{endDate}::date + interval '1 day')
|
||||
<if test="deptId != null">
|
||||
AND q.dept_id = #{deptId}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND q.status = #{status}
|
||||
</if>
|
||||
<!-- 新增:支持按时间范围检索历史队列 -->
|
||||
<if test="startDate != null">
|
||||
AND q.queue_time >= #{startDate}
|
||||
</if>
|
||||
<if test="endDate != null">
|
||||
AND q.queue_time <= #{endDate}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY q.create_time DESC
|
||||
ORDER BY q.queue_time DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user