From 0d3f741da10c048bc4eb25c4b46b842759f54905 Mon Sep 17 00:00:00 2001
From: wuyouming666 <2265557248@qq.com>
Date: 星期五, 26 一月 2024 13:52:24 +0800
Subject: [PATCH] 增加测试位 ,标志位,报警 DB区
---
springboot-vue3/src/main/java/com/example/springboot/entity/device/PlcBitObject.java | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/springboot-vue3/src/main/java/com/example/springboot/entity/device/PlcBitObject.java b/springboot-vue3/src/main/java/com/example/springboot/entity/device/PlcBitObject.java
index 292363b..df222d5 100644
--- a/springboot-vue3/src/main/java/com/example/springboot/entity/device/PlcBitObject.java
+++ b/springboot-vue3/src/main/java/com/example/springboot/entity/device/PlcBitObject.java
@@ -93,6 +93,24 @@
return arrayList;
}
+
+ public List<String> getAddressListByCodeId(List<String> codeIdList) {
+ List<String> addressList = new ArrayList<>();
+ for (String codeId : codeIdList) {
+ for (PlcBitInfo plcBitInfo : plcBitList) {
+ if (plcBitInfo.getCodeId().equals(codeId)) {
+ int index = plcBitInfo.getAddressIndex();
+ String address = plcBitInfo.getAddress(index);
+ if (address != null) {
+ addressList.add(address);
+ }
+ }
+ }
+ }
+ return addressList;
+ }
+
+
/**
* 娣诲姞鍙傛暟瀹炰緥
*
--
Gitblit v1.8.0