From 84182fbb85e7c11194014a8ca9d25a97f4f088e4 Mon Sep 17 00:00:00 2001
From: Administrator <zhubaomin>
Date: 星期一, 29 七月 2024 13:49:54 +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 |   43 +++++++++++++++++++++++++++----------------
 1 files changed, 27 insertions(+), 16 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 d2f7afc..ed3cd69 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
@@ -3,6 +3,7 @@
 import java.io.Serializable;
 
 import com.alibaba.fastjson2.JSON ;
+import com.alibaba.fastjson2.JSONObject;
 
 public class Command implements Serializable{
 
@@ -10,6 +11,12 @@
 	static {
 		serialVersionUID = 201211292156L;
 	}
+
+	/**
+	 * 褰撳懡浠ょ粨鏋滆繑鍥炵殑缃戝潃鏄鍊兼椂锛屽拷鐣ユ墽琛岋紝渚嬪涓棿浠朵富鍔ㄤ笅鍙戠殑鍛戒护锛屽氨涓嶇敤杩斿洖鍛戒护缁撴灉
+	 */
+	public static final String ignoreRtuResultSendWebUrl = "http://0.0.0.0" ;
+
 
 	/**
 	 * 榛樿鍛戒护ID
@@ -43,11 +50,11 @@
 	 * 鍔熻兘鐮�
 	 */
 	public String code ; 
-	
+
 	/**
-	 * 涓嶈繑鍥炰腑闂翠欢瀵瑰懡浠ゅ鐞嗙粨鏋滐紙true锛氫笉杩斿洖澶勭悊缁撴灉锛宖alse鎴杗ull锛氳繑鍥炲鐞嗙粨鏋滐級
+	 * rtu杩斿洖鍛戒护缁撴灉 鍙戝悜鐩殑鍦皐eb URL
 	 */
-	public Boolean noRtMwDealRes ;
+	public String rtuResultSendWebUrl ;
 
 	/**
 	 * 鍏蜂綋鍙傛暟鏁版嵁
@@ -63,9 +70,9 @@
 		String s = "鍛戒护id=" + id + "\n" ;
 		s += (protocol == null ? "" : ("鍗忚=" + protocol + "\n"));
 		s += (rtuAddr == null ? "" : ("Rtu鍦板潃=" + rtuAddr + "\n"));
-		s += "鍛戒护绫诲瀷=" + (type.equals(CommandType.innerCommand)?"鍐呴儴鍛戒护":"缁堢鍛戒护") + "\n" ;
+		s += "鍛戒护绫诲瀷=" + (type.equals(CommandType.innerCommand)?"鍐呴儴鍛戒护":"RTU鍛戒护") + "\n" ;
 		s += (code == null ? "" : ("鍔熻兘鐮�=" + code + "\n")) ;
-		s += "杩斿洖涓棿浠跺鍛戒护澶勭悊缁撴灉=" + (noRtMwDealRes == null?"杩斿洖":(noRtMwDealRes?"涓嶈繑鍥�":"杩斿洖") + "\n") ;
+		s += (rtuResultSendWebUrl == null ? "" : ("鍥炶皟缃戝潃=" + rtuResultSendWebUrl + "\n"));
 		if(param != null){
 			s += "鍙傛暟:" + param  ;
 		}
@@ -82,7 +89,8 @@
 	@SuppressWarnings("unused")
 	public String toJson()throws Exception{
 		try{
-			return JSON.toJSONString(this) ;
+			String json = JSON.toJSONString(this) ;
+			return json ;
 		}catch(Exception e){
 			throw new Exception(e.getMessage() , e ) ;
 		}
@@ -96,7 +104,10 @@
 	@SuppressWarnings("unused")
 	public static Command jsonToObject(String json)throws Exception{
 		try{
-			return JSON.parseObject(json, Command.class) ;
+			JSONObject jsonObject = JSON.parseObject(json);
+			Command command = jsonObject.to(Command.class) ;
+			//command.param = jsonObject.getObject("param", class);
+			return command ;
 		}catch(Exception e){
 			throw new Exception(e.getMessage() , e ) ;
 		}
@@ -167,7 +178,15 @@
 		this.rtuAddr = rtuAddr;
 		return this ;
 	}
-	
+
+	public String getRtuResultSendWebUrl() {
+		return rtuResultSendWebUrl;
+	}
+
+	public void setRtuResultSendWebUrl(String rtuResultSendWebUrl) {
+		this.rtuResultSendWebUrl = rtuResultSendWebUrl;
+	}
+
 	public String getProtocol() {
 		return protocol;
 	}
@@ -187,14 +206,6 @@
 	public Command setCode(String code) {
 		this.code = code;
 		return this ;
-	}
-	@SuppressWarnings("unused")
-	public Boolean getNoRtMwDealRes() {
-		return noRtMwDealRes;
-	}
-	@SuppressWarnings("unused")
-	public void setNoRtMwDealRes(Boolean noRtMwDealRes) {
-		this.noRtMwDealRes = noRtMwDealRes;
 	}
 	public Object getParam() {
 		return param;

--
Gitblit v1.8.0