Exemplo n.º 1
0
        public async Task<DomainReport> GetLastAllDaysReport()
        {
            var queryObject = new ReportQueryObject
            {
                Interval = "All"
            };

            StandardReportV3Entity entity = await _repository.GetLastReport(queryObject);
            DomainReport domain = entity == null ? new DomainReport() : _reportMapper.ReportEntityToDomain(entity);

            return domain;
        }
Exemplo n.º 2
0
        public IEnumerable<DomainReport> GetDayReports(Interval interval)
        {
            string startTick = _tableValueConverter.DateTimeToTick(interval.Start);
            string finishTick = _tableValueConverter.DateTimeToTick(interval.Finish);

            var queryObject = new ReportQueryObject
            {
                StartInterval = startTick,
                EndInterval = finishTick,
                IsStartInclude = true,
                IsEndInclude = false,
                Interval = "1"
            };

            IEnumerable<DomainReport> result = _repository.GetReportEntities(queryObject)
                .Select(_reportMapper.ReportEntityToDomain);

            return result;
        }