| | |
| | | //通信中间件内部命令,例如查询监控中间件时钟,查询RTU在线情况等 |
| | | try{ |
| | | Command reCom = new CommandInnerDeaLer().deal(com) ; |
| | | /* |
| | | boolean error = false ; |
| | | if(reCom.param != null && reCom.param != null){ |
| | | CommandBackParam cbp = (CommandBackParam)reCom.param ; |
| | | if(cbp.getSuccess() != null && !cbp.getSuccess().booleanValue()){ |
| | | error = true ; |
| | | return BaseResponseUtils.buildError(ReturnCommand.errored(cbp.getMessage(), com.getId(), null)); |
| | | } |
| | | } |
| | | if(!error){ |
| | | return BaseResponseUtils.buildError(ReturnCommand.errored(cbp.getMessage(), com.getId(), null)); |
| | | } |
| | | */ |
| | | return BaseResponseUtils.buildSuccess(reCom); |
| | | }catch(Exception e){ |
| | | return BaseResponseUtils.buildError(ReturnCommand.errored("处理内部命令出错" + (e.getMessage() == null?"":("," + e.getMessage())), com.getId(), com.getCode()) ); |
| | | } |
| | | |
| | | }else if(commandType.equals(CommandType.outerCommand)){ |
| | | //发向RTU的外部命令,异步处理,web端jroups成员同步得到命令处理结果,但构造命令及下发命令和命令结果接收要异步得到 |
| | | try{ |