From 7782cb898851f93a24ede2e41212f4e505601c29 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期四, 21 十二月 2023 15:09:06 +0800
Subject: [PATCH] SsoCtrl中调整方法ssoCheck和ssoPowerCheck
---
pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/server/tasks/FromRtuConstantTask.java | 68 ++++++++++++++++++++++++++-------
1 files changed, 53 insertions(+), 15 deletions(-)
diff --git a/pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/server/tasks/FromRtuConstantTask.java b/pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/server/tasks/FromRtuConstantTask.java
index 266d88f..fbf4b7c 100644
--- a/pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/server/tasks/FromRtuConstantTask.java
+++ b/pipIrr-platform/pipIrr-mw/pipIrr-mw-accept/src/main/java/com/dy/aceMw/server/tasks/FromRtuConstantTask.java
@@ -17,24 +17,63 @@
* 鍦ㄥ崟绾跨▼鐜涓繍琛�
*/
@Override
- public Integer excute() {
+ public Integer execute() {
try{
- return dealRtuUpData() ;
+ dealRtuUpData() ;
}catch(Exception e){
log.error(e);
}
- return null ;
+ return RtuDataCache.size()>0?0:1 ;
}
-
/**
* 澶勭悊涓婅鏁版嵁
*/
- public Integer dealRtuUpData() {
+ public void dealRtuUpData() {
+ Node first = RtuDataCache.getFirstQueueNode() ;
+ if(first != null){
+ Node last = RtuDataCache.getLastQueueNode() ;
+ while (last != null){
+ last = this.doDealRtuUpData(first, last);
+ }
+ }
+ }
+
+ /**
+ * 澶勭悊缂撳瓨鐨勪笂琛屾暟鎹妭鐐�
+ * @param first 绗竴涓妭鐐�
+ * @param last 鏈�鍚庝竴涓妭鐐�
+ */
+ private Node doDealRtuUpData(Node first, Node last){
+ if(last != null){
+ //鍦╠ealNode鏂规硶涓紝鍙兘瑕佹妸last浠庨槦鍒椾腑绉婚櫎锛岃繖鏃秎ast.pre涓虹┖锛屾墍浠ユ彁鍓嶆妸last.pre鍙栧嚭鏉�
+ Node pre = last.pre ;
+ dealNode(last) ;
+ if(first != last){
+ return pre ;
+ }else{
+ //鍋滄
+ return null ;
+ }
+ }else{
+ return null ;
+ }
+ }
+
+
+ ////////////////////////////////////////////////
+ //
+ //浠ヤ笅瀹炵幇锛岄噰鐢ㄤ簡閫掑綊璋冪敤锛屽綋闃熷垪缂撳瓨缁撶偣寰堝鏃讹紝浼氫骇鐢熸爤婧㈠嚭寮傚父
+ //
+ ////////////////////////////////////////////////
+ /**
+ * 澶勭悊涓婅鏁版嵁
+ */
+ public Integer dealRtuUpData_() {
Node first = RtuDataCache.getFirstQueueNode() ;
if(first != null){
Integer count = RtuDataCache.size() ;
Node last = RtuDataCache.getLastQueueNode() ;
- this.doDealRtuUpData(first, last);
+ this.doDealRtuUpData_(first, last);
return count ;
}
return null ;
@@ -45,18 +84,15 @@
* @param first 绗竴涓妭鐐�
* @param last 鏈�鍚庝竴涓妭鐐�
*/
- private void doDealRtuUpData(Node first, Node last){
+ private void doDealRtuUpData_(Node first, Node last){
if(last != null){
//鍦╠ealNode鏂规硶涓紝鍙兘瑕佹妸last浠庨槦鍒椾腑绉婚櫎锛岃繖鏃秎ast.pre涓虹┖锛屾墍浠ユ彁鍓嶆妸last.pre鍙栧嚭鏉�
Node pre = last.pre ;
dealNode(last) ;
- if(first != null && first != last){
+ if(first != last){
doDealRtuUpData(first, pre) ;
- }else if(first != null && first == last){
+ }else{
//鍋滄
- }else if(first == null){
- //杩欑鎯呭喌涓嶄細瀛樺湪
- doDealRtuUpData(null, pre) ;
}
}
}
@@ -66,9 +102,11 @@
* @param node 鑺傜偣
*/
private void dealNode(Node node){
- RtuDataNode obj = (RtuDataNode)node.obj ;
- obj.dealSelf() ;
- RtuDataCache.removeNode(node);
+ if(node != null && node.obj != null){
+ RtuDataNode obj = (RtuDataNode)node.obj ;
+ obj.dealSelf() ;
+ RtuDataCache.removeNode(node);
+ }
}
}
--
Gitblit v1.8.0