|  | @ -195,7 +195,11 @@ public class BasePatientService<T, R extends CrudRepository> extends BaseJpaServ
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |         sql+="ORDER BY\n" +
 |  |         sql+="ORDER BY\n" +
 | 
												
													
														
															|  |                 "\tcreate_time DESC";
 |  |                 "\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);
 |  |         Long count  = jdbcTemplate.queryForObject(countSql,Long.class);
 | 
												
													
														
															|  |         if(count <= 0){
 |  |         if(count <= 0){
 | 
												
													
														
															|  |             return null;
 |  |             return null;
 |