|
@ -1,6 +1,6 @@
|
|
/*******************************************************************************
|
|
/*******************************************************************************
|
|
* Copyright (c) 2005, 2014 springside.github.io
|
|
* Copyright (c) 2005, 2014 springside.github.io
|
|
*
|
|
|
|
|
|
* <p>
|
|
* 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.patient;
|
|
package com.yihu.wlyy.repository.patient;
|
|
@ -44,7 +44,7 @@ public interface SignFamilyDao extends PagingAndSortingRepository<SignFamily, Lo
|
|
SignFamily findByTeamCode(String TeamCode);
|
|
SignFamily findByTeamCode(String TeamCode);
|
|
|
|
|
|
@Query("select a from SignFamily a where a.teamCode = ?1 and a.type = 2 and a.code=?2")
|
|
@Query("select a from SignFamily a where a.teamCode = ?1 and a.type = 2 and a.code=?2")
|
|
List<SignFamily> findByTeamCodeIsValid(String teamCode,String code);
|
|
|
|
|
|
List<SignFamily> findByTeamCodeIsValid(String teamCode, String code);
|
|
|
|
|
|
@Query("select a from SignFamily a where a.doctor = ?1 and a.patient = ?2 and a.type = 2 and a.status >= 0")
|
|
@Query("select a from SignFamily a where a.doctor = ?1 and a.patient = ?2 and a.type = 2 and a.status >= 0")
|
|
SignFamily findByDoctorPatient(String doctor, String patient);
|
|
SignFamily findByDoctorPatient(String doctor, String patient);
|
|
@ -72,16 +72,16 @@ public interface SignFamilyDao extends PagingAndSortingRepository<SignFamily, Lo
|
|
List<SignFamily> findByDoctorAndPatient(String doctor, String patient);
|
|
List<SignFamily> findByDoctorAndPatient(String doctor, String patient);
|
|
|
|
|
|
@Query(value = "select a from SignFamily a where a.doctor =?1 and a.patient = ?2 and a.status =0 and a.signYear =?3")
|
|
@Query(value = "select a from SignFamily a where a.doctor =?1 and a.patient = ?2 and a.status =0 and a.signYear =?3")
|
|
List<SignFamily> findByDoctorAndPatientOverDue(String doctor,String patient,String signYear);
|
|
|
|
|
|
List<SignFamily> findByDoctorAndPatientOverDue(String doctor, String patient, String signYear);
|
|
|
|
|
|
@Query(value = "select a from SignFamily a where a.doctorHealth =?1 and a.patient = ?2 and a.status =0 and a.signYear =?3")
|
|
@Query(value = "select a from SignFamily a where a.doctorHealth =?1 and a.patient = ?2 and a.status =0 and a.signYear =?3")
|
|
List<SignFamily> findByDoctorHealthAndPatient(String doctorHealth,String patient,String signYear);
|
|
|
|
|
|
List<SignFamily> findByDoctorHealthAndPatient(String doctorHealth, String patient, String signYear);
|
|
|
|
|
|
@Query(value = "select a from SignFamily a where a.doctor =?1 and a.patient = ?2 and a.signYear =?3 and a.status = 1 and a.expensesStatus ='1'")
|
|
@Query(value = "select a from SignFamily a where a.doctor =?1 and a.patient = ?2 and a.signYear =?3 and a.status = 1 and a.expensesStatus ='1'")
|
|
List<SignFamily> findByDoctorAndPatientIsValid(String doctor,String patient,String signYear);
|
|
|
|
|
|
List<SignFamily> findByDoctorAndPatientIsValid(String doctor, String patient, String signYear);
|
|
|
|
|
|
@Query(value = "select a from SignFamily a where a.doctorHealth =?1 and a.patient = ?2 and a.signYear =?3 and a.status = 1 and a.expensesStatus ='1'")
|
|
@Query(value = "select a from SignFamily a where a.doctorHealth =?1 and a.patient = ?2 and a.signYear =?3 and a.status = 1 and a.expensesStatus ='1'")
|
|
List<SignFamily> findByDoctorHealthAndPatientIsValid(String doctorHealth,String patient,String signYear);
|
|
|
|
|
|
List<SignFamily> findByDoctorHealthAndPatientIsValid(String doctorHealth, String patient, String signYear);
|
|
|
|
|
|
@Query("select a from SignFamily a where a.doctor = ?1 and a.patient = ?2 and a.status = 1 and a.type = 2")
|
|
@Query("select a from SignFamily a where a.doctor = ?1 and a.patient = ?2 and a.status = 1 and a.type = 2")
|
|
SignFamily findByFamilyDoctorAndPatient(String doctor, String patient);
|
|
SignFamily findByFamilyDoctorAndPatient(String doctor, String patient);
|
|
@ -288,7 +288,7 @@ public interface SignFamilyDao extends PagingAndSortingRepository<SignFamily, Lo
|
|
SignFamily findFamilySignByPatient(String patientCode);
|
|
SignFamily findFamilySignByPatient(String patientCode);
|
|
|
|
|
|
@Query("select a from SignFamily a where a.patient = ?1 and a.type = 2 and a.status =-4 and a.signYear =?2")
|
|
@Query("select a from SignFamily a where a.patient = ?1 and a.type = 2 and a.status =-4 and a.signYear =?2")
|
|
SignFamily findFamilySignByPatientOverDue(String patientCode,String signYear);
|
|
|
|
|
|
SignFamily findFamilySignByPatientOverDue(String patientCode, String signYear);
|
|
|
|
|
|
@Query("select p.code, p.name, p.photo, p.birthday, p.sex, p.diseaseCondition, p.disease, p.recordAmount,a.type,a.applyDate,p.idcard from SignFamily a,Patient p where (a.doctor = ?1 or a.doctorHealth = ?1) and a.patient = p.code and a.status in (1,2,3)")
|
|
@Query("select p.code, p.name, p.photo, p.birthday, p.sex, p.diseaseCondition, p.disease, p.recordAmount,a.type,a.applyDate,p.idcard from SignFamily a,Patient p where (a.doctor = ?1 or a.doctorHealth = ?1) and a.patient = p.code and a.status in (1,2,3)")
|
|
List<Object> findDoctorSignPatients(String doctor);
|
|
List<Object> findDoctorSignPatients(String doctor);
|
|
@ -309,7 +309,7 @@ public interface SignFamilyDao extends PagingAndSortingRepository<SignFamily, Lo
|
|
List<SignFamily> findByPatients(String patient);
|
|
List<SignFamily> findByPatients(String patient);
|
|
|
|
|
|
@Query("select a from SignFamily a where a.patient = ?1 and a.type =2 and a.signYear =?2")
|
|
@Query("select a from SignFamily a where a.patient = ?1 and a.type =2 and a.signYear =?2")
|
|
List<SignFamily> findByPatientsLastYear(String patient,String signYear);
|
|
|
|
|
|
List<SignFamily> findByPatientsLastYear(String patient, String signYear);
|
|
|
|
|
|
@Query("select a from SignFamily a where a.idcard = ?1 and a.type = 1 and a.status >= 0")
|
|
@Query("select a from SignFamily a where a.idcard = ?1 and a.type = 1 and a.status >= 0")
|
|
SignFamily findBySanshiIdcard(String idcard);
|
|
SignFamily findBySanshiIdcard(String idcard);
|
|
@ -392,4 +392,7 @@ public interface SignFamilyDao extends PagingAndSortingRepository<SignFamily, Lo
|
|
|
|
|
|
@Query(value = "select a from SignFamily a where a.patient = ?1 and a.signYear =?2 and a.status >= 0")
|
|
@Query(value = "select a from SignFamily a where a.patient = ?1 and a.signYear =?2 and a.status >= 0")
|
|
List<SignFamily> findByDoctorAndPatientHossPost(String patient, String signYear);
|
|
List<SignFamily> findByDoctorAndPatientHossPost(String patient, String signYear);
|
|
|
|
|
|
|
|
@Query(value = " select a.* from wlyy_sign_family a where a.patient = ?1 and a.status = -4 order by a.apply_date desc limit 0,1", nativeQuery = true)
|
|
|
|
SignFamily findOutTimeSigningByPatient(String patient);
|
|
}
|
|
}
|