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 |   46 +++++++++++++++++++++++++++++++---------------
 1 files changed, 31 insertions(+), 15 deletions(-)

diff --git a/src/main/java/com/zy/core/MainProcess.java b/src/main/java/com/zy/core/MainProcess.java
index 3dbda62..763721a 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,8 +20,15 @@
 @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;
 
     /**
      * =====>>  寮�濮嬪伐浣�
@@ -26,25 +37,30 @@
         thread = new Thread(() -> {
             while (!Thread.currentThread().isInterrupted()) {
                 try {
-                    // 绯荤粺杩愯鐘舵�佸垽鏂�
-                    if (SystemProperties.WCS_RUNNING_STATUS.get()) {
-                        continue;
+                    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(1500);
-                    log.info("WCS 宸ヤ綔涓� .....................");
+                    Thread.sleep(1000);
+
+                    // 绯荤粺杩愯鐘舵�佸垽鏂�
+                    if (!SystemProperties.WCS_RUNNING_STATUS.get()) {
+                        continue;
+                    }
+                    //鏇存柊浣嶇疆淇℃伅
+                    mainService.updateStePosition();
+
+                    // 浠诲姟涓嬪彂
+                    mainService.loopSteCharge();
+
+
                 } catch (Exception e) {
                     e.printStackTrace();
                 }

--
Gitblit v1.9.1