From 314bc7a1733856bd82c9d99bdfa27b34a4a762c3 Mon Sep 17 00:00:00 2001
From: cl <418351270@qq.com>
Date: 星期一, 22 一月 2024 12:58:37 +0800
Subject: [PATCH] 修改数据采集

---
 guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP010Callback.java |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP010Callback.java b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP010Callback.java
index 5ad2729..dcad12c 100644
--- a/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP010Callback.java
+++ b/guns-vip-main/src/main/java/cn/stylefeng/guns/plcserver/callback/OP010Callback.java
@@ -252,9 +252,9 @@
 
             List<ReadWriteEntity> lists = new ArrayList<>();
             lists.add(new ReadWriteEntity(OPCElement.OP010_S_ORDER_CODE,S_ORDER_CODE));
-            lists.add(new ReadWriteEntity(OPCElement.OP010_S_PRODUCT_CODE,S_PRODUCT_TYPE));
+            lists.add(new ReadWriteEntity(OPCElement.OP010_S_PRODUCT_CODE,Short.parseShort(S_PRODUCT_TYPE)));
             lists.add(new ReadWriteEntity(OPCElement.OP010_S_SFC_CODE,S_SFC_CODE));
-            lists.add(new ReadWriteEntity(OPCElement.OP010_S_NUMBER,result.getPlanQty().toString()));
+            lists.add(new ReadWriteEntity(OPCElement.OP010_S_NUMBER,Short.parseShort(result.getPlanQty().toString())));
             lists.add(new ReadWriteEntity(OPCElement.OP010_J_PC_WRITE_ORDER,true));
             miloService.writeToOpcUa(lists);
             logger.info("OP010宸ヤ綅,handleOrder PC澶勭悊瀹屾垚锛乛--------------------------------------------");
@@ -359,7 +359,7 @@
 
                     List<ReadWriteEntity> lists = new ArrayList<>();
                     lists.add(new ReadWriteEntity(OPCElement.OP010_S_ORDER_CODE,S_ORDER_CODE));
-                    lists.add(new ReadWriteEntity(OPCElement.OP010_S_PRODUCT_CODE,S_PRODUCT_TYPE));
+                    lists.add(new ReadWriteEntity(OPCElement.OP010_S_PRODUCT_CODE,Short.parseShort(S_PRODUCT_TYPE)));
                     lists.add(new ReadWriteEntity(OPCElement.OP010_S_SFC_CODE,S_SFC_CODE));
                     lists.add(new ReadWriteEntity(OPCElement.OP010_P_REPAIR_LOCATION,repairLocationNo));
                     lists.add(new ReadWriteEntity(OPCElement.OP010_J_PC_WRITE_ORDER,true));

--
Gitblit v1.9.3