jiangping
2023-10-26 5a4e4f0ac1e40f45ce4e78b1ae57637c84a64fc7
server/src/main/java/doumeemes/task/ScheduleTool.java
@@ -3,6 +3,7 @@
import doumeemes.biz.system.SystemDictDataBiz;
import doumeemes.core.utils.DateUtil;
import doumeemes.service.business.BizLingyangService;
import doumeemes.service.business.PlansService;
import doumeemes.service.ext.*;
import doumeemes.service.system.SystemDictService;
@@ -11,6 +12,8 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import java.util.Date;
/**
 * 定时任务
@@ -24,6 +27,8 @@
    public RabbitTemplate rabbitTemplate;
    @Autowired
    DepartmentExtService departmentExtService;
    @Autowired
    BizLingyangService bizLingyangService;
    @Autowired
    BarcodeParamExtService barcodeParamExtService;
    @Autowired
@@ -95,6 +100,18 @@
        departmentExtService.initCompnayCodes();
        System.out.println("定时加载数据code缓存信息--------end------");
    }
    /**
     * 每天定时统计羚羊数据信息
     * @throws Exception
     */
    @Scheduled(cron="0 59 23 * * ?")
//    @Scheduled(fixedDelay = 1000 * 60 * 60 * 1)
    public void syncLingData() throws Exception {
        System.out.println("每天定时统计羚羊数据信息--------Begin------");
        //TODO--------------每天定时统计羚羊数据信息------------
        bizLingyangService.syncLingData(new Date());
        System.out.println("每天定时统计羚羊数据信息--------end------");
    }
    /**
     * 每天凌晨定点关闭不能关闭的计划