| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223 |
- namespace Admin.NET.Plugin.AiDOP.Dto.S8.OrderFlow;
- /// <summary>
- /// ORDER-FLOW-S8-INTEGRATED-DOMAIN-RESET-1 t3a:S8 订单执行链路 DTO 契约。
- /// 仅定义类型,不携带业务常量 / 不引用 Entity / 不接 service 逻辑。
- /// 后续 t3b/t3c 切片负责 service + controller 把 DTO 接到 ado_s8_order_flow_* 与 ado_s8_exception 实时聚合。
- /// </summary>
- #region 订单档案
- public class AdoS8OrderFlowOrderQueryDto
- {
- public long? TenantId { get; set; }
- public long? FactoryId { get; set; }
- public string? Keyword { get; set; }
- public string? CurrentFlowCode { get; set; }
- public string? CustomerCode { get; set; }
- public string? ProductLine { get; set; }
- public string? Region { get; set; }
- public string? WorkflowStatus { get; set; }
- public string? ScenarioCode { get; set; }
- }
- public class AdoS8OrderFlowOrderListItemDto
- {
- public string OrderCode { get; set; } = string.Empty;
- public string ProductName { get; set; } = string.Empty;
- public string ProductLine { get; set; } = string.Empty;
- public string CustomerCode { get; set; } = string.Empty;
- public string CustomerName { get; set; } = string.Empty;
- public string CustomerType { get; set; } = string.Empty;
- public string Region { get; set; } = string.Empty;
- public string Priority { get; set; } = string.Empty;
- public string WorkflowStatus { get; set; } = string.Empty;
- public string CurrentOrderFlowCode { get; set; } = string.Empty;
- public string CurrentOrderFlowName { get; set; } = string.Empty;
- public string CurrentStatus { get; set; } = string.Empty;
- public DateTime ReleaseAt { get; set; }
- public decimal TargetCycleDays { get; set; }
- public decimal? ActualCycleDays { get; set; }
- public decimal? CurrentCycleDays { get; set; }
- public decimal? NodeVarianceDays { get; set; }
- public decimal? CumulativeVarianceDays { get; set; }
- /// <summary>来自 ado_s8_exception 实时聚合(order 主档表无 exception_count 列)。</summary>
- public int ExceptionCount { get; set; }
- public string ExceptionStatus { get; set; } = string.Empty;
- public int? ResponseMinutes { get; set; }
- public int? ProcessingMinutes { get; set; }
- public int? TotalLossMinutes { get; set; }
- public string ScenarioCode { get; set; } = string.Empty;
- public string DataSource { get; set; } = string.Empty;
- }
- public class AdoS8OrderFlowOrderDetailDto : AdoS8OrderFlowOrderListItemDto
- {
- public List<AdoS8OrderFlowStageDto> Lifecycle { get; set; } = new();
- }
- #endregion
- #region 阶段 / L2 / L3
- public class AdoS8OrderFlowStageDto
- {
- public string OrderFlowCode { get; set; } = string.Empty;
- public string OrderFlowName { get; set; } = string.Empty;
- public string? OwnerDept { get; set; }
- public int SortNo { get; set; }
- public decimal PlannedDays { get; set; }
- public decimal? ActualDays { get; set; }
- public DateTime TargetAt { get; set; }
- public DateTime? ActualStartAt { get; set; }
- public DateTime? ActualEndAt { get; set; }
- public string Status { get; set; } = string.Empty;
- public decimal? NodeVarianceDays { get; set; }
- public decimal? CumulativeVarianceDays { get; set; }
- public List<AdoS8OrderFlowSubstepDto> Substeps { get; set; } = new();
- }
- public class AdoS8OrderFlowSubstepDto
- {
- public string SubstepCode { get; set; } = string.Empty;
- public string SubstepName { get; set; } = string.Empty;
- public decimal PiHours { get; set; }
- public decimal? ActualHours { get; set; }
- public string Status { get; set; } = string.Empty;
- public int SortNo { get; set; }
- public List<AdoS8OrderFlowSubstepUnitDto> Units { get; set; } = new();
- }
- public class AdoS8OrderFlowSubstepUnitDto
- {
- public string UnitCode { get; set; } = string.Empty;
- public string UnitName { get; set; } = string.Empty;
- public decimal PiHours { get; set; }
- public decimal? ActualHours { get; set; }
- public string Status { get; set; } = string.Empty;
- public int SortNo { get; set; }
- }
- #endregion
- #region 订单 + 采购透视组合
- public class AdoS8OrderFlowChainDto
- {
- public AdoS8OrderFlowOrderDetailDto Order { get; set; } = new();
- public AdoS8OrderFlowProcurementPivotDto? ProcurementPivot { get; set; }
- }
- #endregion
- #region 聚合 / Baseline
- public class AdoS8OrderFlowAggregateQueryDto
- {
- public long? TenantId { get; set; }
- public long? FactoryId { get; set; }
- public string Scope { get; set; } = string.Empty;
- public List<string>? OrderCodes { get; set; }
- }
- public class AdoS8OrderFlowAggregateDto
- {
- public string Scope { get; set; } = string.Empty;
- public int TotalOrders { get; set; }
- public int TotalCustomers { get; set; }
- public decimal AvgResponseMinutes { get; set; }
- public decimal AvgProcessingMinutes { get; set; }
- public decimal AvgLossMinutes { get; set; }
- public List<AdoS8OrderFlowStageAggregateDto> StageAggregates { get; set; } = new();
- }
- public class AdoS8OrderFlowStageAggregateDto
- {
- public string OrderFlowCode { get; set; } = string.Empty;
- public string OrderFlowName { get; set; } = string.Empty;
- public decimal KpiAvgDays { get; set; }
- public decimal ActualAvgDays { get; set; }
- /// <summary>整数百分比(例如 59 / 96 / 85 / 89 / 96),不是 0.59 小数。</summary>
- public int OnTimeRate { get; set; }
- public int Green { get; set; }
- public int Yellow { get; set; }
- public int Red { get; set; }
- public int Pending { get; set; }
- }
- #endregion
- #region 采购透视
- public class AdoS8OrderFlowProcurementPivotQueryDto
- {
- public long? TenantId { get; set; }
- public long? FactoryId { get; set; }
- public string Scope { get; set; } = string.Empty;
- public List<string>? OrderCodes { get; set; }
- }
- public class AdoS8OrderFlowProcurementPivotDto
- {
- public string Scope { get; set; } = string.Empty;
- public List<AdoS8OrderFlowKeyMaterialDto> KeyMaterials { get; set; } = new();
- public List<AdoS8OrderFlowSupplierBreakdownDto> SupplierBreakdown { get; set; } = new();
- public List<AdoS8OrderFlowSpecBreakdownDto> SpecBreakdown { get; set; } = new();
- public Dictionary<string, List<AdoS8OrderFlowProcurementMatrixRowDto>> MatrixByMaterial { get; set; } = new();
- }
- public class AdoS8OrderFlowKeyMaterialDto
- {
- public string MaterialCode { get; set; } = string.Empty;
- public decimal AvgCycleDays { get; set; }
- public string CycleStatus { get; set; } = string.Empty;
- public int? ImpactCount { get; set; }
- public decimal? KitRate { get; set; }
- public string ResultStatus { get; set; } = string.Empty;
- }
- public class AdoS8OrderFlowSupplierBreakdownDto
- {
- public string MaterialCode { get; set; } = string.Empty;
- public string SupplierCode { get; set; } = string.Empty;
- public decimal AvgCycleDays { get; set; }
- public string Status { get; set; } = string.Empty;
- }
- public class AdoS8OrderFlowSpecBreakdownDto
- {
- public string MaterialCode { get; set; } = string.Empty;
- public string SpecCode { get; set; } = string.Empty;
- public decimal AvgCycleDays { get; set; }
- public string Status { get; set; } = string.Empty;
- }
- public class AdoS8OrderFlowProcurementMatrixRowDto
- {
- public string SupplierCode { get; set; } = string.Empty;
- public Dictionary<string, AdoS8OrderFlowProcurementMatrixCellDto> Cells { get; set; } = new();
- }
- public class AdoS8OrderFlowProcurementMatrixCellDto
- {
- public decimal CycleDays { get; set; }
- public string Status { get; set; } = string.Empty;
- }
- #endregion
- #region 关联异常
- public class AdoS8OrderFlowRelatedExceptionQueryDto
- {
- public long? TenantId { get; set; }
- public long? FactoryId { get; set; }
- public string OrderCode { get; set; } = string.Empty;
- public string? OrderFlowCode { get; set; }
- }
- #endregion
|