From 7d885c1d4c86f40927af50e6e7bfa13aac0c2180 Mon Sep 17 00:00:00 2001
From: liurunyu <lry9898@163.com>
Date: 星期四, 21 十二月 2023 21:47:15 +0800
Subject: [PATCH] 1、common模块优化代码,Command命令中增加RTU命令结果返回webRul; 2、通信中间件增加了接收http下发RTU命令和内部命令的Controler; 3、RTU模拟器和控制器增加了上报完数据是否关闭TCP连接的控制。

---
 pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/DriverV1_0_1.java |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/DriverV1_0_1.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/DriverV1_0_1.java
index 6ddc78e..8d2ac78 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/DriverV1_0_1.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/DriverV1_0_1.java
@@ -9,7 +9,7 @@
 @AnnotationDriver(name= ProtocolConstantV206V1_0_0.protocolName)
 public class DriverV1_0_1 extends Driver {
 	
-	private static String scanRootPackage = "" ;
+	private static String scanRootPackage = "com.dy.common.mw.protocol.p206V1_0_0." ;
 	
 	//鍦―river涓槸鍗曚緥锛岄殢Driver鐨勫崟渚嬪璞″湪鍗曠嚎绋嬩腑杩愯
 	private ParseParamsForUpV1_0_1 upCpParams ;
@@ -106,6 +106,7 @@
 			callback.callback(rtuAddr, upCode, upHex, reportOrResponse_trueOrFalse, isFail, rtuAddrInData);
 		}
 	}
+
 	/**
 	 * 鏋勯�犱笅琛屾暟鎹紙鍛戒护锛�
 	 * @param isLowPower 鏄惁鍦ㄤ綆鍔熻�楃幆澧冧笅杩愯
@@ -114,8 +115,12 @@
 	 */
 	@Override
 	public MidResult[] createCommand(Boolean isLowPower, Command command, Object... params) {
+		String RtuResultSendWebUrl = command.getRtuResultSendWebUrl() ;
+		if(RtuResultSendWebUrl == null || RtuResultSendWebUrl.trim().equals("")){
+			return new MidResult[]{(new MidResultError(ProtocolConstantV206V1_0_0.protocolName, null, "涓ラ噸閿欒锛屽懡浠や腑rtu杩斿洖鍛戒护缁撴灉鍙戝悜鐩殑鍦皐eb URL涓虹┖锛屼笉鑳芥瀯寤轰换浣曞懡浠わ紒", null))} ;
+		}
 		String rtuAddr = command.getRtuAddr() ;
-		if(rtuAddr == null){
+		if(rtuAddr == null || rtuAddr.trim().equals("")){
 			return new MidResult[]{(new MidResultError(ProtocolConstantV206V1_0_0.protocolName, null, "涓ラ噸閿欒锛屽懡浠や腑Rtu鍦板潃涓虹┖锛屼笉鑳芥瀯寤轰换浣曞懡浠わ紒", null))} ;
 		}
 		try {
@@ -123,6 +128,7 @@
 			
 			this.downCpParams.clear();
 			this.downCpParams.setValue(
+					RtuResultSendWebUrl,
 					ProtocolConstantV206V1_0_0.protocolName, 
 					rtuAddr, 
 					command.getId(),

--
Gitblit v1.8.0