WorkPackerTask.java 875 B

1234567891011121314151617181920212223242526
  1. package com.hw.admin.system.task;
  2. import com.hw.admin.model.service.WorkPackerService;
  3. import com.hw.admin.system.utils.DateExUtils;
  4. import org.slf4j.Logger;
  5. import org.slf4j.LoggerFactory;
  6. import org.springframework.beans.factory.annotation.Autowired;
  7. import org.springframework.scheduling.annotation.Scheduled;
  8. import org.springframework.stereotype.Component;
  9. @Component
  10. public class WorkPackerTask {
  11. private static final Logger LOGGER = LoggerFactory.getLogger(WorkPackerTask.class);
  12. @Autowired
  13. private WorkPackerService workPackerService;
  14. //@Scheduled(cron = "0/60 * * * * ?")
  15. public void executeScheduledTask2() {
  16. String time = DateExUtils.commonDatePathStr();
  17. LOGGER.info("包装机excel数据读取开始:" + time);
  18. workPackerService.task(time);
  19. LOGGER.info("包装机excel数据读取结束:" + time);
  20. }
  21. }