|
|
|
@ -214,6 +214,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
b.name
|
|
|
|
|
from t_record a LEFT JOIN t_patient b on a.patient_id = b.id
|
|
|
|
|
where TO_DAYS(a.create_time) = TO_DAYS(NOW())
|
|
|
|
|
and b.del_flag = 0
|
|
|
|
|
<if test="doctorId != null "> and a.doctor_id = #{doctorId}</if>
|
|
|
|
|
<if test="hospitalId != null "> and a.hospital_id = #{hospitalId}</if>
|
|
|
|
|
ORDER BY a.create_time desc
|
|
|
|
@ -237,10 +238,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
|
<select id="ageCount" resultType="com.ruoyi.system.domain.TPatient">
|
|
|
|
|
SELECT
|
|
|
|
|
a.id,a.age
|
|
|
|
|
DISTINCT(a.phone),a.id,a.age
|
|
|
|
|
from t_patient a
|
|
|
|
|
inner JOIN t_record b on a.id = b.patient_id
|
|
|
|
|
where 1 = 1
|
|
|
|
|
and a.del_flag = 0
|
|
|
|
|
<if test="doctorId != null "> and b.doctor_id = #{doctorId}</if>
|
|
|
|
|
<if test="hospitalId != null "> and b.hospital_id = #{hospitalId}</if>
|
|
|
|
|
</select>
|
|
|
|
|