浏览代码

Merge branch 'dev' of trick9191/patient-co-management into dev

trick9191 8 年之前
父节点
当前提交
e78ea40900

+ 7 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/patient/SignFamilyRenewDao.java

@ -27,9 +27,12 @@ public interface SignFamilyRenewDao extends PagingAndSortingRepository<SignFamil
    @Query(value = "select a from SignFamilyRenew a where a.patient = ?1 and a.status <> -1 and a.status <> -2")
    List<SignFamilyRenew> findAllActiveSignByPatient(String patient);
    @Query(value = "select a from SignFamilyRenew a where a.doctor =?1 and a.patient = ?2 and a.signYear =?3")
    @Query(value = "select a from SignFamilyRenew a where a.doctor =?1 and a.patient = ?2 and a.signYear =?3 ")
    List<SignFamilyRenew> findByDoctorAndPatient(String doctor,String patient,String signYear);
    @Query(value = "select a from SignFamilyRenew a where a.doctor =?1 and a.patient = ?2 and a.signYear =?3 and a.status = 0")
    List<SignFamilyRenew> findByDoctorAndPatientStatus0(String doctor,String patient,String signYear);
    @Query(value = "select a from SignFamilyRenew a where a.doctor =?1 and a.patient = ?2 and a.signYear =?3 and a.status = 1 and a.expensesStatus ='1'")
    List<SignFamilyRenew> findByDoctorAndPatientIsValid(String doctor,String patient,String signYear);
@ -39,6 +42,9 @@ public interface SignFamilyRenewDao extends PagingAndSortingRepository<SignFamil
    @Query(value = "select a from SignFamilyRenew a where a.doctorHealth =?1 and a.patient = ?2 and a.signYear =?3")
    List<SignFamilyRenew> findByDoctorHealthAndPatient(String doctorHealth,String patient,String signYear);
    @Query(value = "select a from SignFamilyRenew a where a.doctorHealth =?1 and a.patient = ?2 and a.signYear =?3 and a.status=0")
    List<SignFamilyRenew> findByDoctorHealthAndPatientStatus0(String doctorHealth,String patient,String signYear);
    // 查询患者已生效的家庭续签约
    @Query("select a from SignFamilyRenew a where a.patient = ?1 and a.type = 2 and a.status = 0")
    SignFamilyRenew findSigningByPatient(String patient);

+ 2 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/SignWebService.java

@ -901,10 +901,10 @@ public class SignWebService extends BaseService {
     */
    public int agreeRenew(String access_token,String dotorCode,String patientCode,String state,Long mesId,String signYear) throws Exception{
        List<SignFamilyRenew> renews =  signFamilyRenewDao.findByDoctorAndPatient(dotorCode,patientCode,signYear);
        List<SignFamilyRenew> renews =  signFamilyRenewDao.findByDoctorAndPatientStatus0(dotorCode,patientCode,signYear);
        if(renews==null||renews.size()==0){
            renews =  signFamilyRenewDao.findByDoctorHealthAndPatient(dotorCode,patientCode,signYear);
            renews =  signFamilyRenewDao.findByDoctorHealthAndPatientStatus0(dotorCode,patientCode,signYear);
        }
        if(renews!=null&&renews.size()>0){