Fix Bug #544: AI修复
This commit is contained in:
@@ -2,23 +2,26 @@
|
||||
<!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">
|
||||
|
||||
<select id="selectQueueList" resultType="com.openhis.application.domain.entity.TriageQueue">
|
||||
<select id="selectQueueList" resultType="com.openhis.application.domain.dto.QueuePatientDto">
|
||||
SELECT
|
||||
id, patient_name, queue_no, status, triage_time, dept_code, dept_name
|
||||
FROM hisdev.triage_queue
|
||||
q.id,
|
||||
q.patient_name AS patientName,
|
||||
q.queue_no AS queueNo,
|
||||
q.status,
|
||||
q.create_time AS createTime
|
||||
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>
|
||||
<if test="status != null and status != ''">
|
||||
AND status = #{status}
|
||||
AND q.status = #{status}
|
||||
</if>
|
||||
<if test="startDate != null">
|
||||
AND triage_time >= #{startDate}::timestamp
|
||||
</if>
|
||||
<if test="endDate != null">
|
||||
AND triage_time <= #{endDate}::timestamp + interval '1 day'
|
||||
</if>
|
||||
<!-- 修复 Bug #544:已移除 status != 'COMPLETED' 的隐式过滤,确保完诊患者可正常检索 -->
|
||||
</where>
|
||||
ORDER BY triage_time DESC
|
||||
ORDER BY q.create_time DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user