|  | @ -1581,29 +1581,54 @@ public class ImService {
 | 
												
													
														
															|  | 			pagesize = 10;
 |  | 			pagesize = 10;
 | 
												
													
														
															|  | 		}
 |  | 		}
 | 
												
													
														
															|  | 		
 |  | 		
 | 
												
													
														
															|  | 		String  sql = "SELECT " +
 |  | 
 | 
												
													
														
															|  | 				"a.id AS id," +
 |  | 
 | 
												
													
														
															|  | 				"a.type AS type," +
 |  | 
 | 
												
													
														
															|  | 				"a.title AS title," +
 |  | 
 | 
												
													
														
															|  | 				"a.symptoms AS symptoms," +
 |  | 
 | 
												
													
														
															|  | 				"a.czrq AS czrq," +
 |  | 
 | 
												
													
														
															|  | 				"b.status AS status," +
 |  | 
 | 
												
													
														
															|  | 				"b.evaluate AS evaluate," +
 |  | 
 | 
												
													
														
															|  | 				"d.name AS patientName," +
 |  | 
 | 
												
													
														
															|  | 				"d.id as patientId," +
 |  | 
 | 
												
													
														
															|  | 				"d.idcard as patientIdcard," +
 |  | 
 | 
												
													
														
															|  | 				"d.sex as patientsex," +
 |  | 
 | 
												
													
														
															|  | 				"op.id as outpatientid," +
 |  | 
 | 
												
													
														
															|  | 				"op.type as consultType," +
 |  | 
 | 
												
													
														
															|  | 				"op.general_doctor as generalDoctor," +
 |  | 
 | 
												
													
														
															|  | 				"op.icd10_name as icd10Name," +
 |  | 
 | 
												
													
														
															|  | 				"d.photo AS patientphoto " +
 |  | 
 | 
												
													
														
															|  | 				"FROM wlyy_consult a," +
 |  | 
 | 
												
													
														
															|  | 				"wlyy_consult_team b," +
 |  | 
 | 
												
													
														
															|  | 				"base_patient d, " +
 |  | 
 | 
												
													
														
															|  | 				"wlyy_outpatient op " +
 |  | 
 | 
												
													
														
															|  | 				"WHERE a.id=b.consult " +
 |  | 
 | 
												
													
														
															|  | 				"AND b.patient=d.id AND b.doctor='"+doctor+"' AND a.relation_code = op.id ";
 |  | 
 | 
												
													
														
															|  | 
 |  | 		String  sql = "";
 | 
												
													
														
															|  | 
 |  | 		if(1 == type || 15 ==type){
 | 
												
													
														
															|  | 
 |  | 			sql = "SELECT " +
 | 
												
													
														
															|  | 
 |  | 					"a.id AS id," +
 | 
												
													
														
															|  | 
 |  | 					"a.type AS type," +
 | 
												
													
														
															|  | 
 |  | 					"a.title AS title," +
 | 
												
													
														
															|  | 
 |  | 					"a.symptoms AS symptoms," +
 | 
												
													
														
															|  | 
 |  | 					"a.czrq AS czrq," +
 | 
												
													
														
															|  | 
 |  | 					"b.status AS status," +
 | 
												
													
														
															|  | 
 |  | 					"b.evaluate AS evaluate," +
 | 
												
													
														
															|  | 
 |  | 					"d.name AS patientName," +
 | 
												
													
														
															|  | 
 |  | 					"d.id as patientId," +
 | 
												
													
														
															|  | 
 |  | 					"d.idcard as patientIdcard," +
 | 
												
													
														
															|  | 
 |  | 					"d.sex as patientsex," +
 | 
												
													
														
															|  | 
 |  | 					"op.id as outpatientid," +
 | 
												
													
														
															|  | 
 |  | 					"op.type as consultType," +
 | 
												
													
														
															|  | 
 |  | 					"op.general_doctor as generalDoctor," +
 | 
												
													
														
															|  | 
 |  | 					"op.icd10_name as icd10Name," +
 | 
												
													
														
															|  | 
 |  | 					"d.photo AS patientphoto " +
 | 
												
													
														
															|  | 
 |  | 					"FROM wlyy_consult a," +
 | 
												
													
														
															|  | 
 |  | 					"wlyy_consult_team b," +
 | 
												
													
														
															|  | 
 |  | 					"base_patient d, " +
 | 
												
													
														
															|  | 
 |  | 					"wlyy_outpatient op " +
 | 
												
													
														
															|  | 
 |  | 					"WHERE a.id=b.consult " +
 | 
												
													
														
															|  | 
 |  | 					"AND b.patient=d.id AND b.doctor='"+doctor+"' AND a.relation_code = op.id ";
 | 
												
													
														
															|  | 
 |  | 		}else{
 | 
												
													
														
															|  | 
 |  | 			sql = "SELECT " +
 | 
												
													
														
															|  | 
 |  | 					"a.id AS id," +
 | 
												
													
														
															|  | 
 |  | 					"a.type AS type," +
 | 
												
													
														
															|  | 
 |  | 					"a.title AS title," +
 | 
												
													
														
															|  | 
 |  | 					"a.symptoms AS symptoms," +
 | 
												
													
														
															|  | 
 |  | 					"a.czrq AS czrq," +
 | 
												
													
														
															|  | 
 |  | 					"b.status AS status," +
 | 
												
													
														
															|  | 
 |  | 					"b.evaluate AS evaluate," +
 | 
												
													
														
															|  | 
 |  | 					"d.name AS patientName," +
 | 
												
													
														
															|  | 
 |  | 					"d.id as patientId," +
 | 
												
													
														
															|  | 
 |  | 					"d.idcard as patientIdcard," +
 | 
												
													
														
															|  | 
 |  | 					"d.sex as patientsex," +
 | 
												
													
														
															|  | 
 |  | 					"d.photo AS patientphoto " +
 | 
												
													
														
															|  | 
 |  | 					"FROM wlyy_consult a," +
 | 
												
													
														
															|  | 
 |  | 					"wlyy_consult_team b," +
 | 
												
													
														
															|  | 
 |  | 					"base_patient d " +
 | 
												
													
														
															|  | 
 |  | 					"WHERE a.id=b.consult " +
 | 
												
													
														
															|  | 
 |  | 					"AND b.patient=d.id AND b.doctor='"+doctor+"'";
 | 
												
													
														
															|  | 
 |  | 		}
 | 
												
													
														
															|  | 
 |  | 		
 | 
												
													
														
															|  | 
 |  | 		
 | 
												
													
														
															|  | 
 |  | 		
 | 
												
													
														
															|  | 		List<ConsultVO> result = new ArrayList<>();
 |  | 		List<ConsultVO> result = new ArrayList<>();
 | 
												
													
														
															|  | 		
 |  | 		
 | 
												
													
														
															|  | 		if(!StringUtils.isEmpty(title)){
 |  | 		if(!StringUtils.isEmpty(title)){
 |