|
@@ -112,9 +112,8 @@
|
|
|
biz_device bd
|
|
biz_device bd
|
|
|
JOIN biz_infusion_history bih ON bd.infusion_id = bih.id
|
|
JOIN biz_infusion_history bih ON bd.infusion_id = bih.id
|
|
|
left JOIN biz_infusion_clinic bic ON bih.id = bic.infusion_id
|
|
left JOIN biz_infusion_clinic bic ON bih.id = bic.infusion_id
|
|
|
- left JOIN biz_clinic_room bcr ON bic.clinic_id = bcr.id
|
|
|
|
|
|
|
+ left JOIN biz_clinic_room bcr ON bic.clinic_id = bcr.id and bcr.deleted = 0
|
|
|
<where>
|
|
<where>
|
|
|
- and bcr.deleted = 0
|
|
|
|
|
<if test="query.deviceType != null and query.deviceType != ''">
|
|
<if test="query.deviceType != null and query.deviceType != ''">
|
|
|
and bih.device_type = #{query.deviceType}
|
|
and bih.device_type = #{query.deviceType}
|
|
|
</if>
|
|
</if>
|