public ExportResult Export(YearMonth yearMonth, string path, bool autoAdjust)
        {
            var builder     = new MonthlyReportBuilder(yearMonth);
            var workRecords = _DailyWorkRecordQueryService.SelectByYearMonth(yearMonth);
            var summary     = builder.Build(workRecords);

            return(_ReportDriver.ExportMonthlyReport(summary, path, autoAdjust));
        }
Пример #2
0
 public ApiController(
     IOptions <ApiControlerOptions> options,
     IPairRepository pairRepo,
     MonthlyReportBuilder monthlyReportBuilder,
     ILogger log
     )
 {
     this.RequiredSymbols      = options?.Value?.RequiredSymbols ?? throw new ArgumentNullException(nameof(RequiredSymbols));
     this.pairRepo             = pairRepo ?? throw new ArgumentNullException(nameof(pairRepo));
     this.monthlyReportBuilder = monthlyReportBuilder ?? throw new ArgumentNullException(nameof(monthlyReportBuilder));
     this.log = log?.ForContext(GetType());
 }
 public void Setup()
 {
     _MonthlyReportBuilder = new MonthlyReportBuilder(new YearMonth(2020, 5));
 }