public async Task <CategorySalesReportByYear> RetrieveCategorySalesReportByYearAsync( CategorySalesReportByYear master, string currentYear, string lastYear, CancellationToken cancellationToken = default) { return(await _genericService.Get <CategorySalesReportByYear>() .RetrieveReportAsync(master, new object[] { currentYear, lastYear }, cancellationToken)); }
private void queryPieReport() { String curDate = "2013-01-01"; var curYear = DateTime.Parse(curDate).Year.ToString(); var lastYear = DateTime.Parse(curDate).AddYears(-1).Year.ToString(); var master = new CategorySalesReportByYear(); categoryReportByYear = _reportService.RetrieveCategorySalesReportByYear(master, curYear, lastYear); //转换json String categorys = JsonConvert.SerializeObject(categoryReportByYear.SalesReportByCategory .Select(x => x.ProductCategoryName)); String categorysData = JsonConvert.SerializeObject(categoryReportByYear.SalesReportByCategory .Select(x => new { name = x.ProductCategoryName, value = x.TotalSalesqty })); categoryReportByYear.Json_Categorys = categorys; categoryReportByYear.Json_categorysData = categorysData; }
public CategorySalesReportByYear RetrieveCategorySalesReportByYear( CategorySalesReportByYear master, string currentYear, string lastYear) { return(_genericService.Get <CategorySalesReportByYear>().RetrieveReport(master, currentYear, lastYear)); }