public List <ResponseChartModel> GetShopTrafficChartResult(PeriodOfTimeChartModel periodOfTimeChartModel) { int kindOfShop = 0; if (periodOfTimeChartModel.OptionShop.Equals("option1")) { kindOfShop = 1; } else if (periodOfTimeChartModel.OptionShop.Equals("option2")) { kindOfShop = 2; } DateTime tempDate = periodOfTimeChartModel.startDate; List <ResponseChartModel> responseChart = new List <ResponseChartModel>(); while (tempDate <= periodOfTimeChartModel.endDate) { responseChart.Add(GetValuesInPeriodOfTime(tempDate, kindOfShop)); tempDate = tempDate.AddHours(1); } return(responseChart); }
public ActionResult <List <ResponseChartModel> > GetShopTrafficChartResult([FromBody] PeriodOfTimeChartModel periodOfTimeChart) { var result = _temperatureService.GetShopTrafficChartResult(periodOfTimeChart); return(result); }