From 181d7004afefd32b355260a2858a56f685fad029 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期二, 19 十一月 2024 10:04:03 +0800 Subject: [PATCH] global模块pom.xml中<groupId>org.projectlombok</groupId>删除其版本号,原因是platform框架中已经定义了版本号 --- pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/upgrade/UpgradeTask.java | 19 ++++++++++--------- 1 files changed, 10 insertions(+), 9 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 e0b3d13..5ac27f0 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 @@ -76,7 +76,7 @@ if(taskVo.softStartAddr == null || taskVo.softStartAddr.trim().length() != 8){ throw new Exception("绋嬪簭瑕嗙洊璧峰鍦板潃涓嶅悎娉曪紝蹇呴』鏄�8瀛楃锛堝崄鍏繘鍒讹級鐨勫瓧绗︿覆") ; } - if(taskVo.softFileData == null || taskVo.softFileData.length <= 0){ + if(taskVo.softFileData64 == null || taskVo.softFileData64.trim().length() == 0){ throw new Exception("鍗囩骇绋嬪簭鍐呭蹇呴』鎻愪緵") ; } if(taskVo.softBytesCalculate == null){ @@ -96,12 +96,13 @@ this.taskVo = taskVo ; this.upgradeRtus = new HashMap<>(); - if(taskVo.softFileData != null && taskVo.softFileData.length >0){ + if(taskVo.softFileData64 != null && taskVo.softFileData64.trim().equals("")){ + taskVo.softFileData = Base64.getDecoder().decode(taskVo.softFileData64); List<byte[]> listBytes = new HexFileParse().splitBytesByUnit512(taskVo.softFileData); this.softFileDataGrp = listBytes.toArray(new byte[0][]); for(String rtuAddr : this.taskVo.rtuAddrList){ //姝ゆ椂鐘舵�佽缃垚绂荤嚎鐘舵�� - UpgradeRtuDev ugRtu = new UpgradeRtuDev(this, rtuAddr, this.taskVo.softFileData.length, UpgradeRtuDev.STATE_OFFLINE) ; + UpgradeRtuDev ugRtu = new UpgradeRtuDev(this, rtuAddr, this.softFileDataGrp.length, UpgradeRtuDev.STATE_OFFLINE) ; this.upgradeRtus.put(rtuAddr, ugRtu) ; } } @@ -192,18 +193,18 @@ if(this.upgradeRtus != null && this.upgradeRtus.size() > 0){ Collection<UpgradeRtu> col = this.upgradeRtus.values() ; for(UpgradeRtu info : col){ - if(info.state == UpgradeRtuDev.STATE_OFFLINE){ + if(info.state == UpgradeRtu.STATE_OFFLINE){ state.offLineTotal ++ ; - }else if(info.state == UpgradeRtuDev.STATE_UNSTART){ + }else if(info.state == UpgradeRtu.STATE_UNSTART){ state.unStartTotal ++ ; - }else if(info.state == UpgradeRtuDev.STATE_RUNNING){ + }else if(info.state == UpgradeRtu.STATE_RUNNING){ state.runningTotal ++ ; - }else if(info.state == UpgradeRtuDev.STATE_SUCCESS) { + }else if(info.state == UpgradeRtu.STATE_SUCCESS) { state.successTotal++; - }else if(info.state == UpgradeRtuDev.STATE_FAILONE) { + }else if(info.state == UpgradeRtu.STATE_FAILONE) { state.failOneTotal++; state.failTotal++; - }else if(info.state == UpgradeRtuDev.STATE_FAIL) { + }else if(info.state == UpgradeRtu.STATE_FAIL) { state.failTotal++; } if(info.isOver){ -- Gitblit v1.8.0