From cf23fbd9dc25d7effe6dfb39bf703901369b78b0 Mon Sep 17 00:00:00 2001
From: zhubaomin <zhubaomin>
Date: 星期三, 26 三月 2025 17:26:26 +0800
Subject: [PATCH] 支持创建自动启动计划、发布自动启动计划
---
pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtu/RtuCtrl.java | 39 +++++++++++++++++++++------------------
1 files changed, 21 insertions(+), 18 deletions(-)
diff --git a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtu/RtuCtrl.java b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtu/RtuCtrl.java
index 55b2348..dcaf611 100644
--- a/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtu/RtuCtrl.java
+++ b/pipIrr-platform/pipIrr-web/pipIrr-web-remote/src/main/java/com/dy/pipIrrRemote/rtu/RtuCtrl.java
@@ -3,9 +3,12 @@
import com.alibaba.fastjson2.JSONObject;
import com.dy.common.aop.SsoAop;
import com.dy.common.multiDataSource.DataSourceContext;
-import com.dy.common.mw.protocol.p206V1_0_0.CodeV1_0_1;
-import com.dy.common.mw.protocol.p206V1_0_0.downVos.*;
+import com.dy.common.mw.protocol.p206V1.CodeV1;
+import com.dy.common.mw.protocol.p206V1.ProtocolConstantV206V1;
+import com.dy.common.mw.protocol.p206V1.downVos.*;
+import com.dy.common.mw.protocol.p206V2.ProtocolConstantV206V2;
import com.dy.common.mw.protocol.p206V202404.CodeV202404;
+import com.dy.common.mw.protocol.p206V202404.ProtocolConstantV206V202404;
import com.dy.common.mw.protocol.p206V202404.downVos.ComCdXyVo;
import com.dy.common.util.IDLongGenerator;
import com.dy.common.webUtil.BaseResponse;
@@ -69,7 +72,7 @@
/**
* 閫氱敤鏌ヨ鎺ュ彛
- * p206V1_0_1
+ * p206V1
* 66 鏌ヨIP鍜岀鍙�
* 67 鏌ヨ娴侀噺閲囬泦鍛ㄦ湡
* 68 鏌ヨ鐢ㄦ埛浣欓鎶ヨ鍊�
@@ -105,7 +108,7 @@
// 鑾峰彇鍔熻兘鐮�
String commandCode = po.getCommandCode();
- if(protocol.equals("p206V202404")) {
+ if(protocol.equals(ProtocolConstantV206V202404.protocolName)) {
// 鍒涘缓瑙嗗浘
ComCdXyVo param = new ComCdXyVo();
param.controllerType = controllerType;
@@ -127,7 +130,7 @@
myParam.setRtuResultSendWebUrl(rtuCallbackUrl_rm);
myParam.setOperator(operator);
return dealWithCommandResult(myParam);
- } else if(protocol.equals("p206V1_0_1")) {
+ } else if(protocol.equals(ProtocolConstantV206V1.protocolName) || protocol.equals(ProtocolConstantV206V2.protocolName)) {
// 鍒涘缓瑙嗗浘
ComXyVo param = new ComXyVo();
param.setCommandCode(commandCode);
@@ -141,7 +144,7 @@
myParam.setComId(comId);
myParam.setComType((byte)2);
myParam.setCommandCode(commandCode);
- myParam.setCommandName(CodeV1_0_1.getCodeName(commandCode));
+ myParam.setCommandName(CodeV1.getCodeName(commandCode));
myParam.setIntakeId(intakeId);
myParam.setRtuAddr(rtuAddr);
myParam.setProtocol(protocol);
@@ -186,9 +189,9 @@
// 鑾峰彇鍔熻兘鐮�
String commandCode = po.getCommandCode();
- if(protocol.equals("p206V202404")) {
+ if(protocol.equals(ProtocolConstantV206V202404.protocolName)) {
return BaseResponseUtils.buildSuccess("");
- } else if(protocol.equals("p206V1_0_1")) {
+ } else if(protocol.equals(ProtocolConstantV206V1.protocolName) || protocol.equals(ProtocolConstantV206V2.protocolName)) {
// 鍒涘缓瑙嗗浘
Com37Vo param = new Com37Vo();
param.setSeconds(po.getSeconds());
@@ -202,7 +205,7 @@
myParam.setComId(comId);
myParam.setComType((byte)2);
myParam.setCommandCode(commandCode);
- myParam.setCommandName(CodeV1_0_1.getCodeName(commandCode));
+ myParam.setCommandName(CodeV1.getCodeName(commandCode));
myParam.setIntakeId(intakeId);
myParam.setRtuAddr(rtuAddr);
myParam.setProtocol(protocol);
@@ -247,9 +250,9 @@
// 鑾峰彇鍔熻兘鐮�
String commandCode = po.getCommandCode();
- if(protocol.equals("p206V202404")) {
+ if(protocol.equals(ProtocolConstantV206V202404.protocolName)) {
return BaseResponseUtils.buildSuccess("");
- } else if(protocol.equals("p206V1_0_1")) {
+ } else if(protocol.equals(ProtocolConstantV206V1.protocolName) || protocol.equals(ProtocolConstantV206V2.protocolName)) {
// 鍒涘缓瑙嗗浘
Com21Vo param = new Com21Vo();
param.setIp(po.getIp());
@@ -264,7 +267,7 @@
myParam.setComId(comId);
myParam.setComType((byte)2);
myParam.setCommandCode(commandCode);
- myParam.setCommandName(CodeV1_0_1.getCodeName(commandCode));
+ myParam.setCommandName(CodeV1.getCodeName(commandCode));
myParam.setIntakeId(intakeId);
myParam.setRtuAddr(rtuAddr);
myParam.setProtocol(protocol);
@@ -309,9 +312,9 @@
// 鑾峰彇鍔熻兘鐮�
String commandCode = po.getCommandCode();
- if(protocol.equals("p206V202404")) {
+ if(protocol.equals(ProtocolConstantV206V202404.protocolName)) {
return BaseResponseUtils.buildSuccess("");
- } else if(protocol.equals("p206V1_0_1")) {
+ } else if(protocol.equals(ProtocolConstantV206V1.protocolName) || protocol.equals(ProtocolConstantV206V2.protocolName)) {
// 鍒涘缓瑙嗗浘
Com38Vo param = new Com38Vo();
param.setRemainMoneyAlarm(po.getRemainMoneyAlarm());
@@ -325,7 +328,7 @@
myParam.setComId(comId);
myParam.setComType((byte)2);
myParam.setCommandCode(commandCode);
- myParam.setCommandName(CodeV1_0_1.getCodeName(commandCode));
+ myParam.setCommandName(CodeV1.getCodeName(commandCode));
myParam.setIntakeId(intakeId);
myParam.setRtuAddr(rtuAddr);
myParam.setProtocol(protocol);
@@ -370,9 +373,9 @@
// 鑾峰彇鍔熻兘鐮�
String commandCode = po.getCommandCode();
- if(protocol.equals("p206V202404")) {
+ if(protocol.equals(ProtocolConstantV206V202404.protocolName)) {
return BaseResponseUtils.buildSuccess("");
- } else if(protocol.equals("p206V1_0_1")) {
+ } else if(protocol.equals(ProtocolConstantV206V1.protocolName) || protocol.equals(ProtocolConstantV206V2.protocolName)) {
// 鍒涘缓瑙嗗浘
Com39Vo param = new Com39Vo();
param.setBatteryVoltAlarm(po.getBatteryVoltAlarm());
@@ -386,7 +389,7 @@
myParam.setComId(comId);
myParam.setComType((byte)2);
myParam.setCommandCode(commandCode);
- myParam.setCommandName(CodeV1_0_1.getCodeName(commandCode));
+ myParam.setCommandName(CodeV1.getCodeName(commandCode));
myParam.setIntakeId(intakeId);
myParam.setRtuAddr(rtuAddr);
myParam.setProtocol(protocol);
--
Gitblit v1.8.0