|
|
@@ -63,9 +63,6 @@
|
|
|
<if test="query.patientInfo != null">
|
|
|
and (patient_code like concat('%',#{query.patientInfo},'%') or patient_name like concat('%',#{query.patientInfo},'%') )
|
|
|
</if>
|
|
|
- <if test="query.manageType != null">
|
|
|
- and manage_type=#{query.manageType}
|
|
|
- </if>
|
|
|
<if test="query.patientId != null">
|
|
|
and patient_id=#{query.patientId}
|
|
|
</if>
|
|
|
@@ -80,6 +77,8 @@
|
|
|
</if>
|
|
|
</where>
|
|
|
) as r
|
|
|
+ join bus_patient as p on r.patient_id=p.id
|
|
|
+ join bus_clinic as c on p.clinic_id=c.id
|
|
|
left join (select * from im_msg) as rm
|
|
|
on rm.id=r.last_msg_id
|
|
|
<if test="query.assistId != null">
|
|
|
@@ -93,6 +92,9 @@
|
|
|
and (r.success_time > #{query.successTime}
|
|
|
or r.create_time > #{query.successTime})
|
|
|
</if>
|
|
|
+ <if test="query.manageType != null">
|
|
|
+ and c.manage_type=#{query.manageType}
|
|
|
+ </if>
|
|
|
</where>
|
|
|
order by last_msg_time desc
|
|
|
</select>
|