/// <summary>
        /// 设备业务数据点配置
        /// </summary>
        /// <param name="inputDtos"></param>
        /// <returns></returns>
        public async Task <OperationResult> Setting(params EquipmentBusinessNodeMapManageInputDto[] inputDtos)
        {
            inputDtos.CheckNotNull("inputDtos");
            OperationResult result  = new OperationResult();
            OperationResult result2 = new OperationResult();

            foreach (var inputDto in inputDtos)
            {
                int count = inputDto.DeviceNodeList.Count();
                if (count >= 0)
                {
                    ProductionProcessEquipmentBusinessNodeMapRepository.UnitOfWork.BeginTransaction();
                    var oldmaplist = ProductionProcessEquipmentBusinessNodeMapRepository.TrackEntities.Where(x => x.Equipment_Id == inputDto.Equipment_Id && x.BusinessNode.Id == inputDto.BusinessNode_Id && x.ProductionProcessInfo_Id == inputDto.ProductionProcessInfo_Id);
                    int count0     = oldmaplist.Count();
                    if (count0 > 0)
                    {
                        Guid[] mapIds = new Guid[count0];
                        mapIds  = oldmaplist.Select(x => x.Id).ToArray();
                        result2 = await ProductionProcessEquipmentBusinessNodeMapRepository.DeleteAsync(mapIds);
                    }
                    if (count == 0 && count0 > 0)
                    {
                        result = result2;
                    }
                    if ((result2.Successed || count0 == 0) && count > 0)
                    {
                        ProductionProcessEquipmentBusinessNodeMapInputDto[] map_dtos = new ProductionProcessEquipmentBusinessNodeMapInputDto[count];
                        for (int i = 0; i < count; i++)
                        {
                            ProductionProcessEquipmentBusinessNodeMapInputDto edto = new ProductionProcessEquipmentBusinessNodeMapInputDto();
                            edto.Equipment_Id = inputDto.Equipment_Id;
                            var id = inputDto.DeviceNodeList[i].Id;
                            edto.DeviceNode               = DeviceNodeRepository.TrackEntities.Where(m => m.Id == id).FirstOrDefault();
                            edto.BusinessNode             = BusinessNodeRepository.TrackEntities.Where(m => m.Id == inputDto.BusinessNode_Id).FirstOrDefault();
                            edto.ProductionProcessInfo_Id = inputDto.ProductionProcessInfo_Id;
                            edto.CreatorUserId            = inputDto.CreatorUserId;
                            edto.CreatedTime              = inputDto.CreatedTime;
                            edto.LastUpdatedTime          = inputDto.LastUpdatedTime;
                            edto.LastUpdatorUserId        = inputDto.LastUpdatorUserId;
                            if (Equals(edto.BusinessNode, null))
                            {
                                return(new OperationResult(OperationResultType.Error, "对应的通讯业务信息不存在,该组数据不被存储。"));
                            }
                            if (Equals(edto.DeviceNode, null))
                            {
                                return(new OperationResult(OperationResultType.Error, "对应的数据点不存在,该组数据不被存储。"));
                            }
                            //if (Equals(edto.ProductionProcessInfo_Id, Guid.Empty))
                            //{
                            //    return new OperationResult(OperationResultType.Error, "对应的工序为空,该组数据不被存储。");
                            //}
                            map_dtos[i] = edto;
                        }

                        result = await ProductionProcessEquipmentBusinessNodeMapRepository.InsertAsync(map_dtos);
                    }
                    ProductionProcessEquipmentBusinessNodeMapRepository.UnitOfWork.Commit();
                }
                else
                {
                    return(new OperationResult(OperationResultType.Error, $"设备业务点表数据异常,该组数据不被存储。"));
                }
            }
            return(result);
        }
        public async Task <IHttpActionResult> Update(ProductionProcessEquipmentBusinessNodeMapInputDto inputDto)
        {
            var result = await ProductionProcessEquipmentBusinessNodeMapContract.EditBusinessNodeMaps(inputDto);

            return(Json(result));
        }