OutFeeSchedule.java 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. package com.emato.cus.supervise.schedule;
  2. import com.emato.cus.supervise.biz.OutFee.OutFeeBiz;
  3. import com.emato.cus.supervise.biz.acqGoodsMoveSchedule.up.AcqGoodsMoveUpBiz;
  4. import com.emato.cus.supervise.util.LocalDateTimeUtils;
  5. import org.slf4j.Logger;
  6. import org.slf4j.LoggerFactory;
  7. import org.springframework.beans.factory.annotation.Autowired;
  8. import org.springframework.context.annotation.Configuration;
  9. import org.springframework.scheduling.annotation.EnableScheduling;
  10. import org.springframework.scheduling.annotation.Scheduled;
  11. /**
  12. *
  13. * 货物库位移动数据 计划任务
  14. * @author zengjunlin
  15. * @version 1.0
  16. * 2018-02-03 15:18
  17. */
  18. @Configuration
  19. @EnableScheduling
  20. public class OutFeeSchedule {
  21. private static final Logger logger = LoggerFactory.getLogger(OutFeeSchedule.class);
  22. @Autowired
  23. private OutFeeBiz outFeeBiz;
  24. /**
  25. *
  26. */
  27. //@Scheduled(cron = "0/10 * * * * ? ")
  28. public void timerUp() {
  29. logger.info("==================== 计算关税开始 ====================");
  30. String begDateTime = LocalDateTimeUtils.formatNow(LocalDateTimeUtils.DATA_TIME_HYPHEN);
  31. logger.info("--- 任务开始时间: {}", begDateTime);
  32. outFeeBiz.task();
  33. String endDateTime = LocalDateTimeUtils.formatNow(LocalDateTimeUtils.DATA_TIME_HYPHEN);
  34. logger.info("--- 任务结束时间: {}", endDateTime);
  35. logger.info("==================== 计算关税结束 ====================");
  36. }
  37. }