陈昶聿
3 天以前 abae517585ad7ff0038c31339d200712c9684556
ruoyi-quartz/src/main/java/com/ruoyi/quartz/task/RyTask.java
@@ -1555,6 +1555,26 @@
        }
    }
    public void collectHISDaysBefore(Long daysBefore) {
        try {
            // 获取昨天0点到今天0点的时间范围
            LocalDateTime todayZero = LocalDateTime.now().with(LocalTime.MIN);
            LocalDateTime daysBeforeZero = todayZero.minusDays(daysBefore);
            DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
            String startTime = daysBeforeZero.format(formatter);
            String endTime = todayZero.format(formatter);
            // HIS数据采集
            log.info("【collectHISDaysBefore】HIS开始采集数据");
            // 立即返回,后台异步执行
            CompletableFuture.runAsync(() -> {
                ichService.syncMedInhosp(startTime, endTime);
            });
            log.info("【collectHISDaysBefore】HIS结束采集数据");
        } catch (Exception e) {
            log.error("【collectHISDaysBefore】HIS数据采集异常", e);
        }
    }
    public Boolean setSuccessPreachForm(ServiceSubtask serviceSubtask, String preachform, String remark, String failSendstate) {
        if (preachform.equals("-1")) {
            //说明都不需要执行了