Fix Bug #544: fallback修复

This commit is contained in:
2026-05-27 05:04:39 +08:00
parent 666d3faec8
commit 73b23c68b4
6 changed files with 271 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.openhis.application.mapper.QueueMapper">
<!-- 查询当前排队(包括完诊) -->
<select id="selectCurrentQueue" parameterType="map" resultType="com.openhis.application.domain.entity.QueueInfo">
SELECT q.*
FROM adm_queue_info q
WHERE 1=1
<if test="departmentId != null">
AND q.department_id = #{departmentId}
</if>
AND q.status IN ('WAIT','DIAGNOSE','FINISHED')
ORDER BY q.queue_no ASC
</select>
<!-- 查询历史排队记录 -->
<select id="selectHistoryQueue" parameterType="map" resultType="com.openhis.application.domain.entity.QueueInfo">
SELECT q.*
FROM adm_queue_info q
WHERE q.status IN ('FINISHED','CANCELLED')
<if test="departmentId != null">
AND q.department_id = #{departmentId}
</if>
<if test="startTime != null">
AND q.create_time &gt;= #{startTime}
</if>
<if test="endTime != null">
AND q.create_time &lt;= #{endTime}
</if>
ORDER BY q.create_time DESC
</select>
</mapper>