This commit is contained in:
liuhongrui
2025-03-05 16:45:45 +08:00
parent b5a460b951
commit 4c1f703fb4
3 changed files with 20 additions and 15 deletions

View File

@@ -139,13 +139,14 @@
<!-- 如果传入phone参数且不为空 -->
<if test="OutpatientRecordSearchParam != null and OutpatientRecordSearchParam.phone != null and OutpatientRecordSearchParam.phone != ''">
AND pt.phone LIKE CONCAT('%',#{phone}, '%')
AND pt.phone LIKE CONCAT('%',#{OutpatientRecordSearchParam.phone}, '%')
</if>
<!-- 时间筛选 -->
<if test="OutpatientRecordSearchParam != null and OutpatientRecordSearchParam.startTime != null and OutpatientRecordSearchParam.endTime != null">
AND e.start_time BETWEEN #{OutpatientRecordSearchParam.startTime} AND
#{OutpatientRecordSearchParam.endTime}
<if test="OutpatientRecordSearchParam != null and OutpatientRecordSearchParam.beginTime != null and OutpatientRecordSearchParam.endTime != null">
AND e.start_time BETWEEN
TO_TIMESTAMP(#{OutpatientRecordSearchParam.beginTime} || ' 00:00:00', 'YYYY-MM-DD HH24:MI:SS') AND
TO_TIMESTAMP(#{OutpatientRecordSearchParam.endTime} || ' 23:59:59', 'YYYY-MM-DD HH24:MI:SS')
</if>
<!-- 如果传入doctorName参数且不为空 -->
@@ -184,13 +185,14 @@
<!-- 如果传入phone参数且不为空 -->
<if test="OutpatientRecordSearchParam != null and OutpatientRecordSearchParam.phone != null and OutpatientRecordSearchParam.phone != ''">
AND pt.phone LIKE CONCAT('%',#{phone}, '%')
AND pt.phone LIKE CONCAT('%',#{OutpatientRecordSearchParam.phone}, '%')
</if>
<!-- 时间筛选 -->
<if test="OutpatientRecordSearchParam != null and OutpatientRecordSearchParam.startTime != null and OutpatientRecordSearchParam.endTime != null">
AND e.start_time BETWEEN #{OutpatientRecordSearchParam.startTime} AND
#{OutpatientRecordSearchParam.endTime}
<if test="OutpatientRecordSearchParam != null and OutpatientRecordSearchParam.beginTime != null and OutpatientRecordSearchParam.endTime != null">
AND e.start_time BETWEEN
TO_TIMESTAMP(#{OutpatientRecordSearchParam.beginTime} || ' 00:00:00', 'YYYY-MM-DD HH24:MI:SS') AND
TO_TIMESTAMP(#{OutpatientRecordSearchParam.endTime} || ' 23:59:59', 'YYYY-MM-DD HH24:MI:SS')
</if>
<!-- 如果传入doctorName参数且不为空 -->