自动化立体仓库 - WMS系统
#
lty
7 天以前 d8cbd9c0b6ae133dc0cf09488f124d66296e70ee
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
package com.zy.asrs.task;
 
import com.core.common.Cools;
import com.zy.asrs.task.handler.BareBoardHandler;
import com.zy.common.properties.SlaveWmsParameterProperties;
import com.zy.system.entity.Config;
import com.zy.system.service.ConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
 
import java.util.List;
 
/**
 * Created by Monkey D. Luffy on 2023.10.25
 * 广德宜科..............以下.............广德宜科.............自动补空板再优化
 */
@Component
public class BareBoardScheduler {
 
    @Autowired
    private BareBoardHandler bareBoardHandler;
    @Autowired
    private ConfigService configService;
    @Autowired
    private SlaveWmsParameterProperties slaveWmsParameterProperties;
 
    /*
    * 自动调空板出库
    * */
    @Scheduled(cron = "0/3 * * * * ? ")
    private void execute(){
        if (slaveWmsParameterProperties.isAutomaticFillingBoardStaNosBoolean()){
            Config config = configService.selectConfigByCode("AutomaticFillingBoard");
            if (!Cools.isEmpty(config) && !Cools.isEmpty(config.getValue()) && config.getValue().equals("true")){
                for (Integer staNo : slaveWmsParameterProperties.getAutomaticFillingBoardStaNos()){
                    bareBoardHandler.start(110,staNo,"D");
                }
            }
        }
    }
}