From 8b43954926db6b4df6a61ab6e04d6cb11189069d Mon Sep 17 00:00:00 2001
From: 吴健 <14790700720@163.com>
Date: 星期二, 15 四月 2025 08:54:08 +0800
Subject: [PATCH] add-415

---
 jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java |   27 ++++++++++++++++++++++++---
 1 files changed, 24 insertions(+), 3 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 3b3b98f..2cb2892 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
@@ -127,6 +127,9 @@
                                         passingStationCollectionServiceImpl.sendMessage(type+"*"+boxCode,"OP030");
                                     }
 
+                                } else if ("196".equals(type) || "296".equals(type)){
+                                    ReadWriteEntity entity6 = new ReadWriteEntity("CFL4HX.OP030.CodeComplete", 1);
+                                    miloService.writeToOpcByte(entity6);
                                 }
                             }
 
@@ -266,7 +269,7 @@
                     //濡傛灉鏄�佽溅鍨嬶紝鍒ゆ柇鏄惁閲嶅鎵爜
                     if (OPCElement.OP050_CODE_CHECK.equals(Node)){
                         String type = productNewFlag(SNCode);
-                        if (!"280".equals(type) && !"380".equals(type)){
+                        if (!"280".equals(type) && !"380".equals(type) && !"196".equals(type) && !"296".equals(type) ){
                             DaPassingStationCollection passCheck = new DaPassingStationCollection();
                             passCheck.setSfcCode(SNCode);
                             passCheck.setLocationCode("OP060");
@@ -571,7 +574,7 @@
             //60鍙噰闆嗚�佽溅鍨�
             if (OPCElement.OP060_SAVE_REQUEST.equals(Node) || OPCElement.OP060_SAVE_REQUEST_LAST.equals(Node)){
                 String s = productNewFlag(SNCode);
-                if ("280".equals(s) || "380".equals(s)){
+                if ("280".equals(s) || "380".equals(s) || "196".equals(s) || "296".equals(s)){
                     list = new ArrayList<>();
                 }
             }
@@ -582,7 +585,7 @@
                     || OPCElement.OP100_SAVE_REQUEST_LAST.equals(Node)){
                 String s = productNewFlag(SNCode);
                 if (StrUtil.isNotEmpty(s)){
-                    if (!"280".equals(s) && !"380".equals(s)){
+                    if (!"280".equals(s) && !"380".equals(s) && !"196".equals(s)){
                         list = new ArrayList<>();
                     }
                 }
@@ -710,6 +713,10 @@
             type = "280";
         } else if (SNCode.startsWith("380")){
             type = "380";
+        } else if (SNCode.startsWith("196")){
+            type = "196";
+        } else if (SNCode.startsWith("296")){
+            type = "296";
         }else {
             type = "oldType";
         }
@@ -736,6 +743,20 @@
                 }
             } else if ("280".equals(productNewFlag)){
 
+            } else if ("196".equals(productNewFlag)){
+                ReadWriteEntity entity6 = new ReadWriteEntity("CFL4HX.OP040.CodeComplete", 1);
+                miloService.writeToOpcByte(entity6);
+//                ProductNewPassStation passStation = new ProductNewPassStation();
+//                passStation.setSfcCode(SNCode);
+//                List<ProductNewPassStation> productPassStationList = productNewPassStationService.getProductPassStationList(passStation);
+//                if (CollUtil.isNotEmpty(productPassStationList)){
+//                    ProductNewPassStation productNewPassStation = productPassStationList.get(0);
+//                    String boxCode = productNewPassStation.getBoxCode();
+//                    String productType = productNewPassStation.getProductType();
+//                    log.info("鍙戦�佸埌OP040鐨勯〉闈㈡暟鎹畃roductType,{}",productType);
+//                    log.info("鍙戦�佸埌OP040鐨勯〉闈㈡暟鎹産oxCode,{}",boxCode);
+//                    passingStationCollectionServiceImpl.sendMessage(productType+"*"+boxCode, "OP040");
+//                }
             }
         }
     }

--
Gitblit v1.9.3