diff --git a/src/main/resources/mapper/TBasicMapper.xml b/src/main/resources/mapper/TBasicMapper.xml index 0cc9e92..59c3a2a 100644 --- a/src/main/resources/mapper/TBasicMapper.xml +++ b/src/main/resources/mapper/TBasicMapper.xml @@ -70,10 +70,21 @@ select patient_id - from docus_archivefile.af_collect_task - where create_time >=#{startDate} - and sysflag = #{collectorId} - and state not in('3','4') + from ( + select patient_id + from docus_archivefile.af_collect_task + where create_time >= #{startDate} + and sysflag = #{collectorId} + and state not in ('3', '4') + + union + + select patient_id + from docus_archivefile.af_collect_task + where sync_time >= #{startDate} + and sysflag = #{collectorId} + and state not in ('3', '4') + ) t1 group by patient_id