From 3a6fca8a9ef505301907217ac9d98866fb5eeb3c Mon Sep 17 00:00:00 2001
From: huang <1532065656@qq.com>
Date: 星期二, 25 三月 2025 11:08:57 +0800
Subject: [PATCH] 修改看板表格加滚动,适应大屏

---
 JiuMuMesParent/common/servicebase/src/main/java/com/mes/service/PlcParameter.java |   38 ++++++++++++++++++++++++++++++++++++--
 1 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/JiuMuMesParent/common/servicebase/src/main/java/com/mes/service/PlcParameter.java b/JiuMuMesParent/common/servicebase/src/main/java/com/mes/service/PlcParameter.java
index 02f483a..7445a1c 100644
--- a/JiuMuMesParent/common/servicebase/src/main/java/com/mes/service/PlcParameter.java
+++ b/JiuMuMesParent/common/servicebase/src/main/java/com/mes/service/PlcParameter.java
@@ -13,6 +13,8 @@
 import java.util.HashMap;
 import java.util.Map;
 
+import static com.mes.tools.HexConversion.*;
+
 /**
  * Plc鍙傛暟
  */
@@ -51,6 +53,11 @@
      * 闇�瑕佸啓鍏ョ殑鍊�
      */
     private Object writeValue=null;
+
+    /**
+     * 闇�瑕佸啓鍏ョ殑鍊�
+     */
+    private byte[] writeByte=null;
 
     PlcParameter(){
 
@@ -95,7 +102,18 @@
     }
 
     public Object getReadValue() {
+
         return readValue;
+    }
+    public String getValueString() {
+        return getValueInt()+"";
+    }
+    public int getValueInt() {
+        if(this.readByte==null||this.readByte.length<1){
+            //log.info("璇诲彇鍐呭涓簄ull: {}  :{}",this.getCodeId(),this.readByte);
+            return 0;
+        }
+        return bytesToIntDesc(this.readByte,0);
     }
 
     public void setReadValue(Object readValue) {
@@ -114,7 +132,23 @@
         return writeValue;
     }
 
-    public void setWriteValue(Object writeValue) {
-        this.writeValue = writeValue;
+    public byte [] setWriteValue(Object writeValue) {
+        //浼犲叆鍊兼牴鎹弬鏁扮被鍨嬭繘琛岃浆鎹㈡垚瀛楃涓蹭繚瀛樿繘鍐欏叆 瀛楄妭鍐呭苟涓旇繑鍥�
+        byte []sendByte=new byte[13+this.addressLength];
+        if ("int".equals(this.type)){
+            this.writeByte=intToBytesDesc(Integer.parseInt(writeValue.toString()),this.addressLength);
+            return this.writeByte;
+        }else if ("word".equals(this.type)){
+            this.writeByte=intToBytesDesc(Integer.parseInt(writeValue.toString()),this.addressLength);
+            return this.writeByte;
+        }else if("string".equals(this.type)){
+
+        }else{
+
+        }
+        return null;
+    }
+    public byte [] getWriteByte() {
+        return this.writeByte;
     }
 }

--
Gitblit v1.8.0