All checks were successful
Build and Deploy / deploy (push) Successful in 1m49s
用 MatchCondition 中文公式筛选可用渠道后再按方案选渠;失败时落完整排货过程(阶段、公式摘要、池汇总),并兼容旧 CustomerIds。 Co-authored-by: Cursor <cursoragent@cursor.com>
100 lines
2.8 KiB
C#
100 lines
2.8 KiB
C#
namespace Oms.Application.Dtos.Orders;
|
||
|
||
/// <summary>
|
||
/// 订单排货过程(快照或现算)。
|
||
/// </summary>
|
||
public class OrderAllocationTraceOutput
|
||
{
|
||
public int OrderId { get; set; }
|
||
|
||
/// <summary>true=历史快照;false=按当前规则现算。</summary>
|
||
public bool FromSnapshot { get; set; }
|
||
|
||
public string? Scheme { get; set; }
|
||
|
||
public string? SchemeName { get; set; }
|
||
|
||
/// <summary>productDefault / reallocate / designated</summary>
|
||
public string? SchemeSource { get; set; }
|
||
|
||
public string? SchemeSourceName { get; set; }
|
||
|
||
public decimal? ChargeableWeight { get; set; }
|
||
|
||
/// <summary>订单解析出的价格分区键(用于对照买价明细分区)。</summary>
|
||
public List<string> 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; }
|
||
|
||
/// <summary>排货池行数。</summary>
|
||
public int PoolCount { get; set; }
|
||
|
||
/// <summary>判断条件通过的行数。</summary>
|
||
public int ConditionPassCount { get; set; }
|
||
|
||
/// <summary>最终进入比选的候选数。</summary>
|
||
public int CandidateCount { get; set; }
|
||
|
||
public List<OrderAllocationCandidateOutput> Candidates { get; set; } = [];
|
||
|
||
public List<OrderAllocationSkippedOutput> Skipped { get; set; } = [];
|
||
}
|
||
|
||
public class OrderAllocationCandidateOutput
|
||
{
|
||
public int ServiceChannelId { get; set; }
|
||
|
||
public string ChannelCode { get; set; } = string.Empty;
|
||
|
||
public string? ChannelName { get; set; }
|
||
|
||
/// <summary>应付合计(价格优先主指标)。</summary>
|
||
public decimal TotalPayableCost { get; set; }
|
||
|
||
/// <summary>时效天数(时效优先主指标)。</summary>
|
||
public int? MinTime { get; set; }
|
||
|
||
/// <summary>综合权重(综合最优主指标)。</summary>
|
||
public int Weight { get; set; }
|
||
|
||
public bool Selected { get; set; }
|
||
|
||
public List<OrderAllocationFeeLineOutput> FeeLines { get; set; } = [];
|
||
}
|
||
|
||
public class OrderAllocationSkippedOutput
|
||
{
|
||
public int? ServiceChannelId { get; set; }
|
||
|
||
public string? ChannelCode { get; set; }
|
||
|
||
public string? ChannelName { get; set; }
|
||
|
||
/// <summary>跳过阶段:condition / channel / buyPrice / customer。</summary>
|
||
public string? Stage { get; set; }
|
||
|
||
/// <summary>当时评价的判断条件摘要(截断)。</summary>
|
||
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; }
|
||
}
|