| | |
| | | import com.zy.asrs.service.WrkMastService; |
| | | import com.zy.asrs.task.core.ReturnT; |
| | | import com.zy.asrs.task.handler.WorkMastHandler; |
| | | import com.zy.common.properties.SchedulerProperties; |
| | | 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; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | @Autowired |
| | | private TaskService taskService; |
| | | |
| | | @Resource |
| | | private SchedulerProperties schedulerProperties; |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void execute() { |
| | | if (!schedulerProperties.isEnabled()) { |
| | | return; |
| | | } |
| | | List<WrkMast> wrkMasts = wrkMastService.selectToBeCompleteData(); |
| | | if (wrkMasts.isEmpty()) { |
| | | return; |
| | |
| | | |
| | | @Scheduled(cron = "0/3 * * * * ? ") |
| | | private void executeTask() { |
| | | if (!schedulerProperties.isEnabled()) { |
| | | return; |
| | | } |
| | | List<Task> wrkMasts = taskService.selectToBeCompleteData(); |
| | | if (wrkMasts.isEmpty()) { |
| | | return; |