From 28ded8102d83cf74bc232d1cdfc89b7f22c41952 Mon Sep 17 00:00:00 2001
From: wu <731351411@qq.com>
Date: 星期二, 03 十二月 2024 09:09:31 +0800
Subject: [PATCH] 增加点击防抖事件 增加笼子使用详情的计算优化。 增加数据推送时的报错处理 测量台交互逻辑增加 参数界面增加翻转加减速度

---
 springboot-vue3/src/main/java/com/example/springboot/component/PlcHoldNew.java |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/springboot-vue3/src/main/java/com/example/springboot/component/PlcHoldNew.java b/springboot-vue3/src/main/java/com/example/springboot/component/PlcHoldNew.java
index dbf369f..8a11960 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/component/PlcHoldNew.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/component/PlcHoldNew.java
@@ -28,10 +28,10 @@
       } catch (InterruptedException e) {
         e.printStackTrace();
       }
-
       storageCageService = WebSocketServer.applicationContext.getBean(StorageCageService.class);
       spianService = WebSocketServer.applicationContext.getBean(SpianServiceNew.class);
       albaniaMapper = WebSocketServer.applicationContext.getBean(AlbaniaMapper.class);
+  
       // spianService.selectout(1);
       // spianService.mateOut();
       // 璇诲彇DB14鍖烘枃浠�
@@ -43,6 +43,7 @@
         String IDStatus1 = plcmes.getPlcParameter("IDStatus1").getValue();// 1鍙蜂换鍔″畬鎴�
         String MESToPLCStatus1 = plcmes.getPlcParameter("MESToPLCStatus1").getValue();// 1鍙风‘璁ゅ瓧
         String MESToPLC = plcmes.getPlcParameter("MESToPLC").getValue();// 鍙戦�佷换鍔″瓧
+        String GaToMES = plcmes.getPlcParameter("GaToMES").getValue();// 娴嬮噺鎴愬姛淇″彿
         
         int taskcont = albaniaMapper.SelectTaskcount(); // 姝e湪杩涜鐨勪换鍔℃暟閲�
         int outtask = albaniaMapper.SelectOutTaskCount(); // 绛夊緟琛ュ彂鐨勫嚭鐗囦换鍔℃暟閲�
@@ -81,7 +82,7 @@
             //     .println("鍑虹墖鐘舵��:MESToPLC:" + MESToPLC + "PLCToMES:" + PLCToMES + "MESToPLCStatus1:" + MESToPLCStatus1);
             spianService.selectout(1);
             try {
-              Thread.sleep(200); // 姣�100姣妫�鏌ヤ竴娆�
+              Thread.sleep(100); // 姣�100姣妫�鏌ヤ竴娆�
             } catch (InterruptedException e) {
               Thread.currentThread().interrupt(); // 澶勭悊绾跨▼涓柇
             }
@@ -94,15 +95,13 @@
         MESToPLC = plcmes.getPlcParameter("MESToPLC").getValue();// 鍙戦�佷换鍔″瓧
         // 杩愰�佽溅璇锋眰鍜屾祴閲忓畬鎴愯姹�
         GlassInfo glass = albaniaMapper.SelectGlass();
-        if (PLCToMES != null && glass != null && MESToPLC != null && taskcont == 0) {
-          if (PLCToMES.equals("1") == true && MESToPLC.equals("0") == true && MESToPLCStatus1.equals("0") == true&&outtask == 0) {
+        if (PLCToMES != null && glass != null && MESToPLC != null) {
+          if (PLCToMES.equals("1")&& MESToPLC.equals("0")&&("1".equals(GaToMES)||"2".equals(GaToMES))&& taskcont == 0) {
             try {
               Thread.sleep(100); // 姣�100姣妫�鏌ヤ竴娆�
             } catch (InterruptedException e) {
               Thread.currentThread().interrupt(); // 澶勭悊绾跨▼涓柇
             }
-            // System.out
-            //     .println("杩涚墖鐘舵��:MESToPLC:" + MESToPLC + "PLCToMES:" + PLCToMES + "MESToPLCStatus1:" + MESToPLCStatus1);
             spianService.selectAll(glass);
           }
         }

--
Gitblit v1.8.0