Przeglądaj źródła

删除 'slope-modules/slope-detection/src/main/java/com/sckw/slope/detection/service/task/ReportTemplateTaskService.java'

冷发强 2 lat temu
rodzic
commit
242a8b82ef

+ 0 - 63
slope-modules/slope-detection/src/main/java/com/sckw/slope/detection/service/task/ReportTemplateTaskService.java

@@ -1,63 +0,0 @@
-package com.sckw.slope.detection.service.task;
-
-import cn.hutool.core.date.DateUtil;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.sckw.core.model.enums.ReportTypeEnum;
-import com.sckw.core.utils.StringUtils;
-import com.sckw.slope.detection.dao.mysql.KwsReportTemplateMapper;
-import com.sckw.slope.detection.model.dos.mysql.KwsReportTemplate;
-import jakarta.annotation.Resource;
-import lombok.extern.slf4j.Slf4j;
-import org.springframework.scheduling.annotation.EnableScheduling;
-import org.springframework.stereotype.Component;
-import org.springframework.util.CollectionUtils;
-
-import java.time.LocalDateTime;
-import java.util.List;
-
-/**
- * @author lfdc
- * @description 报表任务
- * @date 2023-11-10 11:11:25
- */
-
-@Slf4j
-@Component
-@EnableScheduling
-public class ReportTemplateTaskService {
-
-    @Resource
-    KwsReportTemplateMapper reportTemplateMapper;
-
-    /**
-     * 报表生成定时任务
-     */
-    //    @Scheduled(cron = "0 0 0 ? * *")
-    public void templateTask() {
-        List<KwsReportTemplate> kwsReportTemplates = reportTemplateMapper.selectList(new LambdaQueryWrapper<KwsReportTemplate>()
-                .eq(KwsReportTemplate::getStatus, 0)
-                .eq(KwsReportTemplate::getDelFlag, 0));
-        if (!CollectionUtils.isEmpty(kwsReportTemplates)) {
-            for (KwsReportTemplate kwsReportTemplate : kwsReportTemplates) {
-                Integer type = kwsReportTemplate.getType();
-                if (ReportTypeEnum.DAY.getCode() == type) {
-                    LocalDateTime localDateTime = LocalDateTime.now().minusDays(1);
-                    LocalDateTime dateEnd = com.sckw.excel.utils.DateUtil.localDateToLocalDateTimeEnd(localDateTime.toLocalDate());
-                    LocalDateTime dateStart = com.sckw.excel.utils.DateUtil.localDateToLocalDateTimeStart(localDateTime.toLocalDate());
-                    String partNames = kwsReportTemplate.getPartNames();
-                    String intergrationNames = kwsReportTemplate.getIntergrationNames();
-                    List<String> stringList = StringUtils.splitStrToList(partNames, String.class);
-
-                }
-                if (ReportTypeEnum.WEEK.getCode() == type) {
-                    if (2 != DateUtil.thisDayOfWeekEnum().getValue()) {
-                        continue;
-                    }
-                }
-                if (ReportTypeEnum.MONTH.getCode() == type) {
-
-                }
-            }
-        }
-    }
-}