public virtual async Task <PagedResultDto <DocumentDto> > GetAllAsync(GetAllInput input)
 {
     return(await RequestAsync <PagedResultDto <DocumentDto> >(nameof(GetAllAsync), new ClientProxyRequestTypeValue
     {
         { typeof(GetAllInput), input }
     }));
 }
        public async Task <ListResultDto <DynamicEntityPropertyValueDto> > GetAll(GetAllInput input)
        {
            var entities = await _dynamicEntityPropertyValueManager.GetValuesAsync(input.PropertyId, input.EntityId);

            return(new ListResultDto <DynamicEntityPropertyValueDto>(
                       ObjectMapper.Map <List <DynamicEntityPropertyValueDto> >(entities)
                       ));
        }
Example #3
0
        public async Task <ListResultDto <EntityDynamicParameterValueDto> > GetAll(GetAllInput input)
        {
            var entities = await _entityDynamicParameterValueManager.GetValuesAsync(input.ParameterId, input.EntityId);

            return(new ListResultDto <EntityDynamicParameterValueDto>(
                       ObjectMapper.Map <List <EntityDynamicParameterValueDto> >(entities)
                       ));
        }
Example #4
0
        public async Task <PagedResultDto <OSSObjectDto> > GetAll(GetAllInput input)
        {
            var funTagNames = new List <string>();

            if (!input.SysFunName.IsNullOrEmpty())
            {
                var tags = await _sysFunTagRepository
                           .GetAll()
                           .Include(x => x.SysFun)
                           .Include(x => x.Tag)
                           .Where(x => x.SysFun.Name == input.SysFunName)
                           .Select(x => x.Tag.Name)
                           .ToListAsync();

                funTagNames.AddRange(tags);
            }

            if (input.Group.HasValue)
            {
                input.BucketName = _settingManager.GetSettingValue(AppSettingNames.OSS.ContextStore);
            }


            var thisBuckets = _bucketManage.GetBuckets().Select(x => x.Name).Distinct().ToList();

            var hiddenObjectAndSubs = await _aliyunOSSManage.GetHiddenObjects(thisBuckets).ToListAsync();

            IQueryable <OSSObject> q =
                _oSSObjectRepository
                .GetAll()
                .Include(x => x.ObjectTags)
                .Include("ObjectTags.Tag")
                .Where(x => x.Size > 0)
                .Where(x => thisBuckets.Contains(x.BucketName))
                .WhereIf(!input.BucketName.IsNullOrEmpty(), x => x.BucketName == input.BucketName)
                .WhereIf(!input.Name.IsNullOrEmpty(), x => x.Name.Contains(input.Name))
                .WhereIf(input.Group.HasValue, x => x.Key.Contains("" + input.Group))
                .WhereIf(input.TagNames != null && input.TagNames.Count > 0, x => x.ObjectTags.Select(o => o.Tag.Name.ToLower()).Intersect(input.TagNames.Select(t => t.ToLower())).Any())
                .WhereIf(input.ExtensionNames != null && input.ExtensionNames.Length > 0, x => input.ExtensionNames.Select(t => t.ToLower()).Any(e => x.ExtensionName.ToLower().Contains(e)))
                .WhereIf(!input.SysFunName.IsNullOrEmpty(), x => x.ObjectTags.Select(o => o.Tag.Name).Intersect(funTagNames).Any())
                .WhereIf(!input.Group.HasValue, x => !hiddenObjectAndSubs.Contains(x.Id)) // 不显示隐藏文件
                .GroupBy(x => x.ETag)
                .Select(x => x.FirstOrDefault())
                .OrderBy(x => x.Id)
            ;
            var count = await q.CountAsync();

            q = q.PageBy(input.SkipCount, input.MaxResultCount);

            var data = await q.ToListAsync();

            var dataR = data
                        .Select(x => _aliyunOSSManage.OssObjectToOSSObjectDto(x))
                        .ToList();

            _unitOfWorkManager.Current.SaveChanges();
            return(new PagedResultDto <OSSObjectDto>(count, dataR));
        }
Example #5
0
        /// <summary>
        /// 分页获取订单列表
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        public Task <PagedResultDto <OrderDto> > GetAll(GetAllInput input)
        {
            var query  = _orderManage.GetAll(input.No, input.Customer, input.BeginTime, input.EndTime);
            var result = query.OrderByDescending(o => o.Id)
                         .Skip(input.SkipCount)
                         .Take(input.MaxResultCount);

            return(Task.FromResult(new PagedResultDto <OrderDto>
            {
                TotalCount = result.Count(),
                Items = ObjectMapper.Map <List <OrderDto> >(query)
            }));
        }
        public PagedResultDto <OrganizationDto> GetAll(GetAllInput input)
        {
            var query = _organizationRepo.GetAll()
                        .WhereIf(!String.IsNullOrEmpty(input.FilterName),
                                 k => k.Name.ToLower().Contains(input.FilterName.ToLower()));

            var totalCount = query.Count();

            query = query.Paging(input);

            var result = Mapper.Map <IReadOnlyList <OrganizationDto> >(query.ToList());

            return(new PagedResultDto <OrganizationDto>(result, totalCount));
        }
Example #7
0
        public virtual async Task <PagedResultDto <FJOutput> > GetAllList(GetAllInput input)
        {
            var data = _fjRepository.GetAll().Where(
                x =>
                input.States.Contains(x.State)
                );

            var count = await data.CountAsync();

            var list = await data.OrderByDescending(x => x.CreationTime).Skip(input.SkipCount).Take(input.MaxResultCount).ToListAsync();

            var output = ObjectMapper.Map <List <FJOutput> >(list);

            return(new PagedResultDto <FJOutput>
            {
                Items = output,
                TotalCount = count
            });
        }
Example #8
0
 public Task <PagedResultDto <DocumentDto> > GetAllAsync(GetAllInput input)
 {
     return(_documentAdminAppService.GetAllAsync(input));
 }
        public IActionResult GetAll([FromQuery] GetAllInput input)
        {
            var list = _organizationAppService.GetAll(input);

            return(Result(list));
        }