fix: 查询失败的任务患者根据时间,不止创建,也根据同步时间

master
wyb 3 months ago
parent 4ecbbe1902
commit 844c7b15cc

@ -70,10 +70,21 @@
</select> </select>
<select id="findFailedTaskPatId" resultType="java.lang.String"> <select id="findFailedTaskPatId" resultType="java.lang.String">
select patient_id select patient_id
from docus_archivefile.af_collect_task from (
where create_time >=#{startDate} select patient_id
and sysflag = #{collectorId} from docus_archivefile.af_collect_task
and state not in('3','4') 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 group by patient_id
</select> </select>
<select id="getZyPatientIdsByYzyJzh" resultType="com.docus.server.archive.entity.BasicExtend"> <select id="getZyPatientIdsByYzyJzh" resultType="com.docus.server.archive.entity.BasicExtend">

Loading…
Cancel
Save