From c0b596275d583b0874e501f49a90e7a1dfd879e3 Mon Sep 17 00:00:00 2001 From: wuyouming666 <2265557248@qq.com> Date: 星期四, 09 五月 2024 09:37:48 +0800 Subject: [PATCH] Merge branch 'master' of http://10.153.19.25:10101/r/CanadaMes --- 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