AdoDemoOrderFlowDtos.cs 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. namespace Admin.NET.Plugin.AiDOP.Dto.S8.Demo;
  2. /// <summary>
  3. /// ORDER-FLOW-BE-DEMO-DATASET-RESET-1:阶段子表 DTO。
  4. /// 时间字符串:expected_date = "YYYY-MM-DD";actual_*_at = "YYYY-MM-DD HH:mm"。
  5. /// </summary>
  6. public class AdoDemoOrderFlowStageDto
  7. {
  8. public string StageKey { get; set; } = string.Empty;
  9. public string StageName { get; set; } = string.Empty;
  10. public int SortNo { get; set; }
  11. public decimal PlannedDays { get; set; }
  12. public decimal? ActualDays { get; set; }
  13. public string ExpectedDate { get; set; } = string.Empty;
  14. public string? ActualStartAt { get; set; }
  15. public string? ActualEndAt { get; set; }
  16. public string Status { get; set; } = "pending";
  17. public decimal? NodeVarianceDays { get; set; }
  18. public decimal? CumulativeVarianceDays { get; set; }
  19. }
  20. /// <summary>
  21. /// ORDER-FLOW-BE-DEMO-DATASET-RESET-1:订单主表 DTO,含完整 5 阶段 lifecycle。
  22. /// 由 /api/aidop/s8/demo/order-flow/orders 返回。
  23. /// </summary>
  24. public class AdoDemoOrderFlowDto
  25. {
  26. public string SoNo { get; set; } = string.Empty;
  27. public string ProductName { get; set; } = string.Empty;
  28. public string ProductLine { get; set; } = string.Empty;
  29. public string CustomerName { get; set; } = string.Empty;
  30. public string CustomerCode { get; set; } = string.Empty;
  31. public string CustomerType { get; set; } = "KA";
  32. public string Region { get; set; } = string.Empty;
  33. public string Priority { get; set; } = "P2";
  34. public string MaterialCode { get; set; } = "XX";
  35. public string SupplierGroup { get; set; } = "A";
  36. public string WorkflowStatus { get; set; } = "completed";
  37. public string CurrentNodeKey { get; set; } = "final_assembly_shipping";
  38. public string FocusNodeKey { get; set; } = "final_assembly_shipping";
  39. public string CurrentNodeLabel { get; set; } = "总装发货";
  40. public string NodeStatus { get; set; } = "green";
  41. public string ReleaseAt { get; set; } = string.Empty;
  42. public decimal TargetCycleDays { get; set; }
  43. public decimal? CurrentCycleDays { get; set; }
  44. public decimal? ActualCycleDays { get; set; }
  45. public decimal? NodeVarianceDays { get; set; }
  46. public decimal? CumulativeVarianceDays { get; set; }
  47. public int ExceptionCount { get; set; }
  48. public int? ResponseMinutes { get; set; }
  49. public int? ProcessingMinutes { get; set; }
  50. public int? TotalLossMinutes { get; set; }
  51. public string ExceptionStatus { get; set; } = "已闭环";
  52. public List<AdoDemoOrderFlowStageDto> Lifecycle { get; set; } = new();
  53. }
  54. /// <summary>
  55. /// ORDER-FLOW-BE-DEMO-DATASET-RESET-1:基线聚合快照 DTO。
  56. /// 注意:本 DTO 不是 /orders 明细的实时聚合,而是 105 单基线展示快照(独立快照表 1 行)。
  57. /// 由 /api/aidop/s8/demo/order-flow/aggregate-snapshot 返回。
  58. /// </summary>
  59. public class AdoDemoOrderFlowSnapshotDto
  60. {
  61. public string SnapshotCode { get; set; } = "CHAIN_AGGREGATE_BASELINE";
  62. public string SnapshotLabel { get; set; } = "基线聚合 · 样本 105";
  63. public int TotalOrders { get; set; }
  64. public int TotalCustomers { get; set; }
  65. public decimal AvgResponseMinutes { get; set; }
  66. public decimal AvgProcessingMinutes { get; set; }
  67. public decimal AvgLossMinutes { get; set; }
  68. public List<AdoDemoOrderFlowStageSnapshotItem> StageSnapshots { get; set; } = new();
  69. public string? Remark { get; set; }
  70. }
  71. public class AdoDemoOrderFlowStageSnapshotItem
  72. {
  73. public string StageKey { get; set; } = string.Empty;
  74. public string StageName { get; set; } = string.Empty;
  75. public string OwnerDept { get; set; } = string.Empty;
  76. public decimal KpiAvgDays { get; set; }
  77. public decimal ActualAvgDays { get; set; }
  78. public int OnTimeRate { get; set; }
  79. public int Green { get; set; }
  80. public int Yellow { get; set; }
  81. public int Red { get; set; }
  82. public int Pending { get; set; }
  83. }