|  |  | 
 |  |  |    } | 
 |  |  |  | 
 |  |  |    /** | 
 |  |  |     * 当命令结果返回的网址是此值时,忽略执行,例如中间件主动下发的命令,就不用返回命令结果 | 
 |  |  |     */ | 
 |  |  |    public static final String ignoreRtuResultSendWebUrl = "http://0.0.0.0" ; | 
 |  |  |  | 
 |  |  |  | 
 |  |  |    /** | 
 |  |  |     * 默认命令ID | 
 |  |  |     * 如果命令不在数据库中存储,或其他可以用defaultId | 
 |  |  |     */ | 
 |  |  | 
 |  |  |     * 本条命令的ID | 
 |  |  |     * 一般是命令在数据库中存储记录ID的字符串形式 | 
 |  |  |     */ | 
 |  |  |    public String id;  | 
 |  |  | 	 | 
 |  |  |    public String id; | 
 |  |  |  | 
 |  |  |    /** | 
 |  |  |     * RTU协议名称,这个可以为空,因为RTU上行数据解析出协议名称,然后系统把协议名称保存在RTU数据记录中,从此协议名称就不再空了 | 
 |  |  |     */ | 
 |  |  |    public String protocol; | 
 |  |  | 	 | 
 |  |  |  | 
 |  |  |    /** | 
 |  |  |     * RTU 地址 | 
 |  |  |     * RTU协议名称,这个可以为空 | 
 |  |  |     */ | 
 |  |  |    public Short protocolVersion; | 
 |  |  |  | 
 |  |  |    /** | 
 |  |  |     * RTU地址 和 FBox设备号 | 
 |  |  |     */ | 
 |  |  |    public String rtuAddr ; | 
 |  |  |  | 
 |  |  | 
 |  |  |     * 功能码 | 
 |  |  |     */ | 
 |  |  |    public String code ;  | 
 |  |  | 	 | 
 |  |  |    /** | 
 |  |  |     * 不返回中间件对命令处理结果(true:不返回处理结果,false或null:返回处理结果) | 
 |  |  |     */ | 
 |  |  |    public Boolean noRtMwDealRes ; | 
 |  |  |  | 
 |  |  |    /** | 
 |  |  |     * rtu返回命令结果 发向目的地web URL | 
 |  |  | 
 |  |  |    public String toString(){ | 
 |  |  |       String s = "命令id=" + id + "\n" ; | 
 |  |  |       s += (protocol == null ? "" : ("协议=" + protocol + "\n")); | 
 |  |  |       s += (protocolVersion == null ? "" : ("协议版本号=" + protocolVersion + "\n")); | 
 |  |  |       s += (rtuAddr == null ? "" : ("Rtu地址=" + rtuAddr + "\n")); | 
 |  |  |       s += "命令类型=" + (type.equals(CommandType.innerCommand)?"内部命令":"RTU命令") + "\n" ; | 
 |  |  |       s += "命令类型=" + ( | 
 |  |  |             type.equals(CommandType.innerCommand)?"内部命令":( | 
 |  |  |                   type.equals(CommandType.outerCommand)?"RTU命令":( | 
 |  |  |                         type.equals(CommandType.mqttCommand)?"MQTT命令":( | 
 |  |  |                               type.equals(CommandType.outerTransCommand)?"透传命令": | 
 |  |  |                                     "")))) + "\n" ; | 
 |  |  |       s += (code == null ? "" : ("功能码=" + code + "\n")) ; | 
 |  |  |       s += "是否返回中间件对命令处理结果=" + (noRtMwDealRes == null?"是":(noRtMwDealRes?"是":"否") + "\n") ; | 
 |  |  |       s += (rtuResultSendWebUrl == null ? "" : ("回调网址=" + rtuResultSendWebUrl + "\n")); | 
 |  |  |       if(param != null){ | 
 |  |  |          s += "参数:" + param  ; | 
 |  |  |       } | 
 |  |  | 
 |  |  |    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; |