|  | @ -203,8 +203,8 @@ public class SpecialistService{
 | 
	
		
			
				|  |  |                 " lb.labelType, " +
 | 
	
		
			
				|  |  |                 " lb.label, " +
 | 
	
		
			
				|  |  |                 " p.photo, " +
 | 
	
		
			
				|  |  |                 " h.label_name as health, " +
 | 
	
		
			
				|  |  |                 " h.label AS healthcode ," +
 | 
	
		
			
				|  |  |                 " lb.labelName as health, " +
 | 
	
		
			
				|  |  |                 " lb.label AS healthcode ," +
 | 
	
		
			
				|  |  |                 " s.health_assistant AS healthAssistant," +
 | 
	
		
			
				|  |  |                 " s.health_assistant_name AS healthAssistantName" +
 | 
	
		
			
				|  |  |                 " FROM " +
 | 
	
	
		
			
				|  | @ -223,17 +223,6 @@ public class SpecialistService{
 | 
	
		
			
				|  |  |                 " ) lb " +
 | 
	
		
			
				|  |  |                 " JOIN "+basedb+".wlyy_patient p ON p. CODE = lb.patient " +
 | 
	
		
			
				|  |  |                 " JOIN wlyy_specialist_patient_relation s ON s.patient = lb.patient " +
 | 
	
		
			
				|  |  |                 " LEFT JOIN ( " +
 | 
	
		
			
				|  |  |                 " SELECT " +
 | 
	
		
			
				|  |  |                 "  t.label, " +
 | 
	
		
			
				|  |  |                 "  t.label_name, " +
 | 
	
		
			
				|  |  |                 "  t.patient " +
 | 
	
		
			
				|  |  |                 " FROM " +
 | 
	
		
			
				|  |  |                 "  "+basedb+".wlyy_sign_patient_label_info t " +
 | 
	
		
			
				|  |  |                 " WHERE " +
 | 
	
		
			
				|  |  |                 "  t.label_type = '8' " +
 | 
	
		
			
				|  |  |                 " AND t.`status` = '1' " +
 | 
	
		
			
				|  |  |                 " ) h ON h.patient = lb.patient " +
 | 
	
		
			
				|  |  |                 " WHERE ( s.doctor ='"+doctor+"' OR s.health_doctor='"+doctor+"' OR s.health_assistant='"+doctor+ "') AND s.status >=0  AND s.sign_status >0"+
 | 
	
		
			
				|  |  |                 " LIMIT "+(page-1)*size+","+size;
 | 
	
		
			
				|  |  |         
 | 
	
	
		
			
				|  | @ -263,7 +252,7 @@ public class SpecialistService{
 | 
	
		
			
				|  |  |         return MixEnvelop.getSuccess(SpecialistMapping.api_success,PatientLabelVOs);
 | 
	
		
			
				|  |  |     }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     public MixEnvelop<Long, Long> getLabelpatientCount(String doctor, String label, String labelType){
 | 
	
		
			
				|  |  |     public MixEnvelop<Long, Long> getLabelpatientCount(String doctor, String labelType, String label){
 | 
	
		
			
				|  |  |         String sql = "SELECT " +
 | 
	
		
			
				|  |  |                 " COUNT(1) as total " +
 | 
	
		
			
				|  |  |                 " FROM " +
 | 
	
	
		
			
				|  | @ -279,9 +268,10 @@ public class SpecialistService{
 | 
	
		
			
				|  |  |                 "   i.label = '"+label+"' "+
 | 
	
		
			
				|  |  |                 "  AND i.label_type = '"+labelType+"' " +
 | 
	
		
			
				|  |  |                 "  AND i.`status` = '1' " +
 | 
	
		
			
				|  |  |                 " ) lb " +
 | 
	
		
			
				|  |  |                 " JOIN wlyy_specialist_patient_relation s ON s.patient = lb.patient " +
 | 
	
		
			
				|  |  |                 " WHERE ( s.doctor ='"+doctor+"' OR s.health_doctor='"+doctor+"' OR s.health_assistant='"+doctor+ "')  AND s.status >=0  AND s.sign_status >0";
 | 
	
		
			
				|  |  |                 " AND i.patient in ( " +
 | 
	
		
			
				|  |  |                 " select patient from  wlyy_specialist_patient_relation  WHERE " +
 | 
	
		
			
				|  |  |                 "( doctor = '"+doctor+"' OR health_doctor = '"+doctor+"' OR health_assistant='"+doctor+ "' ) AND STATUS >= 0 AND sign_status > 0 )"+
 | 
	
		
			
				|  |  |                 " ) lb ";
 | 
	
		
			
				|  |  |         List<Map<String,Object>> rstotal = jdbcTemplate.queryForList(sql);
 | 
	
		
			
				|  |  |         Long count = 0L;
 | 
	
		
			
				|  |  |         if(rstotal!=null&&rstotal.size()>0){
 |