From c85904597bf93e0fbae321093a970dd973b0f64f Mon Sep 17 00:00:00 2001 From: ZengTao <2773468879@qq.com> Date: 星期一, 13 五月 2024 13:54:28 +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