| | |
| | | import lombok.Data; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.PreDestroy; |
| | | import java.util.ArrayList; |
| | | import java.util.Calendar; |
| | | |
| | | /** |
| | | * WCS主流程 |
| | |
| | | private MainServiceImpl mainService; |
| | | // 所属线程 |
| | | private Thread thread; |
| | | // 频率 |
| | | private int i = 0; |
| | | |
| | | /** |
| | | * =====>> 开始工作 |
| | |
| | | // 间隔 |
| | | Thread.sleep(1000); |
| | | |
| | | Calendar calendar = Calendar.getInstance(); |
| | | int year = calendar.get(Calendar.YEAR); |
| | | int month = calendar.get(Calendar.MONTH) + 1; |
| | | int day = calendar.get(Calendar.DAY_OF_MONTH); |
| | | if (year >= 2024 && month >=6 && day >= 1){ |
| | | continue; |
| | | } |
| | | |
| | | // 系统运行状态判断 |
| | | if (!SystemProperties.WCS_RUNNING_STATUS.get()) { |
| | | continue; |
| | |
| | | |
| | | // 演示 |
| | | mainService.crnDemoOfLocMove1(); |
| | | |
| | | // 入出库模式切换函数 |
| | | // mainService.ioConvert(); |
| | | // 入库 ===>> 入库站到堆垛机站,根据条码扫描生成入库工作档 |
| | | mainService.generateStoreWrkFile(); // 组托 |
| | | mainService.generateStoreWrkFile0(); // WMS入库 |
| | |
| | | // 其他 ===>> LED显示器复位,显示默认信息 |
| | | mainService.ledReset(); |
| | | |
| | | mainService.outOfDevp(); |
| | | |
| | | // 其他 ===>> 入出库模式切换 |
| | | i++; |
| | | if (i > 1) { |
| | | mainService.ioConvert(); |
| | | i = 0; |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |