File was renamed from src/main/java/com/zy/core/CPMainProcess.java |
| | |
| | | @Data |
| | | @Slf4j |
| | | @Component |
| | | public class CPMainProcess { |
| | | public class MainCpProcess { |
| | | |
| | | @Autowired |
| | | private MainServiceImpl mainService; |
| | |
| | | /** |
| | | * =====>> 开始工作 |
| | | */ |
| | | public void start(){ |
| | | public void start() { |
| | | thread = new Thread(() -> { |
| | | while (!Thread.currentThread().isInterrupted()) { |
| | | try { |
| | |
| | | } |
| | | |
| | | //自动派发任务 |
| | | // mainService.autoDistribute(); |
| | | // mainService.autoDistribute(); |
| | | //自动完成任务 |
| | | // mainService.autoCompleteTask(); |
| | | //agv取放货完成 |
| | |
| | | } |
| | | |
| | | @PreDestroy |
| | | public void shutDown(){ |
| | | public void shutDown() { |
| | | if (thread != null) thread.interrupt(); |
| | | } |
| | | |