protected Period3Dto GetPeriodDto(int type, Period3Dto data, int Period, int[] OrdersStatus, int?OrderType, int?OrderType2, DateTime?Day) { foreach (var i in OrdersStatus) { int?OrderStatus = null; if (i == 2) { OrderStatus = 30; switch (type) { //case 0: // data.AllCancel = GetOrderResult(Period, OrderType, OrderType2, OrderStatus, DayList); // break; case 1: data.ForthwithCancel = GetOrderResult(Period, OrderType, OrderType2, OrderStatus, Day); break; case 2: data.OrderCancel = GetOrderResult(Period, OrderType, OrderType2, OrderStatus, Day); break; case 3: data.AirportPickupCancel = GetOrderResult(Period, OrderType, OrderType2, OrderStatus, Day); break; case 4: data.AirportDropOffCancel = GetOrderResult(Period, OrderType, OrderType2, OrderStatus, Day); break; } } else { switch (type) { //case 0: // data.AllSucces = GetOrderResult(Period, OrderType, OrderType2, OrderStatus, DayList); // break; case 1: data.ForthwithSucces = GetOrderResult(Period, OrderType, OrderType2, OrderStatus, Day); break; case 2: data.OrderSucces = GetOrderResult(Period, OrderType, OrderType2, OrderStatus, Day); break; case 3: data.AirportPickupSuccess = GetOrderResult(Period, OrderType, OrderType2, OrderStatus, Day); break; case 4: data.AirportDropOffSucces = GetOrderResult(Period, OrderType, OrderType2, OrderStatus, Day); break; } } } return(data); }
public Dictionary <string, Period3Dto> ByTheHour(ByTheHour3ResultRequestDto input) { var datalist = new Dictionary <string, Period3Dto>(); foreach (var Day in input.DayList) { var data = new Period3Dto(); foreach (var i in input.OrderType) { int?OrderType = null; int?OrderType2 = null; switch (i) { //case 0: // data = GetPeriodDto(i, data, 0, input.OrderStatus, OrderType, OrderType2, input.DayList); // break; case 1: OrderType = 1; data = GetPeriodDto(i, data, 0, input.OrderStatus, OrderType, OrderType2, Day); break; case 2: OrderType = 2; OrderType2 = 0; foreach (var j in input.OrderStatus) { data = GetPeriodDto(i, data, 0, input.OrderStatus, OrderType, OrderType2, Day); } break; case 3: OrderType = 2; OrderType2 = 1; data = GetPeriodDto(i, data, 0, input.OrderStatus, OrderType, OrderType2, Day); break; case 4: OrderType = 2; OrderType2 = 2; data = GetPeriodDto(i, data, 0, input.OrderStatus, OrderType, OrderType2, Day); break; } } datalist.Add(Day.ToLocalTime().ToString("yyyy-MM-dd"), data); } return(datalist); }
public Period3Dto Period(Period3ResultRequestDto input) { var data = new Period3Dto(); foreach (var i in input.OrderType) { int?OrderType = null; int?OrderType2 = null; switch (i) { //case 0: // data = GetPeriodDto(i, data, input.Period, input.OrderStatus, OrderType, OrderType2, null); // break; case 1: OrderType = 1; data = GetPeriodDto(i, data, input.Period, input.OrderStatus, OrderType, OrderType2, null); break; case 2: OrderType = 2; OrderType2 = 0; data = GetPeriodDto(i, data, input.Period, input.OrderStatus, OrderType, OrderType2, null); break; case 3: OrderType = 2; OrderType2 = 1; data = GetPeriodDto(i, data, input.Period, input.OrderStatus, OrderType, OrderType2, null); break; case 4: OrderType = 2; OrderType2 = 2; data = GetPeriodDto(i, data, input.Period, input.OrderStatus, OrderType, OrderType2, null); break; } } return(data); }