123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- package com.emato.cus.supervise.schedule;
- import com.emato.cus.supervise.biz.acqGoodsMoveSchedule.up.AcqGoodsMoveUpBiz;
- import com.emato.cus.supervise.util.LocalDateTimeUtils;
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.context.annotation.Configuration;
- import org.springframework.scheduling.annotation.EnableScheduling;
- import org.springframework.scheduling.annotation.Scheduled;
- /**
- *
- * 货物库位移动数据 计划任务
- * @author zengjunlin
- * @version 1.0
- * 2018-02-03 15:18
- */
- @Configuration
- @EnableScheduling
- public class AcqGoodsMoveSchedule {
- private static final Logger logger = LoggerFactory.getLogger(AcqGoodsMoveSchedule.class);
- @Autowired
- private AcqGoodsMoveUpBiz acqGoodsMoveUpBiz;
- /**
- * 货物库位移动数据
- */
- //每月1号开始,每天12,18点执行各1次,共2次
- @Scheduled(cron = "0 0 12,18 1/1 * ?")
- public void timerUp() {
- logger.info("==================== 货物库位移动数据:上架:监控数据读取开始 ====================");
- String begDateTime = LocalDateTimeUtils.formatNow(LocalDateTimeUtils.DATA_TIME_HYPHEN);
- logger.info("--- 任务开始时间: {}", begDateTime);
- acqGoodsMoveUpBiz.task();
- String endDateTime = LocalDateTimeUtils.formatNow(LocalDateTimeUtils.DATA_TIME_HYPHEN);
- logger.info("--- 任务结束时间: {}", endDateTime);
- logger.info("==================== 货物库位移动数据:上架:监控数据读取结束 ====================");
- }
- }
|