From dfe65c30a3fa372af98e8341ea46b1c4bf7cc725 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期五, 13 十二月 2024 11:35:55 +0800
Subject: [PATCH] 增补属性的json中的顺序
---
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/server/upgrade/UpgradeManager.java | 16 ++++++++++++++--
1 files changed, 14 insertions(+), 2 deletions(-)
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 bd52b71..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
@@ -25,13 +25,15 @@
private static final UpgradeManager INSTANCE = new UpgradeManager();
+ private Boolean openNoUpgrade ;//闃�寮�锛堟车寮�锛変笉鎵ц鍗囩骇
+ private Integer lastOpenMaxGoOn ;//闃�寮�锛堟车寮�锛夌姸鎬佽缃互鏉ユ寔缁渶闀挎椂闂达紙绉掗挓锛夛紝瓒呰繃杩欎釜鏃堕棿璁や负鐘舵�佹棤鏁堬紙杩欎釜鏃堕暱鍙栧喅浜庡伐浣滄姤闂撮殧锛�
private Integer failTryTimes ;//鍗囩骇澶辫触鍚庯紝閲嶆柊鍋胯瘯鍗囩骇娆℃暟锛�0琛ㄧず涓嶉噸鏂板伩璇曞崌绾�
private Integer ugMaxRtuSameTime ;//鍚屾椂鍗囩骇RTU鏈�澶т釜鏁�
private Integer notifyTimesAfterOver; //鍗囩骇缁撴潫鍚庯紝鍐嶅悜web鏈嶅姟绯荤粺閫氱煡鐘舵�佺殑娆℃暟
private int nowNotifyTimesAfterOver; //鍗囩骇缁撴潫鍚庯紝鍐嶅悜web鏈嶅姟绯荤粺閫氱煡鐘舵�佺殑娆℃暟
private UpgradeTask task ;//鍗囩骇浠诲姟
- private boolean monitorFirst = true ;//鏄惁鏄涓�娆$洃瑙�
+ private boolean monitorFirst ;//鏄惁鏄涓�娆$洃瑙�
private UpgradeManager(){
monitorFirst = true ;
@@ -45,6 +47,8 @@
* 鍒濆鍖栭厤缃俊鎭�
*/
public void initOption(UpgradeUnitConfigVo configVo) {
+ this.openNoUpgrade = configVo.openNoUpgrade;
+ this.lastOpenMaxGoOn = configVo.lastOpenMaxGoOn;
this.failTryTimes = configVo.failTryTimes;
this.ugMaxRtuSameTime = configVo.ugMaxRtuAtOnce;
this.notifyTimesAfterOver = configVo.notifyTimesAfterOver;
@@ -65,9 +69,10 @@
this.task.forceOver();
}
this.task = new UpgradeTask();
- this.task.initOption(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 ;
log.info("======================================================") ;
log.info("= =") ;
log.info("=璁剧疆浜嗗崌绾т换鍔★紝娑夊強RTU" + vo.rtuAddrList.size() + "鍙� =") ;
@@ -195,6 +200,12 @@
this.stop() ;
}else{
if(!this.task.taskIsOver){
+ if(this.openNoUpgrade != null
+ && this.openNoUpgrade.booleanValue()
+ && this.monitorFirst){
+ //绗竴娆¤繘鍏ワ紝杩涜闃�寮�涓嶅崌绾у鐞�
+ this.task.openNoUpgrade() ;
+ }
this.nowNotifyTimesAfterOver = 0 ;
//鍗囩骇浠诲姟鏈畬鎴�
//宸ヤ綔1锛氬垽鏂槸鍚︽棤浠讳綍涓�涓猂TU杩涜杩囧崌绾э紝骞朵笖杈惧埌鏃堕檺锛屽垯璁や负褰撳墠鍗囩骇浠诲姟瀹屾垚
@@ -309,6 +320,7 @@
return true ;
}
+
/**
* 鍗囩骇鐘舵�侀�氱煡
*/
--
Gitblit v1.8.0