From 9bc5106810d7c0e6f27e904b584c9bbfb3725a19 Mon Sep 17 00:00:00 2001 From: wujian <14790700720@163.com> Date: 星期日, 28 四月 2024 17:42:09 +0800 Subject: [PATCH] change model11 --- jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java b/jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java index 8557a51..16821e1 100644 --- a/jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java +++ b/jcdm-main/src/main/java/com/jcdm/main/plcserver/sub/OPCUaSubscription.java @@ -261,8 +261,15 @@ //鑾峰彇杩囩珯璁板綍鐨勬渶澶у伐浣� String maxCode = null; if (CollUtil.isNotEmpty(daPassingStationCollections)){ - DaPassingStationCollection lastOne = daPassingStationCollections.get(daPassingStationCollections.size() - 1); - maxCode = lastOne.getLocationCode(); + List<DaPassingStationCollection> collect2 = daPassingStationCollections.stream().filter(x -> "涓嶅悎鏍�".equals(x.getOutRsSign())).collect(Collectors.toList()); + if (CollUtil.isNotEmpty(collect2)){ + DaPassingStationCollection lastOne = collect2.get(collect2.size() - 1); + maxCode = lastOne.getLocationCode(); + }else { + DaPassingStationCollection lastOne = daPassingStationCollections.get(daPassingStationCollections.size() - 1); + maxCode = lastOne.getLocationCode(); + } + } -- Gitblit v1.9.3