From 6c5963052282dfe4ae2f20d2e18012d1cff93c85 Mon Sep 17 00:00:00 2001 From: pjb <pjb123456> Date: 星期一, 23 六月 2025 08:54:51 +0800 Subject: [PATCH] rgv调度优化 --- src/main/java/com/zy/core/MainProcess.java | 41 ++++++++++++++++++++++++++++------------- 1 files changed, 28 insertions(+), 13 deletions(-) diff --git a/src/main/java/com/zy/core/MainProcess.java b/src/main/java/com/zy/core/MainProcess.java index f5ea417..ff6b6ee 100644 --- a/src/main/java/com/zy/core/MainProcess.java +++ b/src/main/java/com/zy/core/MainProcess.java @@ -5,11 +5,9 @@ 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涓绘祦绋� @@ -29,34 +27,51 @@ 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(1000); + Thread.sleep(500); // 绯荤粺杩愯鐘舵�佸垽鏂� - if (!SystemProperties.WCS_RUNNING_STATUS.get()) { - continue; - } - //鏇存柊浣嶇疆淇℃伅 - mainService.updateStePositionNearby(); +// if (!SystemProperties.WCS_RUNNING_STATUS.get()) { +// continue; +// } - mainService.updateStePosition(); + //鏇存柊灏忚溅鎺掑簭 +// mainService.updateStePositionNearby(); +// //鏇存柊浣嶇疆淇℃伅 +// mainService.updateStePosition(); +// // 浠诲姟涓嬪彂 +// mainService.DevpTaskNoRun(); + + // 灏忚溅鍙栬揣瓒婁綅,浠诲姟鍙栨秷 + mainService.rgvTaskCancel(); // 浠诲姟涓嬪彂 - mainService.DevpTaskNoRun(); + mainService.rgvTheHandlingTaskIsIssued(); // 浠诲姟瀹屾垚 - mainService.rgvCompleteWrkMastSta(); - + mainService.rgvCompleteWrkMastSta(autoZ); //鏇存柊浣嶇疆淇℃伅 - mainService.updateStePosition(); +// mainService.updateStePosition(); } catch (Exception e) { e.printStackTrace(); -- Gitblit v1.9.1