From e4d9487314cb32ed27bdcb027bbf43b4e1e3160f Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期五, 06 十二月 2024 13:40:18 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
---
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeCtrl.java | 11 +++--
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voUg/VoUgRtuResult4Success.java | 2
pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voUg/VoUgRtuResult4Failure.java | 4 +-
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/upgrade/UpgradeManager.java | 2
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/upgrade/UpgradeTask.java | 27 +++++++++++++
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeResSv.java | 21 +++++-----
6 files changed, 47 insertions(+), 20 deletions(-)
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voUg/VoUgRtuResult.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voUg/VoUgRtuResult4Failure.java
similarity index 92%
copy from pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voUg/VoUgRtuResult.java
copy to pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voUg/VoUgRtuResult4Failure.java
index 0ee7201..e4c4200 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voUg/VoUgRtuResult.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voUg/VoUgRtuResult4Failure.java
@@ -17,13 +17,13 @@
@Data
@HeadRowHeight(26)
@ContentRowHeight(22)
-public class VoUgRtuResult {
+public class VoUgRtuResult4Failure {
@ExcelProperty("鎺у埗鍣ㄥ湴鍧�")
@ColumnWidth(20)
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
public String rtuAddr;
- @ExcelProperty("鍗囩骇缁撴灉")
+ @ExcelProperty("澶辫触鍘熷洜")
@ColumnWidth(30)
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
public String result;
diff --git a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voUg/VoUgRtuResult.java b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voUg/VoUgRtuResult4Success.java
similarity index 96%
rename from pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voUg/VoUgRtuResult.java
rename to pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voUg/VoUgRtuResult4Success.java
index 0ee7201..80d6abb 100644
--- a/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voUg/VoUgRtuResult.java
+++ b/pipIrr-platform/pipIrr-global/src/main/java/com/dy/pipIrrGlobal/voUg/VoUgRtuResult4Success.java
@@ -17,7 +17,7 @@
@Data
@HeadRowHeight(26)
@ContentRowHeight(22)
-public class VoUgRtuResult {
+public class VoUgRtuResult4Success {
@ExcelProperty("鎺у埗鍣ㄥ湴鍧�")
@ColumnWidth(20)
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/upgrade/UpgradeManager.java b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/upgrade/UpgradeManager.java
index 39943c2..021c224 100644
--- a/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/upgrade/UpgradeManager.java
+++ b/pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/upgrade/UpgradeManager.java
@@ -69,7 +69,7 @@
this.task.forceOver();
}
this.task = new UpgradeTask();
- this.task.initOption(this.lastOpenMaxGoOn, this.failTryTimes, this.ugMaxRtuSameTime);
+ this.task.initOption(this.openNoUpgrade, this.lastOpenMaxGoOn, this.failTryTimes, this.ugMaxRtuSameTime);
this.task.setTask(vo);
this.nowNotifyTimesAfterOver = 0 ;
this.monitorFirst = true ;
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 c5d795e..587b457 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
@@ -35,6 +35,8 @@
@JSONField(serialize = false)
protected Integer ugMaxRtuSameTime ;//鍚屾椂鍗囩骇RTU鏈�澶т釜鏁�
@JSONField(serialize = false)
+ private Boolean openNoUpgrade ;//闃�寮�锛堟车寮�锛変笉鎵ц鍗囩骇
+ @JSONField(serialize = false)
private Integer lastOpenMaxGoOn ;//闃�寮�锛堟车寮�锛夌姸鎬佽缃互鏉ユ寔缁渶闀挎椂闂达紙绉掗挓锛夛紝瓒呰繃杩欎釜鏃堕棿璁や负鐘舵�佹棤鏁堬紙杩欎釜鏃堕暱鍙栧喅浜庡伐浣滄姤闂撮殧锛�
public String setupDt ;//璁剧疆鏃堕棿(yyyy-mm-dd HH:MM:SS)
@@ -64,7 +66,11 @@
/**
* 鍒濆鍖栭厤缃俊鎭�
*/
- public void initOption(Integer lastOpenMaxGoOn, Integer failTryTimes, Integer ugMaxRtuSameTime) {
+ public void initOption(Boolean openNoUpgrade,
+ Integer lastOpenMaxGoOn,
+ Integer failTryTimes,
+ Integer ugMaxRtuSameTime) {
+ this.openNoUpgrade = openNoUpgrade;
this.lastOpenMaxGoOn = lastOpenMaxGoOn;
this.failTryTimes = failTryTimes;
this.ugMaxRtuSameTime = ugMaxRtuSameTime;
@@ -147,6 +153,25 @@
//褰撳墠RTU宸茬粡鍗囩骇瀹屾垚锛屾棤闇�鍐嶅崌绾�
return;
}else{
+ if(this.openNoUpgrade){
+ //棣栧厛鍒ゆ柇鏄惁鏄榾闂ㄦ墦寮�鐘舵��
+ RtuStatus rtuStatus = RtuStatusDealer.oneStatus(rtuAddr) ;
+ if(rtuStatus != null
+ && rtuStatus.valveOpenTrueCloseFalse != null
+ && rtuStatus.valveOpenTrueCloseFalse.booleanValue() == true
+ && rtuStatus.valveStatusLastTimeStamp != null){
+ //鏈夌姸鎬侊紝骞朵笖鏄榾寮�锛堟车寮�锛�
+ Long now = System.currentTimeMillis() ;
+ Long gap = now - rtuStatus.valveStatusLastTimeStamp ;
+ if(gap < this.lastOpenMaxGoOn){
+ //杩欐椂閲囩撼闃�闂ㄦ墦寮�鐘舵�侊紝杩涜�屼笉鑳藉崌绾�
+ ugRtu.isOver = true ;
+ ugRtu.state = UpgradeRtu.STATE_FAILOPEN ;
+ return;
+ }
+ }
+ }
+
if(UpgradeUnit.confVo.ugMaxRtuAtOnce > 0){
//璁剧疆浜嗗悓鏃跺崌绾х殑RTU鏈�澶ф暟閲忕殑闄愬埗
if(ugRtu.state == UpgradeRtuDev.STATE_OFFLINE){
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeCtrl.java
index 146c7c0..77eb655 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeCtrl.java
@@ -12,7 +12,8 @@
import com.dy.pipIrrGlobal.pojoUg.UgRtuProgram;
import com.dy.pipIrrGlobal.pojoUg.UgRtuTask;
import com.dy.pipIrrGlobal.rtuMw.Web2RtuMw;
-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 io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.media.Content;
@@ -233,9 +234,9 @@
@RequestMapping(value = "/exportUgFail", method = RequestMethod.GET)
public void exportUgFail(HttpServletResponse response) throws Exception {
setExcelRespProp(response, "鍗囩骇澶辫触RTU鍒楄〃");
- List<VoUgRtuResult> rsList = resSv.exportUgFail();
+ List<VoUgRtuResult4Failure> rsList = resSv.exportUgFail();
EasyExcel.write(response.getOutputStream())
- .head(VoUgRtuResult.class)
+ .head(VoUgRtuResult4Failure.class)
.excelType(ExcelTypeEnum.XLSX)
.sheet("鍗囩骇澶辫触RTU鍒楄〃")
.doWrite(rsList);
@@ -249,9 +250,9 @@
@RequestMapping(value = "/exportUgSuccess", method = RequestMethod.GET)
public void exportUgSuccess(HttpServletResponse response) throws Exception {
setExcelRespProp(response, "鍗囩骇鎴愬姛RTU鍒楄〃");
- List<VoUgRtuResult> rsList = resSv.exportUgSuccess();
+ List<VoUgRtuResult4Success> rsList = resSv.exportUgSuccess();
EasyExcel.write(response.getOutputStream())
- .head(VoUgRtuResult.class)
+ .head(VoUgRtuResult4Success.class)
.excelType(ExcelTypeEnum.XLSX)
.sheet("鍗囩骇鎴愬姛RTU鍒楄〃")
.doWrite(rsList);
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeResSv.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeResSv.java
index 9e7d9cc..59eb4c2 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeResSv.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtuUpgrage/RtuUpgradeResSv.java
@@ -2,7 +2,8 @@
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;
@@ -105,8 +106,8 @@
* 杩囨护鍑哄綋鍓嶉暱绾т换鍔′腑鍗囩骇澶辫触鐨凴TU
* @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 -> {
@@ -114,22 +115,22 @@
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){
- VoUgRtuResult vo = new VoUgRtuResult() ;
+ 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);
@@ -145,14 +146,14 @@
* 杩囨护鍑哄綋鍓嶉暱绾т换鍔′腑鍗囩骇鎴愬姛鐨凴TU
* @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);
--
Gitblit v1.8.0