From ff3b82ed06ab8a0d9b9b755c32b47dfb2a82bc6f Mon Sep 17 00:00:00 2001 From: Administrator <zhubaomin> Date: 星期一, 22 七月 2024 15:30:30 +0800 Subject: [PATCH] 2024-07-22 朱宝民 设备查询、设置接口 --- 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 38aac6a..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,7 +6,7 @@ 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 = "com.dy.common.mw.protocol.p206V1_0_0." ; @@ -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