From cffac1169880b8c55aa64517fdcaad118a3a972e Mon Sep 17 00:00:00 2001
From: wujian <14790700720@163.com>
Date: 星期六, 27 四月 2024 22:44:37 +0800
Subject: [PATCH] change model8

---
 jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java |   45 ++++++++++++++++++++++++---------------------
 1 files changed, 24 insertions(+), 21 deletions(-)

diff --git a/jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java b/jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
index 8dcec0c..240336b 100644
--- a/jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
+++ b/jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java
@@ -149,6 +149,8 @@
                     int input = Integer.parseInt(a);
                     ReadWriteEntity entity = new ReadWriteEntity(parts[0]+"."+parts[1]+".CodeCheckFeed", input);
                     log.info("-------鐩戝惉鍒�,{}鐨凜odeCheck鐨勪俊鍙�",Node);
+                    miloService.writeToOpcByte(entity);
+                    log.info("鐩戝惉鍒拌繑鍥瀋odecheckfeed淇″彿锛寋}",entity);
                     //棣栫珯浼犺緭璁㈠崟鍙�
                     if (OPCElement.OP050_HX_CODE_CHECK.equals(Node)){
                         //鏌ヨ璁㈠崟鍙�
@@ -170,7 +172,7 @@
                         rework(SNCode,Node);
                     }
                     System.out.println(entity);
-                miloService.writeToOpcByte(entity);
+
                 }
 
             }
@@ -271,33 +273,34 @@
 //            });
 //        }
 
-        String a=passingStationCollectionServiceImpl.SelectSN(SNCode,parts[1]);
-        if (StrUtil.isNotBlank(a)){
-            int input = Integer.parseInt(a);
-            ReadWriteEntity entity = new ReadWriteEntity(parts[0]+"."+parts[1]+".CodeCheckFeed", input);
-            writeList.add(entity);
-        }
+//        String a=passingStationCollectionServiceImpl.SelectSN(SNCode,parts[1]);
+//        if (StrUtil.isNotBlank(a)){
+//            int input = Integer.parseInt(a);
+//            ReadWriteEntity entity = new ReadWriteEntity(parts[0]+"."+parts[1]+".CodeCheckFeed", input);
+//            writeList.add(entity);
+//        }
         ReadWriteEntity readWriteEntity = new ReadWriteEntity();
-        readWriteEntity.setIdentifier("Repair_sign");
+        readWriteEntity.setIdentifier(parts[0]+"."+parts[1]+".Repair_sign");
         readWriteEntity.setValue(minOP);
-        writeList.add(readWriteEntity);
-        if (CollUtil.isNotEmpty(writeList)){
+        miloService.writeToOpcShort(readWriteEntity);
+        /*if (CollUtil.isNotEmpty(writeList)){
             List<ReadWriteEntity> tempList = new ArrayList<>();
             for (int i = 0; i < writeList.size(); i++) {
-                tempList.add(writeList.get(i));
-                if (tempList.size()>10){
-                    miloService.writeToOpcByte(tempList);
-                    log.info("鍐欏叆杩斾慨锛�,{}",tempList);
-                    tempList = new ArrayList<>();
-                }
+                miloService.writeToOpc();
+//                tempList.add(writeList.get(i));
+//                if (tempList.size()>10){
+//                    miloService.writeToOpcByte(tempList);
+//                    log.info("鍐欏叆杩斾慨锛�,{}",tempList);
+//                    tempList = new ArrayList<>();
+//                }
             }
-            if (CollUtil.isNotEmpty(tempList)){
-                miloService.writeToOpcByte(tempList);
-                log.info("鍐欏叆杩斾慨锛�,{}",tempList);
-            }
+//            if (CollUtil.isNotEmpty(tempList)){
+//                miloService.writeToOpcByte(tempList);
+//                log.info("鍐欏叆杩斾慨锛�,{}",tempList);
+//            }
 
 
-        }
+        }*/
         miloService.writeToOpcByte(writeList);
     }
 

--
Gitblit v1.9.3