自动化立体仓库 - WMS系统
#
lsh
2025-04-15 e13e9e735faafaca5cdaf114ca384b9cbf089cc4
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
package com.zy.asrs.task.kingdee;
 
import com.core.common.Cools;
import com.zy.asrs.task.kingdee.handler.InboundOrderHandler;
import com.zy.common.entity.Parameter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
 
@Slf4j
@Component
public class InboundOrderScheduler {
 
    @Autowired
    private InboundOrderHandler inboundOrderHandler;
    @Value("${erp.switch.InboundOrderSwitch}")
    private boolean InboundOrderSwitch;
 
    @Scheduled(cron = "0/3 * * * * ? ")
    void login(){
        if(!InboundOrderSwitch){
            return;
        }
        String erpReport = Parameter.get().getErpReport();
        if (!Cools.isEmpty(erpReport) && erpReport.equals("true")) {
            inboundOrderHandler.start();
        }
    }
 
}