From 847c9a21a5056884a77443c9d5f1f08919db0a79 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期一, 02 十二月 2024 17:16:03 +0800
Subject: [PATCH] 修改升级协议中的bug,程序存储内存在址增量由0x20改为0x200
---
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeStateReceiverCtrl.java | 20 +++++++++++++++-----
1 files changed, 15 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..37a7fee 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
@@ -42,6 +42,13 @@
private RtuUpgradeSv sv ;
/**
+ * 寮哄埗缁撴潫鍗囩骇浠诲姟閫氫俊涓棿浠舵垚鍔熸墽琛屽悗
+ */
+ public static void afterMwForceOverCurUgTask(){
+ cache = null ;
+ }
+
+ /**
* rtu杩滅▼鍗囩骇浠诲姟閫氫俊涓棿浠舵墽琛屾儏鍐电粺璁″洖鏀�
* @param info 鏁版嵁
* @return 鎿嶄綔缁撴灉
@@ -112,12 +119,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