自动化立体仓库 - WMS系统
pang.jiabao
4 天以前 d18505cc87fa30a5b202057bbcc4236986efc80a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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<WrkMast> wrkMastList = wrkMastService.selectList(new EntityWrapper<WrkMast>().in("io_type", 11, 101, 103, 107, 110).eq("wrk_sts", 11));
        for (WrkMast wrkMast : wrkMastList) {
            wcsSchedulerHandler.outboundTaskDispatch(wrkMast);
        }
    }
}