自动化立体仓库 - WMS系统
#
18516761980
2021-09-02 6fd276e85c43c6445840caa6e2891b7d3230490a
src/main/java/com/zy/ints/task/WaitMatoutLogScheduler.java
File was renamed from src/main/java/com/zy/ints/task/WaitMatOutLogScheduler.java
@@ -1,12 +1,9 @@
package com.zy.ints.task;
import com.zy.asrs.task.core.ReturnT;
import com.zy.ints.entity.WaitMatin;
import com.zy.ints.entity.WaitMatout;
import com.zy.ints.entity.WaitMatoutLog;
import com.zy.ints.service.WaitMatoutLogService;
import com.zy.ints.service.WaitMatoutService;
import com.zy.ints.task.handler.WaitMatOutLogHandler;
import com.zy.ints.task.handler.WaitMatoutLogHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@@ -15,23 +12,27 @@
import java.util.List;
/**
 * 出库通知档转历史档
 * Created by TQS on 2021/8/31
 */
@Component
public class WaitMatOutLogScheduler {
    private static final Logger log = LoggerFactory.getLogger(WaitMatOutLogScheduler.class);
public class WaitMatoutLogScheduler {
    private static final Logger log = LoggerFactory.getLogger(WaitMatoutLogScheduler.class);
    @Autowired
    private WaitMatoutService waitMatoutService;
    @Autowired
    private WaitMatOutLogHandler waitMatOutLogHandler;
    private WaitMatoutLogHandler waitMatOutLogHandler;
    @Scheduled(cron = "0/3 * * * * ? ")
    @Scheduled(cron = "0/4 * * * * ? ")
    private void execute(){
        List<WaitMatout> waitMatouts = waitMatoutService.selectWaitMatOutBySts();
        for (WaitMatout waitMatout : waitMatouts) {
            ReturnT<String> result = waitMatOutLogHandler.start(waitMatout);
            if (!result.isSuccess()) {
                log.error("出库通知档[billNo={}],[seqNo={}]历史档处理失败", waitMatout.getBillNo(),waitMatout.getSeqNo());
                log.error("出库通知档[billNo={},seqNo={}]历史档处理失败", waitMatout.getBillNo(),waitMatout.getSeqNo());
            }
        }
    }