From 300cda64bc2f5ad7fb0a3c057c330ed905d12032 Mon Sep 17 00:00:00 2001 From: zhubaomin <zhubaomin> Date: 星期四, 28 十一月 2024 15:15:08 +0800 Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV --- pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/upgrade/UpgradeTask.java | 20 +++++++++++++++----- 1 files changed, 15 insertions(+), 5 deletions(-) diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/upgrade/UpgradeTask.java b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/upgrade/UpgradeTask.java index 5e11afd..4378bb4 100644 --- a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/upgrade/UpgradeTask.java +++ b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/upgrade/UpgradeTask.java @@ -210,11 +210,15 @@ }else if(info.state == UpgradeRtu.STATE_SUCCESS) { state.successTotal++; }else if(info.state == UpgradeRtu.STATE_FAILONE) { - state.failOneTotal++; - state.failTotal++; + state.dieOneTotal++; + if(info.isOver){ + state.failTotal++; + } }else if(info.state == UpgradeRtu.STATE_FAIL) { - state.failMultiTotal++; - state.failTotal++; + state.dieMultiTotal++; + if(info.isOver) { + state.failTotal++; + } }else if(info.state == UpgradeRtu.STATE_FAILOFFLINE) { state.failTotal++; state.failOffTotal++; @@ -320,20 +324,26 @@ /** * 缁熻闇�瑕佸崌绾т絾褰撳墠绂荤嚎RTU鐨勬儏鍐碉紝瓒呰繃鏃堕檺鐨勮澶囦负鍗囩骇瀹屾垚 + * @return -1:娌℃湁瓒呮椂锛�0瓒呮椂浜嗕笖鏃犲洜绂荤嚎琚己鍒惰缃崌绾у畬鎴愮殑RTU锛�>0绂荤嚎琚己鍒惰缃崌绾у畬鎴愮殑RTU鏁伴噺 */ - protected void countOffRtuAndSetIfOver() { + protected int countOffRtuAndSetIfOver() { Long now = System.currentTimeMillis() ; if(now - this.setupDtLong > UpgradeUnit.confVo.rtuOffLineWaitDuration){ //rtu绂荤嚎锛岀瓑寰呭叾鍗囩骇鐨勬椂闀�(姣)锛岃秴杩囬厤缃殑鏈�澶ф椂闀匡紝璁剧疆鍏跺崌绾уけ璐ワ紝涓旇缃崌绾т换鍔″畬鎴� + int count = 0 ; if (this.taskVo.rtuAddrList != null && this.taskVo.rtuAddrList.size() > 0) { Collection<UpgradeRtu> col = this.upgradeRtus.values() ; for(UpgradeRtu info : col){ if(info.state == UpgradeRtu.STATE_OFFLINE){ info.isOver = true ; info.state = UpgradeRtu.STATE_FAILOFFLINE ; + count ++ ; } } } + return count ; + }else{ + return -1 ; } } -- Gitblit v1.8.0