From 3c2c295ec48587fe9d9f656e0baa74c71a3884f7 Mon Sep 17 00:00:00 2001 From: liurunyu <lry9898@163.com> Date: 星期日, 27 十月 2024 16:46:45 +0800 Subject: [PATCH] 1、苏有勋把开关阀报(功能码83)报中的控制器时钟去除掉了,通信中间件解决这个报文时,把开阀报中的开阀时间当作控制器时钟,把关阀报中的关阀时间作为控制器时钟; 2、优化代码。 --- pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/queue/Queue.java | 27 +++++++++------------------ 1 files changed, 9 insertions(+), 18 deletions(-) diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/queue/Queue.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/queue/Queue.java index 13114af..cfa77d5 100644 --- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/queue/Queue.java +++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/queue/Queue.java @@ -4,7 +4,7 @@ import org.apache.logging.log4j.Logger; /** - * 闃熷垪锛屽厛杩涘厛鍑猴紝闈炵嚎绋嬪畨鍏� + * 闃熷垪锛屽厛杩涘厛鍑� */ public class Queue { @SuppressWarnings("unfinal") @@ -62,7 +62,6 @@ */ @SuppressWarnings("unused") public void pushHead(NodeObj obj)throws Exception{ - //涓や釜绾跨▼鐜锛岄渶瑕佸悓姝ラ攣 synchronized(synObj){ if(obj == null){ return ; @@ -90,7 +89,6 @@ * @param obj 鍏ュ垪鐨勫璞� */ public void pushTail(NodeObj obj)throws Exception{ - //涓や釜绾跨▼鐜锛岄渶瑕佸悓姝ラ攣 synchronized(synObj){ if(obj == null){ return ; @@ -118,7 +116,6 @@ * @return 鍑哄垪瀵硅薄 */ public NodeObj pop(){ - //涓や釜绾跨▼鐜锛岄渶瑕佸悓姝ラ攣 synchronized(synObj){ NodeObj obj = null ; if(this.size > 0){ @@ -142,14 +139,11 @@ */ @SuppressWarnings("unused") public Node getFirstNode(){ - //涓や釜绾跨▼鐜锛岄渶瑕佸悓姝ラ攣 - synchronized(synObj) { - Node node = this.head.next; - if (node != this.tail) { - return node; - } - return null; + Node node = this.head.next ; + if(node != this.tail){ + return node ; } + return null ; } /** * 寰楀埌鏈�鍚庝竴涓妭鐐癸紝浣嗕笉鎶婅妭鐐逛粠闃熷垪涓竻闄� @@ -157,14 +151,11 @@ */ @SuppressWarnings("unused") public Node getLastNode(){ - //涓や釜绾跨▼鐜锛岄渶瑕佸悓姝ラ攣 - synchronized(synObj) { - Node node = this.tail.pre; - if (node != this.head) { - return node; - } - return null; + Node node = this.tail.pre ; + if(node != this.head){ + return node ; } + return null ; } /** -- Gitblit v1.8.0