liurunyu
2024-12-02 a2a790968bc8479dda1dec878068da865662889e
1、完善代码;
1个文件已修改
14 ■■■■■ 已修改文件
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/web/com/CommandCtrl.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pipIrr-platform/pipIrr-mw/pipIrr-mw-rtu/src/main/java/com/dy/rtuMw/web/com/CommandCtrl.java
@@ -209,24 +209,10 @@
            //通信中间件内部命令,例如查询监控中间件时钟,查询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{