namespace Oms.Application.Dtos.Orders;
///
/// 订单排货过程(快照或现算)。
///
public class OrderAllocationTraceOutput
{
public int OrderId { get; set; }
/// true=历史快照;false=按当前规则现算。
public bool FromSnapshot { get; set; }
public string? Scheme { get; set; }
public string? SchemeName { get; set; }
/// productDefault / reallocate / designated
public string? SchemeSource { get; set; }
public string? SchemeSourceName { get; set; }
public decimal? ChargeableWeight { get; set; }
/// 订单解析出的价格分区键(用于对照买价明细分区)。
public List ZoneKeys { get; set; } = [];
public string? ChargingStage { get; set; }
public string? ChargingStageName { get; set; }
public string? SelectedChannelCode { get; set; }
public string? SelectedChannelName { get; set; }
public string? FailReason { get; set; }
public DateTime? TraceTime { get; set; }
/// 排货池行数。
public int PoolCount { get; set; }
/// 判断条件通过的行数。
public int ConditionPassCount { get; set; }
/// 最终进入比选的候选数。
public int CandidateCount { get; set; }
public List Candidates { get; set; } = [];
public List Skipped { get; set; } = [];
}
public class OrderAllocationCandidateOutput
{
public int ServiceChannelId { get; set; }
public string ChannelCode { get; set; } = string.Empty;
public string? ChannelName { get; set; }
/// 应付合计(价格优先主指标)。
public decimal TotalPayableCost { get; set; }
/// 时效天数(时效优先主指标)。
public int? MinTime { get; set; }
/// 综合权重(综合最优主指标)。
public int Weight { get; set; }
public bool Selected { get; set; }
public List FeeLines { get; set; } = [];
}
public class OrderAllocationSkippedOutput
{
public int? ServiceChannelId { get; set; }
public string? ChannelCode { get; set; }
public string? ChannelName { get; set; }
/// 跳过阶段:condition / channel / buyPrice / customer。
public string? Stage { get; set; }
/// 当时评价的判断条件摘要(截断)。
public string? MatchCondition { get; set; }
public string Reason { get; set; } = string.Empty;
}
public class OrderAllocationFeeLineOutput
{
public string? CostItem { get; set; }
public decimal Amount { get; set; }
public string? Currency { get; set; }
}