package com.zy.asrs.task; import com.baomidou.mybatisplus.mapper.EntityWrapper; import com.zy.asrs.entity.WrkMast; import com.zy.asrs.service.WrkMastService; import com.zy.asrs.task.handler.WcsSchedulerHandler; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import javax.annotation.Resource; import java.util.List; /** * @author pang.jiabao * @description 下位WCS系统相关定时任务 * @createDate 2026/3/4 15:04 */ @Component public class WcsScheduler { @Resource private WrkMastService wrkMastService; @Resource private WcsSchedulerHandler wcsSchedulerHandler; /** * 定时任务读取出库任务派发给WCS */ @Scheduled(cron = "0/10 * * * * ? ") private void outboundTaskDispatch() { List wrkMastList = wrkMastService.selectList(new EntityWrapper().in("io_type", 11, 101, 103, 107, 110).eq("wrk_sts", 11)); for (WrkMast wrkMast : wrkMastList) { wcsSchedulerHandler.outboundTaskDispatch(wrkMast); } } }