| 
					
				 | 
			
			
				@ -559,6 +559,14 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            re.put("helperTotal",findHelperTotal(name,filter)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if("5".equals(type)||StringUtils.isBlank(type)){//老人家属 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            filter = ""; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String sqltmp = "SELECT GROUP_CONCAT(dict_code) orgCodes from wlyy_hospital_sys_dict WHERE dict_name = 'jkzl_olderRelative' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            List<Map<String,Object>> listtmp =  jdbcTemplate.queryForList(sqltmp); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(listtmp.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String orgCodes = String.valueOf(listtmp.get(0).get("orgCodes")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                orgCodes = orgCodes.replaceAll(",","','"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                filter = " and t2.id not in ('"+orgCodes+"')"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            List<Map<String,Object>> list = findOlderFamily(name,limit,filter); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            re.put("oldFamily",list); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            re.put("oldFamilyCount",findOlderFamilyTotal(name,filter)); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -740,7 +748,7 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "left join base_patient t3 on t3.id = t1.patient  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "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+"%'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql += " and t3.name like '%"+name+"%' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        sql += fileter + " GROUP BY t2.id,t1.patient ORDER BY online desc "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        sql += limit; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -757,7 +765,7 @@ public class CarePatientService extends BaseJpaService<BasePatientDO, BasePatien 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "left join base_patient t3 on t3.id = t1.patient  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                "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+"%'"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql += " and t3.name like '%"+name+"%' "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        sql += fileter +" group by t2.id,t1.patient "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sqlCount = "SELECT count(*) from ( "+sql+")A"; 
			 |