From 7d05aad173c1e605419ea38ff598b9c7572c611d Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期四, 15 八月 2024 08:36:20 +0800
Subject: [PATCH] Merge branch 'master' of http://8.140.179.55:20000/r/pipIrr-SV
---
pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/p206V1_0_0/DriverV1_0_1.java | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 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 2a8a6e6..9061179 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
@@ -6,10 +6,10 @@
import java.net.URI;
import java.net.URL;
-@AnnotationDriver(name= ProtocolConstantV206V1_0_0.protocolName)
+@AnnotationDriver(enable = true, 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,15 +115,20 @@
*/
@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){
- return new MidResult[]{(new MidResultError(ProtocolConstantV206V1_0_0.protocolName, null, "涓ラ噸閿欒锛屽懡浠や腑IMEI鍙蜂负绌猴紝涓嶈兘鏋勫缓浠讳綍鍛戒护锛�", null))} ;
+ if(rtuAddr == null || rtuAddr.trim().equals("")){
+ return new MidResult[]{(new MidResultError(ProtocolConstantV206V1_0_0.protocolName, null, "涓ラ噸閿欒锛屽懡浠や腑Rtu鍦板潃涓虹┖锛屼笉鑳芥瀯寤轰换浣曞懡浠わ紒", null))} ;
}
try {
String commandCode = command.getCode() ;
this.downCpParams.clear();
this.downCpParams.setValue(
+ RtuResultSendWebUrl,
ProtocolConstantV206V1_0_0.protocolName,
rtuAddr,
command.getId(),
--
Gitblit v1.8.0