| | |
| | | |
| | | import java.util.*; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | import java.util.concurrent.atomic.AtomicBoolean; |
| | | |
| | | /** |
| | | * @Author: liurunyu |
| | |
| | | if(this.taskVo.rtuAddrList != null && this.taskVo.rtuAddrList.size() > 0){ |
| | | state.rtuTotal = this.taskVo.rtuAddrList.size() ; |
| | | if(this.upgradeRtus != null && this.upgradeRtus.size() > 0){ |
| | | AtomicBoolean hasRunning = new AtomicBoolean(false); |
| | | this.upgradeRtus.values().stream().forEach(info ->{ |
| | | if(info.state == UpgradeRtu.STATE_OFFLINE){ |
| | | state.offLineTotal ++ ; |
| | |
| | | } |
| | | if(info.isOver){ |
| | | state.overTotal++; |
| | | }else{ |
| | | hasRunning.set(true); |
| | | } |
| | | }); |
| | | if(!hasRunning.get()){ |
| | | state.allOver = true ; |
| | | }else{ |
| | | state.allOver = false ; |
| | | } |
| | | } |
| | | } |
| | | return state ; |