/// <summary> /// 获取默认数据 /// </summary> /// <param name="request"></param> /// <returns></returns> private async Task <ResponsePagingBase> GetStatisticsRetailShopDefault(GetStatisticsRetailShopPageRequest request) { Tuple <IEnumerable <DbStatisticsRetailViewShop>, int> statisticsRetailShop = 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(); statisticsRetailShop = await _reportBll.GetStatisticsRetailShop(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); statisticsRetailShop = await _reportBll.GetStatisticsRetailShop(request, areaInfo.Item1, statisticsTime.Item1, statisticsTime.Item2, areaInfo.Item2); arealevel = areaInfo.Item2; } break; case (int)DataLimitTypeEnum.Shop: if (!string.IsNullOrEmpty(_appTicket.DataLimitShop)) { statisticsRetailShop = await _reportBll.GetStatisticsRetailShopByShop(request, _appTicket.DataLimitShop, statisticsTime.Item1, statisticsTime.Item2); arealevel = AreaLevelEnum.Street; } break; } var result = await GetStatisticsRetailViewShop(statisticsTime.Item1, statisticsTime.Item2, statisticsRetailShop, request.Type, arealevel); var recordCount = statisticsRetailShop == null ? 0 : statisticsRetailShop.Item2; return(ResponsePagingBase.Success(result, recordCount)); }