自动化立体仓库 - WMS系统
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
package com.zy.asrs.task;
 
import com.zy.asrs.task.core.ReturnT;
import com.zy.asrs.task.handler.MesPakoutHandler;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
 
import java.io.IOException;
 
/**
 * 轮询MES接口,生成出库单据
 */
@Slf4j
@Component
public class MesPakoutScheduler {
 
    @Autowired
    MesPakoutHandler handler;
 
    //@Scheduled(cron = "0/30 * * * * ?")
    private void execute() {
 
        ReturnT<String> result = null;
        try {
            result = handler.start();
        } catch (IOException e) {
            e.printStackTrace();
        }
        if (!result.isSuccess()) {
            log.error("");
        }
    }
}