|  | @ -289,6 +289,16 @@ public class ImService {
 | 
	
		
			
				|  |  | 		return consultCode;
 | 
	
		
			
				|  |  | 	}
 | 
	
		
			
				|  |  | 	
 | 
	
		
			
				|  |  | 	/**
 | 
	
		
			
				|  |  | 	 * 根据咨询Code,查询咨询详情
 | 
	
		
			
				|  |  | 	 * @param consultCode
 | 
	
		
			
				|  |  | 	 * @return
 | 
	
		
			
				|  |  | 	 */
 | 
	
		
			
				|  |  | 	public ConsultTeamDo getConsultTeamDo(String consultCode){
 | 
	
		
			
				|  |  | 		ConsultTeamDo consultTeamDo = consultTeamDao.findByConsult(consultCode);
 | 
	
		
			
				|  |  | 		return consultTeamDo;
 | 
	
		
			
				|  |  | 	}
 | 
	
		
			
				|  |  | 	
 | 
	
		
			
				|  |  | 	/**
 | 
	
		
			
				|  |  | 	 * 查询全科医生与某个医生未结束的专家咨询
 | 
	
		
			
				|  |  | 	 *
 | 
	
	
		
			
				|  | @ -1571,29 +1581,56 @@ public class ImService {
 | 
	
		
			
				|  |  | 			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," +
 | 
	
		
			
				|  |  | 					"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+"'";
 | 
	
		
			
				|  |  | 		}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," +
 | 
	
		
			
				|  |  | 					"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 ";
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 		}
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		List<ConsultVO> result = new ArrayList<>();
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 		if(!StringUtils.isEmpty(title)){
 |