From ea12b685190254228d88a0de261b1e399fcbf15b Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期四, 25 十二月 2025 15:11:27 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/shzhjxydwcs_cs20251105' into shzhjxydwcs_cs20251105

---
 src/main/java/com/zy/core/MainProcess.java |   65 ++++++++++++++++++++++++--------
 1 files changed, 49 insertions(+), 16 deletions(-)

diff --git a/src/main/java/com/zy/core/MainProcess.java b/src/main/java/com/zy/core/MainProcess.java
index fd7e5fd..5251183 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,18 +37,21 @@
         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(500);
                 // 绯荤粺杩愯鐘舵�佸垽鏂�
                 if (!SystemProperties.WCS_RUNNING_STATUS.get()) {
                     continue;
@@ -78,7 +82,7 @@
         while (!Thread.currentThread().isInterrupted()) {
             try {
                 // 闂撮殧
-                Thread.sleep(400);
+                Thread.sleep(210);
                 // 绯荤粺杩愯鐘舵�佸垽鏂�
                 if (!SystemProperties.WCS_RUNNING_STATUS.get()) {
                     continue;
@@ -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