| 
															
																@ -1,6 +1,7 @@ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																package com.yihu.wlyy.repository.concern; 
															 | 
															
															 | 
															
																package com.yihu.wlyy.repository.concern; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.wlyy.entity.concern.ConcernDO; 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																import com.yihu.wlyy.entity.concern.ConcernDo; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																import com.yihu.wlyy.entity.concern.ConcernDo; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.wlyy.entity.doctor.profile.Doctor; 
															 | 
															
															 | 
															
																import com.yihu.wlyy.entity.doctor.profile.Doctor; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import com.yihu.wlyy.entity.patient.Patient; 
															 | 
															
															 | 
															
																import com.yihu.wlyy.entity.patient.Patient; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																import io.vavr.collection.List; 
															 | 
															
															 | 
															
																import io.vavr.collection.List; 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -13,12 +14,12 @@ import org.springframework.data.repository.PagingAndSortingRepository; 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 * Created by Administrator on 2018/4/4 0004. 
															 | 
															
															 | 
															
																 * Created by Administrator on 2018/4/4 0004. 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 */ 
															 | 
															
															 | 
															
																 */ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																public interface ConcernDao extends 
															 | 
															
															 | 
															
																public interface ConcernDao extends 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        PagingAndSortingRepository<ConcernDO, Long>, 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																        JpaSpecificationExecutor<ConcernDO> { 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        PagingAndSortingRepository<ConcernDo, Long>, 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																        JpaSpecificationExecutor<ConcernDo> { 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    @Query(" from  ConcernDO where code=?1 ") 
															 | 
															
															 | 
															
																    @Query(" from  ConcernDO where code=?1 ") 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    ConcernDO findByCode(String concernCode); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																    ConcernDo findByCode(String concernCode); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    /** 
															 | 
															
															 | 
															
																    /** 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     * 目前是1个团队一个医生的 所以先这么做 
															 | 
															
															 | 
															
																     * 目前是1个团队一个医生的 所以先这么做 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -26,7 +27,7 @@ public interface ConcernDao extends 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     * @param patientCode 
															 | 
															
															 | 
															
																     * @param patientCode 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     * @return 
															 | 
															
															 | 
															
																     * @return 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     */ 
															 | 
															
															 | 
															
																     */ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    @Query("select d from  ConcernDO c,Doctor d where c.concernDoctorCode=d.code and  c.status=1  and  c.patient=?1  ") 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																    @Query("select d from  ConcernDo c,Doctor d where c.concernDoctorCode=d.code and  c.status=1  and  c.patient=?1  ") 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    List<Doctor> listDoctorsByPatientCode(String patientCode); 
															 | 
															
															 | 
															
																    List<Doctor> listDoctorsByPatientCode(String patientCode); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    /** 
															 | 
															
															 | 
															
																    /** 
															 | 
														
													
												
											
												
													
														
															 | 
															
																@ -35,9 +36,9 @@ public interface ConcernDao extends 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     * @param doctorCode 
															 | 
															
															 | 
															
																     * @param doctorCode 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     * @return 
															 | 
															
															 | 
															
																     * @return 
															 | 
														
													
												
													
														
															| 
															 | 
															
																     */ 
															 | 
															
															 | 
															
																     */ 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    @Query("select p from  ConcernDO c,Patient p where c.patient=p.code and  c.status=1  and  c.concernDoctorCode=?1") 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																    @Query("select p from  ConcernDo c,Patient p where c.patient=p.code and  c.status=1  and  c.concernDoctorCode=?1") 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    List<Patient> listPatientsByDoctorCode(String doctorCode); 
															 | 
															
															 | 
															
																    List<Patient> listPatientsByDoctorCode(String doctorCode); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    @Query(" from  ConcernDO c where  c.status=1  and  c.patient=?1  and  c.concernDoctorCode=?2") 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																    ConcernDO findByPatientAndDoctor(String patientCode, String doctorCode); 
															 | 
															
															 | 
															
																 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																    @Query(" from  ConcernDo c where  c.status=1  and  c.patient=?1  and  c.concernDoctorCode=?2") 
															 | 
														
													
												
													
														
															| 
															 | 
															
																 
															 | 
															
															 | 
															
																    ConcernDo findByPatientAndDoctor(String patientCode, String doctorCode); 
															 | 
														
													
												
													
														
															| 
															 | 
															
																} 
															 | 
															
															 | 
															
																} 
															 |