自动化立体仓库 - WMS系统
admin
2021-09-01 e84d4700e32dba450aa4d239779fc39f38ae4afa
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
package com.zy.ints.task;
 
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.core.annotations.ManagerAuth;
import com.core.common.BaseRes;
import com.core.common.Cools;
import com.core.common.DateUtils;
import com.core.common.R;
import com.zy.asrs.task.core.ReturnT;
import com.zy.common.web.BaseController;
import com.zy.ints.entity.IoComplete;
import com.zy.ints.entity.IoCompleteLog;
import com.zy.ints.entity.WaitMatin;
import com.zy.ints.service.IoCompleteLogService;
import com.zy.ints.service.IoCompleteService;
import com.zy.ints.service.WaitMatinService;
import com.zy.ints.task.handler.IoCompleteLogHandler;
import com.zy.ints.task.handler.WaitMatinLogHandler;
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 org.springframework.web.bind.annotation.*;
 
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
 
/**
 * 回报档管理转回报历史档
 * Created by TQS on 2021/8/31
 */
@Component
public class IoCompleteLogScheduler {
 
    private static final Logger log = LoggerFactory.getLogger(IoCompleteLogScheduler.class);
 
    @Autowired
    private IoCompleteLogHandler ioCompleteLogHandler;
 
    @Autowired
    private IoCompleteService ioCompleteService;
 
 
    @Scheduled(cron = "0/3 * * * * ? ")
    private void execute(){
        List<IoComplete> ioCompletes = ioCompleteService.selectIoCompleteBySts();
        for (IoComplete ioComplete : ioCompletes) {
            ReturnT<String> result = ioCompleteLogHandler.start(ioComplete);
            if (!result.isSuccess()) {
                log.error("回报档[billNo={}],[seqNo={}]历史档处理失败", ioComplete.getBillNo(),ioComplete.getSeqNo());
            }
        }
    }
}