/// <summary>
        /// 添加Opc Ua 业务数据
        /// </summary>
        /// <param name="inputDtos">要添加的Opc Ua 业务数据DTO信息</param>
        /// <returns>业务操作结果</returns>
        public async Task <OperationResult> AddCommOpcUaBusinesss(params CommOpcUaBusinessInputDto[] inputDtos)
        {
            inputDtos.CheckNotNull("inputDtos");
            foreach (var dtoData in inputDtos)
            {
                if (CommOpcUaBusinessRepository.CheckExists(x => x.BusinessName.Equals(dtoData.BusinessName)))
                {
                    return(new OperationResult(OperationResultType.Error, $"业务名称为{dtoData.BusinessName}的信息已存在,数据不合法,改组数据不被存储"));
                }
            }

            CommOpcUaBusinessRepository.UnitOfWork.BeginTransaction();

            CommOpcUaBusinessNodeMapInputDto commOpcUaBusinessNodeMapInputDto = new CommOpcUaBusinessNodeMapInputDto();

            foreach (var dtoData in inputDtos)
            {
                DeviceNode commOpcUaNode = CommOpcUaNodeRepository.TrackEntities.Where(x => x.Id.Equals(dtoData.NodeId)).FirstOrDefault();

                if (commOpcUaNode != null)
                {
                    //var result = await CommOpcUaBusinessContract.AddCommOpcUaBusinesss(dtoData);
                    var result = await CommOpcUaBusinessRepository.InsertAsync(dtoData.MapTo <CommOpcUaBusiness>());

                    if (result > 0)
                    {
                        CommOpcUaBusiness commOpcUaBusiness = CommOpcUaBusinessRepository.TrackEntities.Where(x => x.BusinessName.Equals(dtoData.BusinessName)).FirstOrDefault();
                        commOpcUaBusinessNodeMapInputDto.OpcUaNode     = commOpcUaNode;
                        commOpcUaBusinessNodeMapInputDto.OpcUaBusiness = commOpcUaBusiness;

                        commOpcUaBusinessNodeMapInputDto.Id                = CombHelper.NewComb();
                        commOpcUaBusinessNodeMapInputDto.CreatorUserId     = dtoData.CreatorUserId;
                        commOpcUaBusinessNodeMapInputDto.CreatedTime       = DateTime.Now;
                        commOpcUaBusinessNodeMapInputDto.LastUpdatedTime   = commOpcUaBusinessNodeMapInputDto.CreatedTime;
                        commOpcUaBusinessNodeMapInputDto.LastUpdatorUserId = commOpcUaBusinessNodeMapInputDto.CreatorUserId;

                        var saveResult = await CommOpcUaBusinessNodeMapContract.AddCommOpcUaBusinessNodeMaps(commOpcUaBusinessNodeMapInputDto);

                        if (saveResult.ResultType == OperationResultType.Error)
                        {
                            return(new OperationResult(OperationResultType.Error, $"存储通讯业务点表与通讯点表关联数据失败,取消数据点\"{dtoData.BusinessName}\"存储!"));
                        }
                    }
                    else
                    {
                        return(new OperationResult(OperationResultType.Error, "存储通讯业务点表数据失败!"));
                    }
                }
                else
                {
                    return(new OperationResult(OperationResultType.Error, "查询通讯点表数据失败!"));
                }
            }

            CommOpcUaBusinessRepository.UnitOfWork.Commit();
            return(new OperationResult(OperationResultType.Success, "存储业务点数据成功!"));
        }
        /// <summary>
        /// 更新Opc Ua 业务数据信息
        /// </summary>
        /// <param name="inputDtos">包含更新信息的Opc Ua 业务数据DTO信息</param>
        /// <returns>业务操作结果</returns>
        public async Task <OperationResult> EditCommOpcUaBusinesss(params CommOpcUaBusinessInputDto[] inputDto)
        {
            inputDto.CheckNotNull("data");
            CommOpcUaBusinessRepository.UnitOfWork.BeginTransaction();
            var result = await CommOpcUaBusinessRepository.UpdateAsync(inputDto);

            if (result.Successed)
            {
                foreach (var data in inputDto)
                {
                    CommOpcUaBusiness        commOpcUaBusiness = CommOpcUaBusinessRepository.TrackEntities.Where(x => x.Id.Equals(data.Id)).FirstOrDefault();
                    DeviceNode               commOpcUaNode     = CommOpcUaNodeRepository.TrackEntities.Where(x => x.Id.Equals(data.NodeId)).FirstOrDefault();
                    CommOpcUaBusinessNodeMap entity            = CommOpcUaBusinessNodeMapContract.CommOpcUaBusinessNodeMapInfos.Where(x => x.OpcUaBusiness.Id.Equals(data.Id)).FirstOrDefault();
                    if (entity != null)
                    {
                        CommOpcUaBusinessNodeMapInputDto dto = new CommOpcUaBusinessNodeMapInputDto();
                        dto.Id                = entity.Id;
                        dto.CreatedTime       = entity.CreatedTime;
                        dto.CreatorUserId     = entity.CreatorUserId;
                        dto.OpcUaBusiness     = commOpcUaBusiness;
                        dto.OpcUaNode         = commOpcUaNode;
                        dto.LastUpdatedTime   = data.LastUpdatedTime;
                        dto.LastUpdatorUserId = data.LastUpdatorUserId;
                        try
                        {
                            var EditResult = await CommOpcUaBusinessNodeMapContract.EditCommOpcUaBusinessNodeMaps(dto);

                            if (EditResult.ResultType == OperationResultType.Error)
                            {
                                return(EditResult);
                            }
                        }
                        catch (Exception ex)
                        {
                            string sss = ex.ToString();
                        }
                    }
                }
            }
            else
            {
                return(result);
            }

            CommOpcUaBusinessRepository.UnitOfWork.Commit();

            return(new OperationResult(OperationResultType.Success, "修改业务数据成功!"));
        }