*
lsh
2025-08-22 d957e8b917d64f118ef82e6a569e5df233967363
src/main/java/com/zy/core/MainProcess.java
@@ -24,6 +24,7 @@
    private MainServiceImpl mainService;
    // 所属线程
    private Thread thread;
    private Thread thread2;
    // 频率
    private int i = 0;
    private int k = 0;
@@ -33,7 +34,13 @@
     * =====>>  开始工作
     */
    public void start(){
        thread = new Thread(() -> {
        thread = new Thread(this::crnAndDevRun);
        thread.start();
        thread2 = new Thread(this::roboticArmDispatch);
//        thread2.start();
    }
    private void crnAndDevRun() {
            while (!Thread.currentThread().isInterrupted()) {
                try {
@@ -136,13 +143,30 @@
                    e.printStackTrace();
                }
            }
        });
        thread.start();
    }
    private void roboticArmDispatch() {
        while (!Thread.currentThread().isInterrupted()) {
            try {
                // 间隔
                Thread.sleep(1000);
                // 系统运行状态判断
                if (!SystemProperties.WCS_RUNNING_STATUS.get()) {
                    continue;
                }
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
    @PreDestroy
    public void shutDown(){
        if (thread != null) thread.interrupt();
        if (thread2 != null) thread2.interrupt();
    }
}