namespace Oms.Application.Dtos.Monitor;
///
/// 实时监控页概览数据。
///
public class MonitorOverviewOutput
{
public MonitorOrderStatsOutput Order { get; set; } = new();
public MonitorCustomerStatsOutput Customer { get; set; } = new();
///
/// 经营指标(订单量/营收/毛利)按日周月维度。
///
public MonitorOpsStatsOutput Ops { get; set; } = new();
///
/// 实时积压队列(不随维度变化)。
///
public MonitorQueueStatsOutput Queue { get; set; } = new();
///
/// 订单趋势(随 dimension 变化;兼容字段名 OrderTrend7d 在 day 时等同本字段)。
///
public List OrderTrend { get; set; } = [];
///
/// 近 7 日新增订单趋势(兼容旧前端;dimension=day 时与 OrderTrend 相同)。
///
public List OrderTrend7d { get; set; } = [];
///
/// 营收/毛利趋势(随 dimension 变化)。
///
public List RevenueTrend { get; set; } = [];
///
/// 近 7 日营收/毛利趋势(兼容旧前端;dimension=day 时与 RevenueTrend 相同)。
///
public List RevenueTrend7d { get; set; } = [];
///
/// 各线路订单趋势(周/月由前端切换,此处预载两种维度)。
///
public MonitorRegionTrendBundleOutput RegionOrderTrend { get; set; } = new();
///
/// 各线路应收趋势。
///
public MonitorRegionTrendBundleOutput RegionReceivableTrend { get; set; } = new();
///
/// 各线路签收达标率(基于派送成功/失败订单)。
///
public List RegionSignRates { get; set; } = [];
///
/// 轨迹 KPI 汇总(完整率/及时率/OTD,基于订单妥投比例估算)。
///
public MonitorTrackRatesOutput TrackRates { get; set; } = new();
}
///
/// 经营 KPI:订单量 / 营收 / 毛利(随日周月)。
///
public class MonitorOpsStatsOutput
{
/// day / week / month
public string Dimension { get; set; } = "day";
/// 当前周期新建订单数。
public int OrderCount { get; set; }
/// 订单量环比增长百分比。
public decimal? OrderCountGrowthPercent { get; set; }
/// 当前周期应收(已付)营收。
public decimal Revenue { get; set; }
/// 营收环比增长百分比。
public decimal? RevenueGrowthPercent { get; set; }
/// 当前周期毛利 = 应收 - 应付。
public decimal GrossProfit { get; set; }
/// 毛利环比增长百分比。
public decimal? GrossProfitGrowthPercent { get; set; }
}
///
/// 实时积压快照(不受日周月影响)。
///
public class MonitorQueueStatsOutput
{
public int PendingPayment { get; set; }
public int PendingOnline { get; set; }
public int PendingSign { get; set; }
public int Problematic { get; set; }
}
public class MonitorOrderStatsOutput
{
public int TodayCreated { get; set; }
public decimal? TodayCreatedGrowthPercent { get; set; }
public int Total { get; set; }
public decimal? TotalMonthGrowthPercent { get; set; }
public int PendingPayment { get; set; }
public int PendingOnline { get; set; }
public int PendingSign { get; set; }
public int Problematic { get; set; }
public decimal TodayRevenue { get; set; }
public decimal? TodayRevenueGrowthPercent { get; set; }
}
public class MonitorCustomerStatsOutput
{
public int TotalCustomers { get; set; }
public decimal? TotalCustomersMonthGrowthPercent { get; set; }
public int NewCustomersToday { get; set; }
public decimal? NewCustomersGrowthPercent { get; set; }
public int OnlineCustomers { get; set; }
public int InactiveLogin7d { get; set; }
public int InactiveLogin7dDelta { get; set; }
}
public class MonitorTrendPointOutput
{
public string Label { get; set; } = string.Empty;
public int Count { get; set; }
}
public class MonitorRevenueTrendPointOutput
{
public string Label { get; set; } = string.Empty;
public decimal Revenue { get; set; }
public decimal GrossProfit { get; set; }
}
public class MonitorRegionTrendBundleOutput
{
public MonitorRegionTrendPeriodOutput Week { get; set; } = new();
public MonitorRegionTrendPeriodOutput Month { get; set; } = new();
}
public class MonitorRegionTrendPeriodOutput
{
public List Labels { get; set; } = [];
public List Series { get; set; } = [];
}
public class MonitorRegionSeriesOutput
{
public string Region { get; set; } = string.Empty;
public List Values { get; set; } = [];
}
public class MonitorRegionRateOutput
{
public string Region { get; set; } = string.Empty;
public decimal Rate { get; set; }
}
public class MonitorTrackRatesOutput
{
public decimal TrackCompleteRate { get; set; }
public decimal TrackTimelyRate { get; set; }
public decimal OtdRate { get; set; }
}