Fix Bug #544: AI修复

This commit is contained in:
2026-05-27 06:29:24 +08:00
parent a0fed12051
commit 226409e6d6
4 changed files with 110 additions and 165 deletions

View File

@@ -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 &gt;= #{startDate}::date
</if>
<if test="endDate != null and endDate != ''">
AND q.create_time &lt; (#{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 &gt;= #{startDate}::timestamp
</if>
<if test="endDate != null">
AND triage_time &lt;= #{endDate}::timestamp + interval '1 day'
</if>
<!-- 修复 Bug #544已移除 status != 'COMPLETED' 的隐式过滤,确保完诊患者可正常检索 -->
</where>
ORDER BY triage_time DESC
ORDER BY q.create_time DESC
</select>
</mapper>