/// <summary> /// 获取默认数据 /// </summary> /// <param name="request"></param> /// <returns></returns> private async Task <ResponsePagingBase> GetStatisticsPurchaseShopDefault(GetStatisticsPurchaseShopPageRequest request) { Tuple <IEnumerable <DbStatisticsPurchaseShopView>, int> statisticsPurchase = null; var statisticsTime = ComLib.GetAreaStatisticsTime(request.StartTime, request.EndTime); var arealevel = string.Empty; switch (_appTicket.DataLimitType) { case (int)DataLimitTypeEnum.All: var province = await _areaBll.GetProvince(); statisticsPurchase = await _reportBll.GetStatisticsPurchaseShop(request, string.Join(',', province.Select(p => p.AreaId)), statisticsTime.Item1, statisticsTime.Item2, AreaLevelEnum.Province); arealevel = AreaLevelEnum.Province; break; case (int)DataLimitTypeEnum.Area: if (!string.IsNullOrEmpty(_appTicket.DataLimitArea)) { var areaInfo = await ComLib.GetGetAreaStatisticsAreaId(_areaBll, _appTicket.DataLimitArea); statisticsPurchase = await _reportBll.GetStatisticsPurchaseShop(request, areaInfo.Item1, statisticsTime.Item1, statisticsTime.Item2, areaInfo.Item2); arealevel = areaInfo.Item2; } break; case (int)DataLimitTypeEnum.Shop: if (!string.IsNullOrEmpty(_appTicket.DataLimitShop)) { statisticsPurchase = await _reportBll.GetStatisticsPurchaseShopByShop(request, _appTicket.DataLimitShop, statisticsTime.Item1, statisticsTime.Item2); arealevel = AreaLevelEnum.Street; } break; } var result = await GetStatisticsPurchaseShopView(statisticsTime.Item1, statisticsTime.Item2, statisticsPurchase, request.Type, arealevel); var recordCount = statisticsPurchase == null ? 0 : statisticsPurchase.Item2; return(ResponsePagingBase.Success(result, recordCount)); }