diff --git a/Service/MyTask/CountDayOrderTask.cs b/Service/MyTask/CountDayOrderTask.cs index c29d736..9172aaf 100644 --- a/Service/MyTask/CountDayOrderTask.cs +++ b/Service/MyTask/CountDayOrderTask.cs @@ -146,15 +146,16 @@ public class CountDayOrderTask : ITask .Sum(order => (order.SwapEndTime.Value - order.SwapBeginTime.Value).TotalMinutes); // 赋值 - dayCount.AvgChgTime = avgMinutes.ToString(); - dayCount.AvgRepTime = avgRepTime.ToString(); - dayCount.SwapDate = DateTime.Now.ToString(); + dayCount.AvgChgTime = avgMinutes.ToString("F2"); + dayCount.AvgRepTime = avgRepTime.ToString("F2"); + dayCount.SwapDate = DateTime.Now.AddDays(-1).ToString(); + dayCount.FristSwapTime = firstSwapOrder?.SwapBeginTime?.ToString() ?? null; dayCount.StopTime = lastSwapOrder?.SwapEndTime?.ToString() ?? null; dayCount.ChgCount = chgCount; dayCount.ToltalSwapCount = totalSwapCount; - dayCount.ToltalSwapAllTime = totalMinutes; + dayCount.ToltalSwapAllTime = Math.Round(totalMinutes, 2); dayCount.State = StaticStationInfo.StationStatus; _ExStationDayRunResultService.Insert(dayCount); diff --git a/Service/Station/ChargeOrderService.cs b/Service/Station/ChargeOrderService.cs index 61c04a8..b350526 100644 --- a/Service/Station/ChargeOrderService.cs +++ b/Service/Station/ChargeOrderService.cs @@ -195,7 +195,7 @@ public class ChargeOrderService : BaseServices // 昨天 23:59:59 DateTime endOfYesterday = startOfYesterday.AddDays(1).AddTicks(-1); - Expression> predicate = x => x.CreatedTime >= startOfYesterday && x.CreatedTime <= endOfYesterday; + Expression> predicate = x => x.StartTime >= startOfYesterday && x.StartTime <= endOfYesterday; return QueryListByClause(predicate); } diff --git a/Service/Station/SwapOrderService.cs b/Service/Station/SwapOrderService.cs index 319927b..a264f59 100644 --- a/Service/Station/SwapOrderService.cs +++ b/Service/Station/SwapOrderService.cs @@ -187,7 +187,7 @@ public class SwapOrderService : BaseServices // 昨天 23:59:59 DateTime endOfYesterday = startOfYesterday.AddDays(1).AddTicks(-1); - Expression> predicate = x => x.CreatedTime >= startOfYesterday && x.CreatedTime <= endOfYesterday; + Expression> predicate = x => x.SwapBeginTime >= startOfYesterday && x.SwapBeginTime <= endOfYesterday; return QueryListByClause(predicate); }