From 05149e21b3af6534c2d8c3a35c3ee3672ed09af2 Mon Sep 17 00:00:00 2001
From: L <L@132>
Date: 星期六, 24 一月 2026 11:13:01 +0800
Subject: [PATCH] *

---
 src/main/java/com/zy/core/MainProcess.java |   85 +++++++++++++++++++++++++++++-------------
 1 files changed, 59 insertions(+), 26 deletions(-)

diff --git a/src/main/java/com/zy/core/MainProcess.java b/src/main/java/com/zy/core/MainProcess.java
index fd7e5fd..f8a4740 100644
--- a/src/main/java/com/zy/core/MainProcess.java
+++ b/src/main/java/com/zy/core/MainProcess.java
@@ -23,8 +23,9 @@
     // 鎵�灞炵嚎绋�
     private Thread thread;
     private Thread thread2;
-    private Thread thread3;
-    private Thread thread4;
+//    private Thread thread3;
+//    private Thread thread4;
+//    private Thread thread5;
 
     /**
      * =====>>  寮�濮嬪伐浣�
@@ -36,26 +37,29 @@
         thread2 = new Thread(this::crnAndDevOtherRun);
         thread2.start();
 
-        thread3 = new Thread(this::demoRun);
-        thread3.start();
-
-        thread4 = new Thread(this::demoOpenRun);
-        thread4.start();
+//        thread5 = new Thread(this::demoRun5);
+//        thread5.start();
+//
+//        thread3 = new Thread(this::demoRun);
+//        thread3.start();
+//
+//        thread4 = new Thread(this::demoOpenRun);
+//        thread4.start();
     }
 
     private void crnAndDevRun() {
         while (!Thread.currentThread().isInterrupted()) {
             try {
                 // 闂撮殧
-                Thread.sleep(1000);
+                Thread.sleep(700);
                 // 绯荤粺杩愯鐘舵�佸垽鏂�
                 if (!SystemProperties.WCS_RUNNING_STATUS.get()) {
                     continue;
                 }
-                // 绯荤粺婕旂ず妯″紡杩愯鐘舵�佸垽鏂�
-                if (SystemProperties.WCS_RUNNING_STATUS_DEMO.get()) {
-                    continue;
-                }
+//                // 绯荤粺婕旂ず妯″紡杩愯鐘舵�佸垽鏂�
+//                if (SystemProperties.WCS_RUNNING_STATUS_DEMO.get()) {
+//                    continue;
+//                }
                 // 鍏ュ簱  ===>> 鍏ュ簱绔欏埌鍫嗗灈鏈虹珯锛屾牴鎹潯鐮佹壂鎻忕敓鎴愬叆搴撳伐浣滄。
                 mainService.generateStoreWrkFile(); // 缁勬墭
 //                    mainService.generateStoreWrkFileIsEmptyMk(); // 缁勬墭  绌烘墭
@@ -78,19 +82,19 @@
         while (!Thread.currentThread().isInterrupted()) {
             try {
                 // 闂撮殧
-                Thread.sleep(400);
+                Thread.sleep(200);
                 // 绯荤粺杩愯鐘舵�佸垽鏂�
                 if (!SystemProperties.WCS_RUNNING_STATUS.get()) {
                     continue;
                 }
-                // 绯荤粺婕旂ず妯″紡杩愯鐘舵�佸垽鏂�
-                if (SystemProperties.WCS_RUNNING_STATUS_DEMO.get()) {
-                    continue;
-                }
-                // 鍑哄簱  ===>>  鍫嗗灈鏈哄嚭搴撶珯鍒板嚭搴撶珯
-                mainService.crnStnToOutStn();
+//                // 绯荤粺婕旂ず妯″紡杩愯鐘舵�佸垽鏂�
+//                if (SystemProperties.WCS_RUNNING_STATUS_DEMO.get()) {
+//                    continue;
+//                }
                 // 鍫嗗灈鏈哄紓甯镐俊鎭褰�
                 mainService.recCrnErr();
+                // 鍑哄簱  ===>>  鍫嗗灈鏈哄嚭搴撶珯鍒板嚭搴撶珯
+                mainService.crnStnToOutStn();
                 // 杈撻�佺嚎寮傚父淇℃伅璁板綍
 //                    mainService.recDevErr();
                 // 鍑哄簱  ===>> 宸ヤ綔妗d俊鎭啓鍏ed鏄剧ず鍣�
@@ -107,7 +111,7 @@
         while (!Thread.currentThread().isInterrupted()) {
             try {
                 // 闂撮殧
-                Thread.sleep(1000);
+                Thread.sleep(210);
                 // 绯荤粺杩愯鐘舵�佸垽鏂�
                 if (!SystemProperties.WCS_RUNNING_STATUS.get()) {
                     continue;
@@ -128,16 +132,41 @@
         }
     }
 
+    private void demoRun5() {
+        while (!Thread.currentThread().isInterrupted()) {
+            try {
+                // 闂撮殧
+                Thread.sleep(100);
+                // 绯荤粺杩愯鐘舵�佸垽鏂�
+                if (!SystemProperties.WCS_RUNNING_STATUS.get()) {
+                    continue;
+                }
+                // 绯荤粺婕旂ず妯″紡杩愯鐘舵�佸垽鏂�
+                if (!SystemProperties.WCS_RUNNING_STATUS_DEMO.get()) {
+                    continue;
+                }
+                // 绯荤粺婕旂ず妯″紡杩愯鐘舵�佸垽鏂�
+                if (SystemProperties.WCS_RUNNING_STATUS_DEMO_VALUE != 2) {
+                    continue;
+                }
+                // 鍏ュ簱  ===>> 鎵ц瀵瑰伐浣滄。鐨勫畬鎴愭搷浣�
+                mainService.locMastTaskDemo();
+            } catch (Exception e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
     private void demoOpenRun() {
         while (!Thread.currentThread().isInterrupted()) {
             try {
                 // 闂撮殧
-                Thread.sleep(1000);
+                Thread.sleep(50);
                 // 绯荤粺婕旂ず妯″紡杩愯鐘舵�佸彉鍖�
                 if (SystemProperties.WCS_RUNNING_STATUS_DEMO.get()) {
                     if (SystemProperties.WCS_RUNNING_STATUS_DEMO_VALUE == 2) {
                         int signHpMk = mainService.crnStnDEMOStop2();
-                        if (signHpMk != 2) {
+                        if (signHpMk == 0) {
                             SystemProperties.WCS_RUNNING_STATUS_DEMO_VALUE = 3;
                         }
                     } else if (SystemProperties.WCS_RUNNING_STATUS_DEMO_VALUE == 3) {
@@ -146,7 +175,7 @@
                         if (signHpMk && signHpMk2==0) {
                             SystemProperties.WCS_RUNNING_STATUS_DEMO.set(false);
                             SystemProperties.WCS_RUNNING_STATUS_DEMO_VALUE = 0;
-                        } else if (!signHpMk && signHpMk2==2) {
+                        } else if (!signHpMk && signHpMk2 != 0) {
                             SystemProperties.WCS_RUNNING_STATUS_DEMO_VALUE = 2;
                         }
                     }
@@ -157,7 +186,10 @@
                             SystemProperties.WCS_RUNNING_STATUS_DEMO.set(true);
                             SystemProperties.WCS_RUNNING_STATUS_DEMO_VALUE = 2;
                         } else if (signHpMk == 1) {
-                            SystemProperties.WCS_RUNNING_STATUS_DEMO_VALUE = 1;
+//                            SystemProperties.WCS_RUNNING_STATUS_DEMO_VALUE = 1;
+
+                            SystemProperties.WCS_RUNNING_STATUS_DEMO.set(true);
+                            SystemProperties.WCS_RUNNING_STATUS_DEMO_VALUE = 2;
                         } else {
                             SystemProperties.WCS_RUNNING_STATUS_DEMO_VALUE = 0;
                         }
@@ -181,8 +213,9 @@
     public void shutDown() {
         if (thread != null) thread.interrupt();
         if (thread2 != null) thread2.interrupt();
-        if (thread3 != null) thread3.interrupt();
-        if (thread4 != null) thread4.interrupt();
+//        if (thread3 != null) thread3.interrupt();
+//        if (thread4 != null) thread4.interrupt();
+//        if (thread5 != null) thread5.interrupt();
     }
 
 }

--
Gitblit v1.9.1