|
@ -2066,7 +2066,7 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
|
|
|
" and m.doctor_code = '"+doctor+"' and m.del = '1' ";
|
|
|
|
|
|
String filter =" and EXISTS (select 1 from wlyy_patient_device pd INNER JOIN dm_device dd on pd.device_id = dd.id " +
|
|
|
" where pd.user = sr.patient and FIND_IN_SET(dd.service_topic,'"+topicItem+"')) ";
|
|
|
" where pd.user = sr.patient and pd.del=0 and FIND_IN_SET('"+topicItem+"',dd.service_topic)) ";
|
|
|
|
|
|
if ("preventLost".equals(topicItem)){//有绑定围栏的居民
|
|
|
filter += " and EXISTS (select 1 from wlyy_patient_safe_area sf where sf.patient = p.id and sf.del=1 and sf.manage_status=1) ";
|