自动化立体仓库 - WMS系统
#
18516761980
2021-09-02 6fd276e85c43c6445840caa6e2891b7d3230490a
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
38
package com.zy.ints.task;
 
import com.zy.asrs.task.core.ReturnT;
import com.zy.ints.entity.WaitMatchk;
import com.zy.ints.service.WaitMatchkService;
import com.zy.ints.task.handler.WaitMatchkLogHandler;
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 java.util.List;
 
/**
 * 盘点通知档转历史档
 * Created by TQS on 2021/9/2
 */
@Component
public class WaitMatchkLogScheduler {
    private static final Logger log = LoggerFactory.getLogger(WaitMatchkLogScheduler.class);
 
    @Autowired
    private WaitMatchkLogHandler waitMatchkLogHandler;
    @Autowired
    private WaitMatchkService waitMatchkService;
 
    @Scheduled(cron = "0/5 * * * * ? ")
    private void execute(){
        List<WaitMatchk> waitMatchks = null;
        for (WaitMatchk waitMatchk : waitMatchks) {
            ReturnT<String> result = waitMatchkLogHandler.start(waitMatchk);
            if (!result.isSuccess()) {
                log.error("盘点通知档[billNo={},locNo={},matNo={}]历史档处理失败", waitMatchk.getBillNo(),waitMatchk.getLocNo(),waitMatchk.getMatNo());
            }
        }
    }
}