/// <summary> /// 获取默认显示的库存信息 /// </summary> /// <param name="request"></param> /// <returns></returns> private async Task <ResponsePagingBase> GetStatisticsStockShopDefault(GetStatisticsStockShopPageRequest request) { Tuple <IEnumerable <DbStatisticsStockViewShop>, int> statisticsStockShopView = null; switch (_appTicket.DataLimitType) { case (int)DataLimitTypeEnum.All: var province = await _areaBll.GetProvince(); statisticsStockShopView = await _reportBll.GetStatisticsStockShop(request, string.Join(',', province.Select(p => p.AreaId)), AreaLevelEnum.Province); break; case (int)DataLimitTypeEnum.Area: if (!string.IsNullOrEmpty(_appTicket.DataLimitArea)) { var areaInfo = await ComLib.GetGetAreaStatisticsAreaId(_areaBll, _appTicket.DataLimitArea); statisticsStockShopView = await _reportBll.GetStatisticsStockShop(request, areaInfo.Item1, areaInfo.Item2); } break; case (int)DataLimitTypeEnum.Shop: if (!string.IsNullOrEmpty(_appTicket.DataLimitShop)) { statisticsStockShopView = await _reportBll.GetStatisticsStockShopByShop(request, _appTicket.DataLimitShop); } break; } var result = await GetStatisticsStockShopView(statisticsStockShopView, request.Type); var recordCount = statisticsStockShopView == null ? 0 : statisticsStockShopView.Item2; return(ResponsePagingBase.Success(result, recordCount)); }