From e17ed3d864eb7da392cf598fbbb15da64a6ff642 Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期四, 25 十二月 2025 15:24:10 +0800
Subject: [PATCH] *

---
 src/main/java/com/zy/core/MainProcess.java |   51 +++++++++++++++++++++++++++------------------------
 1 files changed, 27 insertions(+), 24 deletions(-)

diff --git a/src/main/java/com/zy/core/MainProcess.java b/src/main/java/com/zy/core/MainProcess.java
index 7998686..5fa0dfd 100644
--- a/src/main/java/com/zy/core/MainProcess.java
+++ b/src/main/java/com/zy/core/MainProcess.java
@@ -23,9 +23,9 @@
     // 鎵�灞炵嚎绋�
     private Thread thread;
     private Thread thread2;
-    private Thread thread3;
-    private Thread thread4;
-    private Thread thread5;
+//    private Thread thread3;
+//    private Thread thread4;
+//    private Thread thread5;
 
     /**
      * =====>>  寮�濮嬪伐浣�
@@ -37,21 +37,21 @@
         thread2 = new Thread(this::crnAndDevOtherRun);
         thread2.start();
 
-        thread5 = new Thread(this::demoRun5);
-        thread5.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;
@@ -64,6 +64,8 @@
                 mainService.generateStoreWrkFile(); // 缁勬墭
 //                    mainService.generateStoreWrkFileIsEmptyMk(); // 缁勬墭  绌烘墭
                 mainService.generateStoreWrkFileWalk(); // wms鍏ュ簱浠诲姟涓嬪彂
+                // 鍑哄簱  ===>>  鍫嗗灈鏈哄嚭搴撶珯鍒板嚭搴撶珯
+                mainService.crnStnToOutStn();
                 // 鍏ュ嚭搴�  ===>>  鍫嗗灈鏈哄叆鍑哄簱浣滀笟涓嬪彂
                 mainService.crnIoExecute();
                 // 鍏ュ簱  ===>> 鎵ц瀵瑰伐浣滄。鐨勫畬鎴愭搷浣�
@@ -82,7 +84,7 @@
         while (!Thread.currentThread().isInterrupted()) {
             try {
                 // 闂撮殧
-                Thread.sleep(400);
+                Thread.sleep(200);
                 // 绯荤粺杩愯鐘舵�佸垽鏂�
                 if (!SystemProperties.WCS_RUNNING_STATUS.get()) {
                     continue;
@@ -91,8 +93,6 @@
                 if (SystemProperties.WCS_RUNNING_STATUS_DEMO.get()) {
                     continue;
                 }
-                // 鍑哄簱  ===>>  鍫嗗灈鏈哄嚭搴撶珯鍒板嚭搴撶珯
-                mainService.crnStnToOutStn();
                 // 鍫嗗灈鏈哄紓甯镐俊鎭褰�
                 mainService.recCrnErr();
                 // 杈撻�佺嚎寮傚父淇℃伅璁板綍
@@ -111,7 +111,7 @@
         while (!Thread.currentThread().isInterrupted()) {
             try {
                 // 闂撮殧
-                Thread.sleep(1000);
+                Thread.sleep(210);
                 // 绯荤粺杩愯鐘舵�佸垽鏂�
                 if (!SystemProperties.WCS_RUNNING_STATUS.get()) {
                     continue;
@@ -136,7 +136,7 @@
         while (!Thread.currentThread().isInterrupted()) {
             try {
                 // 闂撮殧
-                Thread.sleep(200);
+                Thread.sleep(100);
                 // 绯荤粺杩愯鐘舵�佸垽鏂�
                 if (!SystemProperties.WCS_RUNNING_STATUS.get()) {
                     continue;
@@ -161,12 +161,12 @@
         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) {
@@ -175,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;
                         }
                     }
@@ -186,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;
                         }
@@ -210,9 +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 (thread5 != null) thread5.interrupt();
+//        if (thread3 != null) thread3.interrupt();
+//        if (thread4 != null) thread4.interrupt();
+//        if (thread5 != null) thread5.interrupt();
     }
 
 }

--
Gitblit v1.9.1