|
@ -738,7 +738,7 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
|
|
|
String sql = "select t2.id,t2.name,t2.sex,t2.mobile,t2.idcard,if(t2.openid is null,0,1) online,t2.photo,t1.family_relation,t1.patient older,t3.name olderName " +
|
|
|
"from base_patient t2 left JOIN base_patient_family_member t1 on t1.family_member = t2.id " +
|
|
|
"left join base_patient t3 on t3.id = t1.patient " +
|
|
|
"where t2.archive_type=3 and t2.del=1 ";
|
|
|
"where t2.archive_type=3 and t2.del=1 and t3.archive_type=1 and t3.del=1 ";
|
|
|
if (StringUtils.isNotBlank(name)){
|
|
|
sql += " and t3.name like '%"+name+"%'";
|
|
|
}
|
|
@ -755,7 +755,7 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
|
|
|
String sql = "select t2.id,t1.patient " +
|
|
|
"from base_patient t2 left JOIN base_patient_family_member t1 on t1.family_member = t2.id " +
|
|
|
"left join base_patient t3 on t3.id = t1.patient " +
|
|
|
"where t2.archive_type=3 and t2.del=1 ";
|
|
|
"where t2.archive_type=3 and t2.del=1 and t3.archive_type=1 and t3.del=1 ";
|
|
|
if (StringUtils.isNotBlank(name)){
|
|
|
sql += " and t3.name like '%"+name+"%'";
|
|
|
}
|