| | |
| | | |
| | | import com.dy.common.softUpgrade.state.UpgradeRtu; |
| | | import com.dy.common.webUtil.QueryResultVo; |
| | | import com.dy.pipIrrGlobal.voUg.VoUgRtuResult; |
| | | import com.dy.pipIrrGlobal.voUg.VoUgRtuResult4Failure; |
| | | import com.dy.pipIrrGlobal.voUg.VoUgRtuResult4Success; |
| | | import com.dy.pipIrrGlobal.voUg.VoWatch; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | ok = rtu.state == UpgradeRtu.STATE_OFFLINE |
| | | || rtu.state == UpgradeRtu.STATE_FAILONE |
| | | || rtu.state == UpgradeRtu.STATE_FAIL |
| | | || rtu.state == UpgradeRtu.STATE_FAILOFFLINE; |
| | | || rtu.state == UpgradeRtu.STATE_FAILOFFLINE |
| | | || rtu.state == UpgradeRtu.STATE_FAILOPEN; |
| | | } |
| | | } |
| | | if(qvoRtuAddr != null && !qvoRtuAddr.trim().equals("")){ |
| | |
| | | * 过滤出当前长级任务中升级失败的RTU |
| | | * @return 集合 |
| | | */ |
| | | public List<VoUgRtuResult> exportUgFail(){ |
| | | List<VoUgRtuResult> list = new ArrayList<>() ; |
| | | public List<VoUgRtuResult4Failure> exportUgFail(){ |
| | | List<VoUgRtuResult4Failure> list = new ArrayList<>() ; |
| | | if(RtuUpgradeStateReceiverCtrl.cache != null && RtuUpgradeStateReceiverCtrl.cache.ugTaskId != null){ |
| | | if(RtuUpgradeStateReceiverCtrl.cache.ugRtuStateList != null && RtuUpgradeStateReceiverCtrl.cache.ugRtuStateList.size() > 0) { |
| | | RtuUpgradeStateReceiverCtrl.cache.ugRtuStateList.forEach(rtu -> { |
| | |
| | | if(rtu.state == UpgradeRtu.STATE_OFFLINE |
| | | || rtu.state == UpgradeRtu.STATE_UNSTART |
| | | || rtu.state == UpgradeRtu.STATE_FAILOFFLINE){ |
| | | VoUgRtuResult vo = new VoUgRtuResult() ; |
| | | VoUgRtuResult4Failure vo = new VoUgRtuResult4Failure() ; |
| | | vo.rtuAddr = rtu.rtuAddr ; |
| | | vo.result = "离线" ; |
| | | list.add(vo); |
| | | }else if(rtu.state == UpgradeRtu.STATE_FAILOPEN){ |
| | | VoUgRtuResult4Failure vo = new VoUgRtuResult4Failure() ; |
| | | vo.rtuAddr = rtu.rtuAddr ; |
| | | vo.result = "阀开" ; |
| | | list.add(vo); |
| | | }else if(rtu.state == UpgradeRtu.STATE_FAILONE){ |
| | | VoUgRtuResult vo = new VoUgRtuResult() ; |
| | | VoUgRtuResult4Failure vo = new VoUgRtuResult4Failure() ; |
| | | vo.rtuAddr = rtu.rtuAddr ; |
| | | vo.result = "一包死" ; |
| | | list.add(vo); |
| | | }else if(rtu.state == UpgradeRtu.STATE_FAIL){ |
| | | VoUgRtuResult vo = new VoUgRtuResult() ; |
| | | VoUgRtuResult4Failure vo = new VoUgRtuResult4Failure() ; |
| | | vo.rtuAddr = rtu.rtuAddr ; |
| | | vo.result = "多包死" ; |
| | | list.add(vo); |
| | |
| | | * 过滤出当前长级任务中升级成功的RTU |
| | | * @return 集合 |
| | | */ |
| | | public List<VoUgRtuResult> exportUgSuccess(){ |
| | | List<VoUgRtuResult> list = new ArrayList<>() ; |
| | | public List<VoUgRtuResult4Success> exportUgSuccess(){ |
| | | List<VoUgRtuResult4Success> list = new ArrayList<>() ; |
| | | if(RtuUpgradeStateReceiverCtrl.cache != null && RtuUpgradeStateReceiverCtrl.cache.ugTaskId != null){ |
| | | if(RtuUpgradeStateReceiverCtrl.cache.ugRtuStateList != null && RtuUpgradeStateReceiverCtrl.cache.ugRtuStateList.size() > 0) { |
| | | RtuUpgradeStateReceiverCtrl.cache.ugRtuStateList.forEach(rtu -> { |
| | | if(rtu.isOver){ |
| | | if(rtu.state == UpgradeRtu.STATE_SUCCESS){ |
| | | VoUgRtuResult vo = new VoUgRtuResult() ; |
| | | VoUgRtuResult4Success vo = new VoUgRtuResult4Success() ; |
| | | vo.rtuAddr = rtu.rtuAddr ; |
| | | vo.result = "升级成功" ; |
| | | list.add(vo); |