From be7f6f084e141d52b3718cb7b24a9c791ec2f02a Mon Sep 17 00:00:00 2001 From: heminjian502 Date: Thu, 18 Aug 2022 00:21:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=BB=E7=94=9F=E5=BE=AE=E4=BF=A1=E7=99=BB?= =?UTF-8?q?=E5=BD=95=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resources/mapper/system/TRecordMapper.xml | 32 +++++++++++++++++-- 1 file changed, 29 insertions(+), 3 deletions(-) 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