From 13610d4b55fb5d2871a4f12e3e8df4ab86bf33f7 Mon Sep 17 00:00:00 2001
From: lsh <lsh@163.com>
Date: 星期四, 17 十月 2024 16:01:55 +0800
Subject: [PATCH] *

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

diff --git a/src/main/java/com/zy/core/MainProcess.java b/src/main/java/com/zy/core/MainProcess.java
index ffc21dc..763721a 100644
--- a/src/main/java/com/zy/core/MainProcess.java
+++ b/src/main/java/com/zy/core/MainProcess.java
@@ -5,9 +5,11 @@
 import lombok.Data;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Component;
 
 import javax.annotation.PreDestroy;
+import java.util.ArrayList;
 
 /**
  * WCS涓绘祦绋�
@@ -22,6 +24,11 @@
     private MainServiceImpl mainService;
     // 鎵�灞炵嚎绋�
     private Thread thread;
+    // 棰戠巼
+    private int i = 0;
+    private int j = 0;
+    private int k = 0;
+    private int l = 0;
 
     /**
      * =====>>  寮�濮嬪伐浣�
@@ -30,32 +37,29 @@
         thread = new Thread(() -> {
             while (!Thread.currentThread().isInterrupted()) {
                 try {
+                    i++; if (i>5) i=0;
+                    j++; if (j>5) j=0;
+                    k++;
+                    if (k>13) {
+                        k=0;
+                        l++;
+                        if (l>3) l=0;
+                    }
+
+
+                    // 闂撮殧
+                    Thread.sleep(1000);
+
                     // 绯荤粺杩愯鐘舵�佸垽鏂�
                     if (!SystemProperties.WCS_RUNNING_STATUS.get()) {
                         continue;
                     }
+                    //鏇存柊浣嶇疆淇℃伅
+                    mainService.updateStePosition();
 
-                    // 闂撮殧
-                    Thread.sleep(1500);
-//                    log.info("WCS 宸ヤ綔涓� .....................");
+                    // 浠诲姟涓嬪彂
+                    mainService.loopSteCharge();
 
-                    // 鍏ュ簱  ===>> 鍏ュ簱绔欏埌鍫嗗灈鏈虹珯锛屾牴鎹潯鐮佹壂鎻忕敓鎴愬叆搴撳伐浣滄。
-//                    mainService.generateStoreWrkFile();
-                    mainService.generateStoreWrkFile2();
-                    // 鎷f枡銆佸苟鏉裤�佺洏鐐瑰啀鍏ュ簱
-                    mainService.stnToCrnStnPick();
-                    // 鍑哄簱  ===>>  鍫嗗灈鏈哄嚭搴撶珯鍒板嚭搴撶珯
-                    mainService.crnStnToOutStn();
-                    // 鍏ュ嚭搴�  ===>>  鍫嗗灈鏈哄叆鍑哄簱浣滀笟涓嬪彂
-                    mainService.crnIoExecute();
-                    // 鍏ュ簱  ===>> 鎵ц瀵瑰伐浣滄。鐨勫畬鎴愭搷浣�
-                    mainService.storeFinished();
-                    // 鍫嗗灈鏈哄紓甯镐俊鎭褰�
-                    mainService.recCrnErr();
-                    // 鍏ュ簱  ===>> 绌烘爤鏉垮垵濮嬪寲鍏ュ簱,鍙夎溅鍏ュ簱绔欐斁璐�
-                    mainService.storeEmptyPlt();
-                    // 鍑哄簱  ===>> 宸ヤ綔妗d俊鎭啓鍏ed鏄剧ず鍣�
-                    mainService.ledExecute();
 
                 } catch (Exception e) {
                     e.printStackTrace();

--
Gitblit v1.9.1