瀏覽代碼

数据去重

wujunjie 7 年之前
父節點
當前提交
08ade5dcea

+ 2 - 2
patient-co/patient-co-wlyy-job/src/main/java/com/yihu/wlyy/repository/patient/PatientSchemeListDao.java

@ -14,11 +14,11 @@ import java.util.List;
public interface PatientSchemeListDao extends PagingAndSortingRepository<PatientSchemeList, Long>, JpaSpecificationExecutor<PatientSchemeList> {
    //联合wlyy_patient_scheme_list和wlyy_doctor_scheme_blood_pressure查询当天有血糖监测方案且在监测时间前十分钟未上传监测数据
    @Query(value = " select s from PatientSchemeList p,DoctorSchemeBloodSugger s where p.schemecode=s.code and p.type = 1 and s.alertTag = 1 and s.dayofweek = ?1 ")
    @Query(value = " select distinct s from PatientSchemeList p,DoctorSchemeBloodSugger s where p.schemecode=s.code and p.type = 1 and s.alertTag = 1 and s.dayofweek = ?1 ")
    List<DoctorSchemeBloodSugger> findSuggerPatient(short dayOfWeek);
    //联合wlyy_patient_scheme_list和wlyy_doctor_scheme_blood_pressure查询当天有血压监测方案且在监测时间前十分钟未上传监测数据
    @Query(" select s from PatientSchemeList p,DoctorSchemeBloodPressure s where p.schemecode=s.code and p.type=2 and s.alertTag = 1 and s.dayofweek = ?1 ")
    @Query(" select distinct s from PatientSchemeList p,DoctorSchemeBloodPressure s where p.schemecode=s.code and p.type=2 and s.alertTag = 1 and s.dayofweek = ?1 ")
    List<DoctorSchemeBloodPressure> findPressurePatient(short dayOfWeek);
    //根据schemecode查询患者监测方案