diff --git a/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml b/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml
index 961eb5c..5415024 100644
--- a/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml
+++ b/ruoyi-system/src/main/resources/mapper/system/TRecordMapper.xml
@@ -139,9 +139,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
t_record tr
LEFT JOIN t_doctor td ON tr.doctor_id = td.id
LEFT JOIN t_patient tp ON tr.patient_id = tp.id
- WHERE
- tr.doctor_id = #{doctorId}
- AND tr.hospital_id = #{hospitalId}
+
+ and tp.name like concat('%', #{name}, '%')
+ and tr.doctor_id = #{doctorId}
+ and tr.hospital_id = #{hospitalId}
+ and tr.status = #{status}
+ and td.name like concat('%', #{doctorName}, '%')
+
+ and tp.age between
+
+ #{item}
+
+
+ and tp.sex = #{sex}
+ and tp.identifier like concat('%', #{identifier}, '%')
+
+ and td.del_flag = '0' and tp.del_flag = '0'
+
+
+ and DATE_FORMAT(tp.create_time,'%Y-%m') = #{createTime}
+
+
+ and to_days(tr.create_time) = to_days(now())
+
+ and tr.create_time >= #{startTime}
+ and tr.create_time <= #{endTime}
+ and tr.create_time between #{startTime} and #{endTime}
+
+ order by tr.create_time ${doctorOder}
+ order by tp.create_time ${firstVisitOder}
) t
GROUP BY
t.patientId