From c82e2f69dfb8fbeb164f8b7892b4b5ed73483167 Mon Sep 17 00:00:00 2001 From: wuzeyu <1223318623@qq.com> Date: 星期五, 29 十一月 2024 15:51:34 +0800 Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV --- pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeStateReceiverCtrl.java | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeStateReceiverCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeStateReceiverCtrl.java index a235a0c..9a8f18f 100644 --- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeStateReceiverCtrl.java +++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeStateReceiverCtrl.java @@ -112,12 +112,15 @@ private void save2Db(String taskId, List<UpgradeRtu> newList, List<UpgradeRtu> oldList){ List<UpgradeRtu> newOverList = newList.stream().filter(vo -> vo.isOver).collect(Collectors.toList()) ; List<UpgradeRtu> oldNoOverList = newList.stream().filter(vo -> !vo.isOver).collect(Collectors.toList()) ; + boolean oldExist = false ; for(UpgradeRtu nvo : newOverList){ - if(nvo != null) { - if(oldNoOverList.stream().anyMatch(vo -> vo.rtuAddr.equals(nvo.rtuAddr))){ - //涓婃娌℃湁鍗囩骇缁撴潫锛岃�屽綋鍓嶅崌绾х粨鏉熶簡 - this.sv.saveRtuUpgradeState(Long.parseLong(taskId), nvo); - } + oldExist = false ; + if(oldNoOverList.stream().anyMatch(vo -> vo.rtuAddr.equals(nvo.rtuAddr))){ + oldExist = true ; + } + if(!oldExist){ + //涓婃娌℃湁鍗囩骇缁撴潫锛岃�屽綋鍓嶅崌绾х粨鏉熶簡 + this.sv.saveRtuUpgradeState(Long.parseLong(taskId), nvo); } } } -- Gitblit v1.8.0