namespace Admin.NET.Plugin.AiDOP.Dto.S8; /// /// 大屏卡片数据出参(GET /api/aidop/s8/dashboard/cell-data)。 /// 结构平铺:value 为主指标;breakdown 为可选的明细分组(按部门或异常类型等)。 /// public class AdoS8CellDataDto { public string CellCode { get; set; } = string.Empty; public string PageCode { get; set; } = string.Empty; /// 卡片标题(来自配置 cell_title;若空由前端走组件默认) public string? Title { get; set; } /// binding_type:EXCEPTION_TYPE / AGGREGATE / CUSTOM public string BindingType { get; set; } = string.Empty; /// 统计口径:OPEN_COUNT / FREQUENCY / AVG_DURATION / CLOSE_RATE public string StatMetric { get; set; } = string.Empty; /// 时间窗:TODAY / LAST_24H / LAST_7D / LAST_30D public string TimeWindow { get; set; } = string.Empty; /// 主指标值(按 stat_metric 语义:计数为 int 语义;百分比 0-100;时长为小时) public double Value { get; set; } /// 附加明细(部门分组 / 类型分组 / 趋势等;CUSTOM 卡片可为空由前端保留原实现) public List Breakdown { get; set; } = new(); /// 未配置 / 未启用时的说明(便于前端区分"空数据"与"未配置") public string? Message { get; set; } } /// /// 卡片明细分组项。label 含义由 groupBy 决定(OWNER / OCCUR / TYPE 等)。 /// public class AdoS8CellBreakdownItem { public string Label { get; set; } = string.Empty; public double Value { get; set; } public string? Code { get; set; } } /// 卡片数据查询入参 public class AdoS8CellDataQueryDto { public long TenantId { get; set; } = 1; public long FactoryId { get; set; } = 1; public string PageCode { get; set; } = string.Empty; public string CellCode { get; set; } = string.Empty; /// 可选:ALL 或具体 orderId(预留未落地) public string? OrderScope { get; set; } /// 可选:OWNER / OCCUR,覆盖配置中的 dept_group_by public string? DeptGroupBy { get; set; } }