| | |
| | | import com.dy.common.util.DateTime; |
| | | import com.dy.common.util.ThreadJob; |
| | | import com.dy.common.webUtil.BaseResponse; |
| | | import com.dy.pipIrrGlobal.pojoRm.UgRtuProgram; |
| | | import com.dy.pipIrrGlobal.pojoRm.UgRtuTask; |
| | | import com.dy.pipIrrGlobal.pojoUg.UgRtuProgram; |
| | | import com.dy.pipIrrGlobal.pojoUg.UgRtuTask; |
| | | import io.swagger.v3.oas.annotations.Hidden; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | UgRtuTask tpo = this.sv.selectLastTask() ; |
| | | if(tpo != null) { |
| | | UgRtuProgram ppo = this.sv.selectProgramById(tpo.programId); |
| | | if (ppo == null) { |
| | | if (ppo != null) { |
| | | List<String> taskRtuAddrs = this.sv.selectAllRtuAddrByTask("" + tpo.id); |
| | | if (taskRtuAddrs != null && taskRtuAddrs.size() > 0) { |
| | | cache = new UpgradeInfo(); |
| | |
| | | while (true){ |
| | | for(UpgradeRtu rtu : cache.ugRtuStateList){ |
| | | this.rtuUpgrade(rtu) ; |
| | | hasRunning = this.statisticsNowUpgradeState() ; |
| | | if(!hasRunning){ |
| | | break ; |
| | | } |
| | | } |
| | | hasRunning = this.statisticsNowUpgradeState() ; |
| | | if(!hasRunning){ |
| | | break ; |
| | | } |
| | |
| | | public boolean statisticsNowUpgradeState() { |
| | | boolean hasRunning = false ; |
| | | if(cache.ugRtuStateList != null && cache.ugRtuStateList.size() > 0){ |
| | | cache.ugOverallState.init(); |
| | | for(UpgradeRtu rtu : cache.ugRtuStateList){ |
| | | if(rtu.state == UpgradeRtu.STATE_OFFLINE){ |
| | | cache.ugOverallState.offLineTotal ++ ; |