|  |  |  | 
|---|
|  |  |  | public class ComSupportP206V1_0_0 { | 
|---|
|  |  |  | protected static String mwUrlTest = "http://127.0.0.1:8070/rtuMw/com/test" ; | 
|---|
|  |  |  | protected static String mwUrlSendCom = "http://127.0.0.1:8070/rtuMw/com/send" ; | 
|---|
|  |  |  | protected static String rtuAddr = "370829000001" ; | 
|---|
|  |  |  | protected static String rtuAddr = "532328059995" ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //    protected static String mwUrlTest = "http://8.140.179.55:8071/rtuMw/com/test" ; | 
|---|
|  |  |  | //    protected static String mwUrlSendCom = "http://8.140.179.55:8071/rtuMw/com/send" ; | 
|---|
|  |  |  | 
|---|
|  |  |  | private RestTemplate restTemplate; | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | protected Command command(String code, Object param, String comId){ | 
|---|
|  |  |  | protected Command commandLocal(String code, Object param, String comId){ | 
|---|
|  |  |  | Command com = new Command() ; | 
|---|
|  |  |  | com.id = comId==null?Command.defaultId:(comId.trim().equals("")?Command.defaultId:comId) ;//实际应用中,替换成数据库记录id | 
|---|
|  |  |  | com.protocol = ProtocolConstantV206V1_0_0.protocolName ; | 
|---|
|  |  |  | com.code = code ; | 
|---|
|  |  |  | com.rtuAddr = rtuAddr ; | 
|---|
|  |  |  | com.type = CommandType.innerCommand ; | 
|---|
|  |  |  | com.rtuResultSendWebUrl = rtuResultSendWebUrl ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | com.param = param ; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | return com ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | protected Command commandOuter(String code, Object param, String comId){ | 
|---|
|  |  |  | Command com = new Command() ; | 
|---|
|  |  |  | com.id = comId==null?Command.defaultId:(comId.trim().equals("")?Command.defaultId:comId) ;//实际应用中,替换成数据库记录id | 
|---|
|  |  |  | com.protocol = ProtocolConstantV206V1_0_0.protocolName ; | 
|---|
|  |  |  | 
|---|
|  |  |  | return com ; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 连接通信中间件测试 | 
|---|
|  |  |  | * @return | 
|---|