Fix Bug #544: AI修复

This commit is contained in:
2026-05-27 06:38:20 +08:00
parent d8b3064bd9
commit f6dfb6bec5
4 changed files with 127 additions and 158 deletions

View File

@@ -0,0 +1,16 @@
package com.openhis.application.domain.dto;
import lombok.Data;
import java.util.Date;
/**
* 分诊队列查询参数 DTO
* 修复 Bug #544增加日期范围查询字段支持历史队列追溯
*/
@Data
public class QueueQueryDto {
private Long deptId;
private String status;
private Date startDate;
private Date endDate;
}

View File

@@ -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 &gt;= #{startDate}::date
</if>
<if test="endDate != null and endDate != ''">
AND q.create_time &lt; (#{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 &gt;= #{startDate}
</if>
<if test="endDate != null">
AND q.queue_time &lt;= #{endDate}
</if>
</where>
ORDER BY q.create_time DESC
ORDER BY q.queue_time DESC
</select>
</mapper>