From 120448e8c6826b453d5b96e9076d61479a987677 Mon Sep 17 00:00:00 2001
From: wuzeyu <1223318623@qq.com>
Date: 星期六, 02 十二月 2023 10:42:18 +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/Command.java | 58 +++++++++++++++++++++++++++++++++++++++++++++-------------
1 files changed, 45 insertions(+), 13 deletions(-)
diff --git a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/Command.java b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/Command.java
index 7bb4162..39bd450 100644
--- a/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/Command.java
+++ b/pipIrr-platform/pipIrr-common/src/main/java/com/dy/common/mw/protocol/Command.java
@@ -32,7 +32,25 @@
* RTU 鍦板潃
*/
public String rtuAddr ;
-
+
+ /**
+ * 姘磋〃鍙�
+ * 搴旂敤鐢典俊骞冲彴鏃舵湁鏁�
+ */
+ public String meterNo ;
+
+ /**
+ * 鐢典俊骞冲彴涓婄殑浜у搧ID锛屽綋涓嶅湪鐢典俊骞冲彴涓婅繍琛屾椂锛屼负null
+ * 搴旂敤鐢典俊骞冲彴鏃舵湁鏁�
+ */
+ public Integer productId ;
+
+ /**
+ * 鐢典俊骞冲彴涓婄殑璁惧ID锛屽綋涓嶅湪鐢典俊骞冲彴涓婅繍琛屾椂锛屼负null
+ * 搴旂敤鐢典俊骞冲彴鏃舵湁鏁�
+ */
+ public String deviceId ;
+
/**
* 鍛戒护绫诲瀷:Rtu鍛戒护銆侀拡瀵圭洃鎺т腑闂翠欢鐨勫懡浠�
* 鐢眂om.dy.common.mw.protocol.CommandType绫诲畾涔�
@@ -62,7 +80,14 @@
public String toString(){
String s = "鍛戒护id=" + id + "\n" ;
s += (protocol == null ? "" : ("鍗忚=" + protocol + "\n"));
- s += (rtuAddr == null ? "" : ("Rtu鍦板潃=" + rtuAddr + "\n"));
+ s += (rtuAddr == null ? "" : ("IMEI鍙�=" + rtuAddr + "\n"));
+ s += (meterNo == null ? "" : ("姘磋〃鍙�=" + meterNo + "\n"));
+ if(productId != null){
+ s += "鐢典俊骞冲彴浜у搧ID=" + productId + "\n" ;
+ }
+ if(deviceId != null && !deviceId.trim().equals("")){
+ s += "鐢典俊骞冲彴璁惧ID=" + deviceId + "\n" ;
+ }
s += "鍛戒护绫诲瀷=" + (type.equals(CommandType.innerCommand)?"鍐呴儴鍛戒护":"缁堢鍛戒护") + "\n" ;
s += (code == null ? "" : ("鍔熻兘鐮�=" + code + "\n")) ;
s += "杩斿洖涓棿浠跺鍛戒护澶勭悊缁撴灉=" + (noRtMwDealRes == null?"杩斿洖":(noRtMwDealRes?"涓嶈繑鍥�":"杩斿洖") + "\n") ;
@@ -152,17 +177,6 @@
return this ;
}
- /*
- public static void main(String[] args){
- String json = "{\"attachment\":null,\"code\":\"03\",\"deviceId\":\"d8c9601f214747d98d47a4736e5\",\"id\":\"999999999\",\"meterNo\":\"23040600377\",\"productId\":16873252,\"param\":\"0002\",\"protocol\":\"HAC_NBhV2_5\",\"rtuAddr\":\"863318060168996\",\"type\":\"outerCommand\"}" ;
- try {
- Command com = jsonToObject(json) ;
- System.out.println(com.param);
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
- */
public String getId() {
return id;
@@ -185,6 +199,24 @@
public void setProtocol(String protocol) {
this.protocol = protocol;
}
+ public String getMeterNo() {
+ return meterNo;
+ }
+ public void setMeterNo(String meterNo) {
+ this.meterNo = meterNo;
+ }
+ public Integer getProductId() {
+ return productId;
+ }
+ public void setProductId(Integer productId) {
+ this.productId = productId;
+ }
+ public String getDeviceId() {
+ return deviceId;
+ }
+ public void setDeviceId(String deviceId) {
+ this.deviceId = deviceId;
+ }
public String getType() {
return type;
}
--
Gitblit v1.8.0