|  | @ -609,7 +609,7 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public List<Map<String,Object>> findOld(String name,String residentialArea,String limit,String filter1){
 | 
	
		
			
				|  |  |         String sql = "SELECT a.id,a.name,a.photo,a.idcard,CAST(IFNULL(a.birthday,'') AS char ) birthday,a.residential_area residentialArea,a.sex " +
 | 
	
		
			
				|  |  |                 ", case 1 WHEN openid is not null then 1 WHEN a.on_line = '1' then 1 ELSE 0 end as online,IFNULL(sign_status,0) signStatus from base_patient a " +
 | 
	
		
			
				|  |  |                 ",a.ykt_id yktId, case 1 WHEN openid is not null then 1 WHEN a.on_line = '1' then 1 ELSE 0 end as online,IFNULL(sign_status,0) signStatus from base_patient a " +
 | 
	
		
			
				|  |  |                 " WHERE a.archive_type = 1 and a.del = '1' ";
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //case 1 WHEN openid is not null then 1 WHEN a.on_line = '1' then 1 ELSE 0 end as online
 | 
	
	
		
			
				|  | @ -621,7 +621,7 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien
 | 
	
		
			
				|  |  |             sql+= " and residential_area = '"+residentialArea+"' ";
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |         sql += filter1;
 | 
	
		
			
				|  |  |         sql += " GROUP BY a.id,a.name,a.photo,a.idcard,a.birthday,a.residential_area,a.sex,online,signStatus ";
 | 
	
		
			
				|  |  |         sql += " GROUP BY a.id,a.name,a.photo,a.idcard,a.birthday,a.residential_area,a.sex,a.ykt_id,online,signStatus ";
 | 
	
		
			
				|  |  |         sql += " ORDER BY online desc,a.ykt_id desc,signStatus desc";
 | 
	
		
			
				|  |  |         sql += limit;
 | 
	
		
			
				|  |  |         List<Map<String,Object>>  list = jdbcTemplate.queryForList(sql);
 |