1234567891011121314151617181920212223242526 |
- package com.hw.admin.system.task;
- import com.hw.admin.model.service.WorkPackerService;
- import com.hw.admin.system.utils.DateExUtils;
- import org.slf4j.Logger;
- import org.slf4j.LoggerFactory;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.scheduling.annotation.Scheduled;
- import org.springframework.stereotype.Component;
- @Component
- public class WorkPackerTask {
- private static final Logger LOGGER = LoggerFactory.getLogger(WorkPackerTask.class);
- @Autowired
- private WorkPackerService workPackerService;
- //@Scheduled(cron = "0/60 * * * * ?")
- public void executeScheduledTask2() {
- String time = DateExUtils.commonDatePathStr();
- LOGGER.info("包装机excel数据读取开始:" + time);
- workPackerService.task(time);
- LOGGER.info("包装机excel数据读取结束:" + time);
- }
- }
|