|
@ -195,7 +195,11 @@ public class BasePatientService<T, R extends CrudRepository> extends BaseJpaServ
|
|
|
}
|
|
|
sql+="ORDER BY\n" +
|
|
|
"\tcreate_time DESC";
|
|
|
String countSql = "select count(id) from base_patient where name like '%" + param + "%' or idcard like '%" + param + "%'";
|
|
|
String countSql = "select count(id) from base_patient where 1=1 " ;
|
|
|
if (StringUtils.isNoneBlank(nameOrIdcard)){
|
|
|
countSql+= " and name like '%" + nameOrIdcard + "%' or idcard like '%" + nameOrIdcard + "%' ";
|
|
|
}
|
|
|
|
|
|
Long count = jdbcTemplate.queryForObject(countSql,Long.class);
|
|
|
if(count <= 0){
|
|
|
return null;
|