diff --git a/src/main/java/com/glxp/api/service/thrsys/impl/ThrInvOrderServiceImpl.java b/src/main/java/com/glxp/api/service/thrsys/impl/ThrInvOrderServiceImpl.java index 5a14a0d8b..eedaf99f1 100644 --- a/src/main/java/com/glxp/api/service/thrsys/impl/ThrInvOrderServiceImpl.java +++ b/src/main/java/com/glxp/api/service/thrsys/impl/ThrInvOrderServiceImpl.java @@ -381,8 +381,12 @@ public class ThrInvOrderServiceImpl implements ThrInvOrderService { filterInvProductRequest.setStartDate(stringToDate(days + " 00:00:00")); filterInvProductRequest.setEndDate(stringToDate(days + " 23:59:59")); - handleExternalThrInvPhOrder(filterInvProductRequest); - log.info("自动抓取第三方普耗出入库明细生成单据定时任务结束"); + if (thrInvOrderMapper.countDownloadsInRange(filterInvProductRequest.getStartDate(), filterInvProductRequest.getEndDate()) <= 0) { + handleExternalThrInvPhOrder(filterInvProductRequest); + log.info("自动抓取第三方普耗出入库明细生成单据定时任务结束"); + } else { + log.info("已下载户略"); + } }