From c9b270dae703ee077a4e41013d7662c5e61afd29 Mon Sep 17 00:00:00 2001
From: 野心家 <1051256694@qq.com>
Date: 星期一, 26 五月 2025 23:02:15 +0800
Subject: [PATCH] #ZH

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

diff --git a/src/main/java/com/zy/core/MainProcess.java b/src/main/java/com/zy/core/MainProcess.java
index 3dbda62..2bca69b 100644
--- a/src/main/java/com/zy/core/MainProcess.java
+++ b/src/main/java/com/zy/core/MainProcess.java
@@ -1,11 +1,15 @@
 package com.zy.core;
 
+import com.zy.asrs.service.impl.MainServiceImpl;
 import com.zy.core.properties.SystemProperties;
 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涓绘祦绋�
@@ -16,35 +20,54 @@
 @Component
 public class MainProcess {
 
+    @Autowired
+    private MainServiceImpl mainService;
     // 鎵�灞炵嚎绋�
     private Thread thread;
+    // 棰戠巼
+    private int i = 0;
+    private int j = 0;
+    private int k = 0;
+    private int l = 0;
+    private int[] autoZ = new int[]{0,0,0,0,0,0,0};
 
     /**
      * =====>>  寮�濮嬪伐浣�
      */
     public void start(){
         thread = new Thread(() -> {
+            try{
+                Thread.sleep(200);
+                log.info("++++++++ 寮�濮嬮獙璇佽鍙瘉 ++++++++");
+                if (!mainService.licenseVerify()){
+                    SystemProperties.WCS_RUNNING_STATUS.set(Boolean.FALSE);
+                    log.info("++++++++ 楠岃瘉璁稿彲璇佸け璐� ++++++++");
+                } else {
+                    SystemProperties.WCS_RUNNING_STATUS.set(Boolean.TRUE);
+                    log.info("++++++++ 楠岃瘉璁稿彲璇佹垚鍔� ++++++++");
+                }
+            } catch (Exception e) {}
             while (!Thread.currentThread().isInterrupted()) {
                 try {
+                    // 闂撮殧
+                    Thread.sleep(200);
+
                     // 绯荤粺杩愯鐘舵�佸垽鏂�
-                    if (SystemProperties.WCS_RUNNING_STATUS.get()) {
+                    if (!SystemProperties.WCS_RUNNING_STATUS.get()) {
                         continue;
                     }
 
+                    //鏇存柊浣嶇疆淇℃伅
+                    mainService.updateStePositionNearby();
+                    //鏇存柊浣嶇疆淇℃伅
+                    mainService.updateStePosition();
+                    // 浠诲姟涓嬪彂
+                    mainService.DevpTaskNoRun();
+                    // 浠诲姟瀹屾垚
+                    mainService.rgvCompleteWrkMastSta(autoZ);
+                    //鏇存柊浣嶇疆淇℃伅
+                    mainService.updateStePosition();
 
-
-
-
-
-
-
-
-
-
-
-                    // 闂撮殧
-                    Thread.sleep(1500);
-                    log.info("WCS 宸ヤ綔涓� .....................");
                 } catch (Exception e) {
                     e.printStackTrace();
                 }

--
Gitblit v1.9.1