|
@ -64,9 +64,9 @@ public class PatientLableService extends BaseJpaService<WlyyPatientLabelDO, Wlyy
|
|
|
sql +=",(select COUNT(*) from wlyy_patient_device a where a.`user` = p.id) deviceFlag ";
|
|
|
String countSql = "SELECT count(DISTINCT p.id) ";
|
|
|
String filters = "from base_service_package_sign_record sr,base_service_package_record r, " +
|
|
|
" base_service_package_item i,base_patient p,wlyy_patient_label l " +
|
|
|
" WHERE sr.id = r.sign_id and sr.status=1 and r.service_package_id = i.service_package_id " +
|
|
|
" and i.del = 1 and r.team_code = '"+teamCode+"' " +
|
|
|
" base_patient p,wlyy_patient_label l " +
|
|
|
" WHERE sr.id = r.sign_id and sr.status=1 " +
|
|
|
" and r.team_code = '"+teamCode+"' " +
|
|
|
" and sr.patient = p.id and p.id = l.patient and l.label_type = 1 and l.label_code = '"+labelCode+"' ";
|
|
|
if(StringUtils.isNotBlank(name)){
|
|
|
filters += " and (p.name like '%"+name+"%' or p.idcard like '%"+name+"%') ";
|