自动化立体仓库 - WMS系统
chen.llin
昨天 73e42333948a8143c54218cd26435c2233daf279
src/main/java/com/zy/asrs/task/WorkLogScheduler.java
@@ -6,11 +6,13 @@
import com.zy.asrs.service.WrkMastService;
import com.zy.asrs.task.core.ReturnT;
import com.zy.asrs.task.handler.WorkLogHandler;
import com.zy.common.properties.SchedulerProperties;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.util.List;
/**
@@ -29,9 +31,14 @@
    @Autowired
    private TaskService taskService;
    @Resource
    private SchedulerProperties schedulerProperties;
    @Scheduled(cron = "0/3 * * * * ? ")
    private void execute() {
        if (!schedulerProperties.isEnabled()) {
            return;
        }
        List<WrkMast> wrkMasts = wrkMastService.selectToBeHistoryData();
        if (wrkMasts.isEmpty()) {
            return;
@@ -47,6 +54,9 @@
    @Scheduled(cron = "0/3 * * * * ? ")
    private void executeTask(){
        if (!schedulerProperties.isEnabled()) {
            return;
        }
        List<Task> taskList = taskService.selectToBeHistoryData();
        if (taskList.isEmpty()) {
            return;