Пример #1
0
        /// <summary>
        /// 执行
        /// </summary>
        /// <returns></returns>
        private async Task Execution()
        {
            var retailBillCount = await _statisticsBillCountBll.GetAllRetailBillCount(_startTime.ToTimestamp(), _endTime.ToTimestamp());

            if (retailBillCount == null || !retailBillCount.Any())
            {
                return;
            }
            foreach (var record in retailBillCount)
            {
                _reportBll.AddStatisticsRetailCount(new StatisticsRetailCount()
                {
                    BillCount    = record.BillCount,
                    City         = record.City,
                    District     = record.District,
                    EndTime      = _endTime,
                    OrgId        = record.OrgId,
                    Province     = record.Province,
                    ShopId       = record.ShopId,
                    ShopName     = record.ShopName,
                    StartTime    = _startTime,
                    Street       = record.Street,
                    StatisticsId = PrimaryKeyHelper.Instance.CreateID()
                }).Wait();
            }
        }