| | |
| | | * @return 结果 |
| | | */ |
| | | private BaseResponse<Command> dealMqttCommand(Command command){ |
| | | String rtuAddr = command.getRtuAddr() ; |
| | | String rtuAddr = command.getRtuAddr() ;//FBox设备号 |
| | | if(rtuAddr == null || rtuAddr.trim().equals("")){ |
| | | return BaseResponseUtils.buildError(ReturnCommand.errored("出错,设备ID为空!", command.getId(), command.getCode())) ; |
| | | return BaseResponseUtils.buildError(ReturnCommand.errored("出错,FBox设备ID为空!", command.getId(), command.getCode())) ; |
| | | } |
| | | if(!ServerProperties.mqttUnitEnable.booleanValue()){ |
| | | return BaseResponseUtils.buildError(ReturnCommand.errored("出错,MQTT连接模块配置未启动!", command.getId(), command.getCode())) ; |
| | | } |
| | | if(MqttManager.getInstance().poolIsClose()){ |
| | | return BaseResponseUtils.buildError(ReturnCommand.errored("出错,MQTT连接池水创建成功!", command.getId(), command.getCode())) ; |
| | | return BaseResponseUtils.buildError(ReturnCommand.errored("出错,MQTT连接池未创建成功!", command.getId(), command.getCode())) ; |
| | | } |
| | | |
| | | //生成异步任务 |