| 
					
				 | 
			
			
				@ -780,7 +780,7 @@ public class SpecialistService{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				//    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 专科-模糊搜索注册居民 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 专科-模糊搜索注册居民(未与该医生所在团队医生签约的居民) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param doctorCode 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param keywords 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -792,11 +792,19 @@ public class SpecialistService{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            whereSql+=" and (p.name like '%"+keywords+"%' or p.idcard like '%"+keywords+"%' or p.mobile like '%"+keywords+"%') "; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String centerSql =" from "+basedb+".wlyy_patient p  " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " WHERE p.code not in (SELECT r.patient FROM  wlyy_specialist.wlyy_specialist_patient_relation r WHERE r.sign_status = '1' and doctor='"+doctorCode+"')"+" AND p.openid IS NOT NULL "+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " WHERE p.code not in (SELECT r.patient FROM  wlyy_specialist.wlyy_specialist_patient_relation r WHERE r.sign_status = '1' " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " AND doctor in (SELECT m.doctor_code FROM  "+basedb+".wlyy_admin_team_member m where m.team_id in " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " (SELECT dt.id FROM  "+basedb+".wlyy_admin_team dt LEFT JOIN  "+basedb+".wlyy_admin_team_member watm ON dt.id=watm.team_id " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " WHERE dt.available='1' AND watm.available='1' AND watm.doctor_code='"+doctorCode+"') AND  m.available='1'))" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                +" AND p.openid IS NOT NULL "+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				               whereSql; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String countCenterSql =" from "+basedb+".wlyy_patient p " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " WHERE p.code not in (SELECT r.patient FROM  wlyy_specialist.wlyy_specialist_patient_relation r WHERE r.sign_status = '1' and doctor='"+doctorCode+"')"+" AND p.openid IS NOT NULL "+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " WHERE p.code not in (SELECT r.patient FROM  wlyy_specialist.wlyy_specialist_patient_relation r WHERE r.sign_status = '1'" + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " AND doctor in (SELECT m.doctor_code FROM  "+basedb+".wlyy_admin_team_member m where m.team_id in " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " (SELECT dt.id FROM  "+basedb+".wlyy_admin_team dt LEFT JOIN  "+basedb+".wlyy_admin_team_member watm ON dt.id=watm.team_id " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                " WHERE dt.available='1' AND watm.available='1' AND watm.doctor_code='"+doctorCode+"') AND  m.available='1'))" 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                +" AND p.openid IS NOT NULL "+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                whereSql; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sqlCount=sql1+countCenterSql; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String sql=sql2+centerSql+" LIMIT "+(page-1)*pageSize+","+pageSize; 
			 |