自动化立体仓库 - WMS系统
lty
2026-04-16 d514c4c031247ba2903f2eca14ac266e3a36c994
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
package com.zy.asrs.task;
 
import com.core.common.Cools;
import com.zy.asrs.task.core.ReturnT;
import com.zy.asrs.task.handler.AutoEmptyOutHandler;
import com.zy.system.entity.Config;
import com.zy.system.service.ConfigService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
 
@Slf4j
@Component
public class AutoEmptyOutScheduler {
 
 
    @Autowired
    private ConfigService configService;
    @Autowired
    private AutoEmptyOutHandler autoEmptyOutHandler;
 
    //定时空库位预留,空轴出库
    @Scheduled(cron = "0/3 * * * * ? ")
    public void autoEmptyOut() {
 
        Config config = configService.selectConfigByCode("AutoEmptyOut");
        if (Cools.isEmpty(config) || config.getValue().equals("false")) {
            return;
        }
        ReturnT<String> result = autoEmptyOutHandler.start();
        if (!result.isSuccess()) {
            log.error("自动出空轴失败{}", result.getMsg());
        }
    }
 
}