From 73bc0656dc15cd9cc95c6f4f51949ef0437088ce Mon Sep 17 00:00:00 2001
From: cl <418351270@qq.com>
Date: 星期五, 23 二月 2024 09:28:13 +0800
Subject: [PATCH] 修改数据采集

---
 guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/DOP020Callback.java |   39 ++-------------------------------------
 1 files changed, 2 insertions(+), 37 deletions(-)

diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/DOP020Callback.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/DOP020Callback.java
index 1ed292d..1360bf9 100644
--- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/DOP020Callback.java
+++ b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/DOP020Callback.java
@@ -38,7 +38,7 @@
 import java.util.List;
 
 @Component
-public class DOP020Callback implements SubscriptionCallback {
+public class DOP020Callback {
 
     public MiloService miloService;
 
@@ -121,42 +121,7 @@
         this.productionOrderRecordsService = productionOrderRecordsService;
         this.productionOrderBatchInfoService = productionOrderBatchInfoService;
     }
-    @Override
-    public void onSubscribe(String identifier, Object value) {
-        String ecpStr = "";//寮傚父璁板綍鏍囪
-        try {
-            //蹇冭烦
-            if(null != value && identifier.equals(OPCElement.DOP020_F_HEART_BEAT)){
-                if( "false".equals(value.toString()))
-                {
-                    ReadWriteEntity entity = new ReadWriteEntity(OPCElement.DOP020_F_HEART_BEAT,true);
-                    miloService.writeToOpcUa(entity);
-                }
-            }
-            //PLC杩涚珯
-            else if(null != value && identifier.equals(OPCElement.DOP020_J_PLC_START)){
-                if("true".equals(value.toString())){
-                    handleOrder();
-                }
-            }
-            //PLC鍑虹珯
-            else if(null != value && identifier.equals(OPCElement.DOP020_J_PLC_FINISH)){
-                if("true".equals(value.toString())){
-                    handleFinsh();
-                    handleInfo();
-                    handleMaterial();
-                }
-            }else{
-                System.out.println("鍊兼病鏈夊彉");
-            }
-        } catch (Exception e) {
-            ecpStr ="鍑虹幇寮傚父锛�" + logUtil.getTrace(e);
-        }finally {
-            if(!"".equals(ecpStr)){
-                logger.info(ecpStr+"\r\n");
-            }
-        }
-    }
+
 
     //PC璇诲伐鍗�
     public void handleOrder() throws Exception {

--
Gitblit v1.9.3