|  | @ -1,7 +1,7 @@
 | 
												
													
														
															|  | /*******************************************************************************
 |  | /*******************************************************************************
 | 
												
													
														
															|  |  * Copyright (c) 2005, 2014 springside.github.io
 |  |  * Copyright (c) 2005, 2014 springside.github.io
 | 
												
													
														
															|  |  *
 |  |  *
 | 
												
													
														
															|  |  * Licensed under the Apache License, Version 2.0 (the "License");
 |  | 
 | 
												
													
														
															|  | 
 |  |  * Licensed under the Apache License, Version 2.0 (the "License").
 | 
												
													
														
															|  |  *******************************************************************************/
 |  |  *******************************************************************************/
 | 
												
													
														
															|  | package com.yihu.wlyy.repository.consult;
 |  | package com.yihu.wlyy.repository.consult;
 | 
												
													
														
															|  | 
 |  | 
 | 
												
											
												
													
														
															|  | @ -195,12 +195,18 @@ public interface ConsultTeamDao extends PagingAndSortingRepository<ConsultTeam,
 | 
												
													
														
															|  | 	//名医咨询 -根据status 带symptoms
 |  | 	//名医咨询 -根据status 带symptoms
 | 
												
													
														
															|  | 	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and b.to = ?1 and a.id < ?2 and a.symptoms like ?3 and a.status = ?4 and a.del = '1' and b.del = '1' and b.from is null")
 |  | 	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and b.to = ?1 and a.id < ?2 and a.symptoms like ?3 and a.status = ?4 and a.del = '1' and b.del = '1' and b.from is null")
 | 
												
													
														
															|  | 	Page<ConsultTeam> findFamousDoctorDoingList(String uid, long id,String title,Integer type, Pageable pageRequest);
 |  | 	Page<ConsultTeam> findFamousDoctorDoingList(String uid, long id,String title,Integer type, Pageable pageRequest);
 | 
												
													
														
															|  | 	//名医咨询 -根据status 带symptoms
 |  | 
 | 
												
													
														
															|  | 
 |  | 	//名医咨询 -根据status 带symptoms+
 | 
												
													
														
															|  | 	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 )and b.to = ?1 and a.symptoms like ?2 and a.status = ?3 and a.del = '1' and b.del = '1' and b.from is null")
 |  | 	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 )and b.to = ?1 and a.symptoms like ?2 and a.status = ?3 and a.del = '1' and b.del = '1' and b.from is null")
 | 
												
													
														
															|  | 	Page<ConsultTeam> findFamousDoctorDoingList(String uid,String title,Integer type, Pageable pageRequest);
 |  | 	Page<ConsultTeam> findFamousDoctorDoingList(String uid,String title,Integer type, Pageable pageRequest);
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 	@Query("select a from ConsultTeam a where  a.type=?3  and a.del = '1' and a.patient=?1 and a.doctor=?2 and  a.status=0 ")
 |  | 	@Query("select a from ConsultTeam a where  a.type=?3  and a.del = '1' and a.patient=?1 and a.doctor=?2 and  a.status=0 ")
 | 
												
													
														
															|  | 	ConsultTeam findByParientCodeAndSignTypeAndDoctor(String patientCode, String doctor, int s);
 |  | 	ConsultTeam findByParientCodeAndSignTypeAndDoctor(String patientCode, String doctor, int s);
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  | 	//新增查询未结束咨询患者
 | 
												
													
														
															|  | 
 |  | 	@Query("select distinct a.patient from ConsultTeam a where a.type=2  and a.del = '1' and a.doctor=?1 and  a.status=0 ")
 | 
												
													
														
															|  | 
 |  | 	List<String> findParientListByDoctor(String doctor) throws Exception;
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 	//名医咨询 -全部 带symptoms 未处理、未回复
 |  | 	//名医咨询 -全部 带symptoms 未处理、未回复
 | 
												
													
														
															|  | 	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and a.type=6 and b.to = ?1 and a.id < ?2 and a.symptoms like ?3 and a.status = 0 and (a.doctorRead > 0 or b.reply <> 1) and a.del = '1' and b.del = '1' and b.from is null")
 |  | 	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and a.type=6 and b.to = ?1 and a.id < ?2 and a.symptoms like ?3 and a.status = 0 and (a.doctorRead > 0 or b.reply <> 1) and a.del = '1' and b.del = '1' and b.from is null")
 | 
												
													
														
															|  | 	Page<ConsultTeam> findFamousDoctorUnReplyReadList(String uid, long id,String title, Pageable pageRequest);
 |  | 	Page<ConsultTeam> findFamousDoctorUnReplyReadList(String uid, long id,String title, Pageable pageRequest);
 |