| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365 |
- namespace Admin.NET.Plugin.AiDOP.Dto.S8;
- public class AdoS8ExceptionQueryDto
- {
- public long TenantId { get; set; } = 1;
- public long FactoryId { get; set; } = 1;
- public string? Keyword { get; set; }
- public string? Status { get; set; }
- public string? StatusBucket { get; set; }
- public string? Severity { get; set; }
- public string? SceneCode { get; set; }
- /// <summary>模块码过滤(S1-S7),用于监控页下钻</summary>
- public string? ModuleCode { get; set; }
- public long? DeptId { get; set; }
- public bool? TimeoutFlag { get; set; }
- public string? ProcessNodeCode { get; set; }
- public string? RelatedObjectCode { get; set; }
- public DateTime? BeginTime { get; set; }
- public DateTime? EndTime { get; set; }
- /// <summary>是否包含 exception_type_code 为 NULL 的未分类历史异常;默认 false(隐藏)。</summary>
- public bool? IncludeUnclassified { get; set; }
- /// <summary>恢复状态筛选:RECOVERED / ACTIVE / 空=不限。</summary>
- public string? RecoveredStatus { get; set; }
- /// <summary>规则类型筛选:OUT_OF_RANGE / TIMEOUT / SHORTAGE / 空=不限;通过 source_rule_code join watch_rule.rule_type。</summary>
- public string? RuleType { get; set; }
- /// <summary>S8-DASHBOARD-DATA-ALIGN-S1S7-1:仅返回 module_code IN S1-S7 的异常;看板明细表传 true 与 KPI 口径对齐。
- /// 默认 false 以保证异常列表页(/aidop/s8/exceptions)行为不变。</summary>
- public bool? OnlyS1S7Modules { get; set; }
- public int Page { get; set; } = 1;
- public int PageSize { get; set; } = 20;
- }
- public class AdoS8ExceptionListItemDto
- {
- public long Id { get; set; }
- public long FactoryId { get; set; }
- public string ExceptionCode { get; set; } = string.Empty;
- public string Title { get; set; } = string.Empty;
- public string Status { get; set; } = string.Empty;
- public string? StatusLabel { get; set; }
- public string Severity { get; set; } = string.Empty;
- public string? SeverityLabel { get; set; }
- public decimal PriorityScore { get; set; }
- public string PriorityLevel { get; set; } = string.Empty;
- public string SceneCode { get; set; } = string.Empty;
- public string? SceneName { get; set; }
- /// <summary>S8-EXCEPTION-MODULE-DISPLAY-1:业务展示主口径(S1-S7)。SceneCode/SceneName 保留兼容期。</summary>
- public string? ModuleCode { get; set; }
- public string? ModuleName { get; set; }
- public long ResponsibleDeptId { get; set; }
- public string? ResponsibleDeptName { get; set; }
- public long OccurrenceDeptId { get; set; }
- public string? OccurrenceDeptName { get; set; }
- public long? AssigneeId { get; set; }
- public string? AssigneeName { get; set; }
- public DateTime? SlaDeadline { get; set; }
- public bool TimeoutFlag { get; set; }
- public DateTime CreatedAt { get; set; }
- public DateTime? ClosedAt { get; set; }
- public string? ExceptionTypeCode { get; set; }
- public DateTime? RecoveredAt { get; set; }
- public string? SourceRuleCode { get; set; }
- public string? SourceObjectType { get; set; }
- public string? SourceObjectId { get; set; }
- public string? DedupKey { get; set; }
- public DateTime? LastDetectedAt { get; set; }
- public string? RuleType { get; set; }
- }
- public class AdoS8ExceptionDetailDto : AdoS8ExceptionListItemDto
- {
- public string? Description { get; set; }
- public string SourceType { get; set; } = string.Empty;
- public long? ResponsibleGroupId { get; set; }
- public long? ReporterId { get; set; }
- public string? ReporterName { get; set; }
- public DateTime? AssignedAt { get; set; }
- public DateTime? UpdatedAt { get; set; }
- public long? ActiveFlowInstanceId { get; set; }
- public string? ActiveFlowBizType { get; set; }
- public long? VerifierId { get; set; }
- public string? VerifierName { get; set; }
- public DateTime? VerificationAssignedAt { get; set; }
- public DateTime? VerifiedAt { get; set; }
- public string? VerificationResult { get; set; }
- public string? VerificationRemark { get; set; }
- public long? SourceRuleId { get; set; }
- public string? RelatedObjectCode { get; set; }
- }
- public class AdoS8ManualReportCreateDto
- {
- public long TenantId { get; set; } = 1;
- public long FactoryId { get; set; } = 1;
- public string Title { get; set; } = string.Empty;
- public string? Description { get; set; }
- public string SceneCode { get; set; } = string.Empty;
- public string Severity { get; set; } = "FOLLOW";
- public long OccurrenceDeptId { get; set; }
- public long ResponsibleDeptId { get; set; }
- public long? ReporterId { get; set; }
- /// <summary>关联对象编码:当前按订单项 / 类订单项对象理解,允许重复,可为空。最长 64 字符(与 ado_s8_exception.related_object_code 一致)。</summary>
- public string? RelatedObjectCode { get; set; }
- }
- public class AdoS8ManualReportResultDto
- {
- public long ExceptionId { get; set; }
- public string ExceptionCode { get; set; } = string.Empty;
- public long TaskId { get; set; }
- }
- public class AdoS8TimelineItemDto
- {
- public long Id { get; set; }
- public string ActionCode { get; set; } = string.Empty;
- public string ActionLabel { get; set; } = string.Empty;
- public string? FromStatus { get; set; }
- public string? ToStatus { get; set; }
- public long? OperatorId { get; set; }
- public string? OperatorName { get; set; }
- public string? ActionRemark { get; set; }
- public DateTime CreatedAt { get; set; }
- }
- public class AdoS8DecisionItemDto
- {
- public long Id { get; set; }
- public string DecisionType { get; set; } = string.Empty;
- public long DecisionMakerId { get; set; }
- public string DecisionMakerName { get; set; } = string.Empty;
- public string? DecisionBasis { get; set; }
- public string? DecisionResult { get; set; }
- public string? DecisionRemark { get; set; }
- public DateTime DecisionTime { get; set; }
- }
- public class AdoS8EvidenceItemDto
- {
- public long Id { get; set; }
- public string EvidenceType { get; set; } = string.Empty;
- public string FileName { get; set; } = string.Empty;
- public string FileUrl { get; set; } = string.Empty;
- public string? SourceSystem { get; set; }
- public long? UploadedBy { get; set; }
- public DateTime UploadedAt { get; set; }
- }
- public class AdoS8CommentDto
- {
- public string? Remark { get; set; }
- }
- public class AdoS8TransferDto
- {
- public long AssigneeId { get; set; }
- public string? Remark { get; set; }
- }
- public class AdoS8AttachmentCreateDto
- {
- public string EvidenceType { get; set; } = "file";
- public string FileName { get; set; } = string.Empty;
- public string FileUrl { get; set; } = string.Empty;
- public string? SourceSystem { get; set; }
- public long? UploadedBy { get; set; }
- }
- // ── 监控汇总 DTO ─────────────────────────────────────────────────────────────
- public class AdoS8MonitoringSummaryQueryDto
- {
- public long TenantId { get; set; } = 1;
- public long FactoryId { get; set; } = 1;
- /// <summary>场景码过滤(不传 = 全部)</summary>
- public string? SceneCode { get; set; }
- /// <summary>模块码过滤(不传 = 全部)</summary>
- public string? ModuleCode { get; set; }
- public DateTime? BizDateFrom { get; set; }
- public DateTime? BizDateTo { get; set; }
- /// <summary>统一时间筛选:today / this_week / this_month。BizDateFrom/BizDateTo 已传时优先于 Period。</summary>
- public string? Period { get; set; }
- }
- /// <summary>单个模块的异常汇总行</summary>
- public class AdoS8ModuleSummaryItem
- {
- public string ModuleCode { get; set; } = string.Empty;
- public string ModuleLabel { get; set; } = string.Empty;
- public string SceneCode { get; set; } = string.Empty;
- public string SceneLabel { get; set; } = string.Empty;
- public int Total { get; set; }
- public int Red { get; set; }
- public int Yellow { get; set; }
- public int Green { get; set; }
- public int Timeout { get; set; }
- }
- /// <summary>监控汇总出参(综合全景页顶部 + 表格数据)</summary>
- public class AdoS8MonitoringSummaryDto
- {
- public int Total { get; set; }
- public int Red { get; set; }
- public int Yellow { get; set; }
- public int Green { get; set; }
- public int Timeout { get; set; }
- public List<AdoS8ModuleSummaryItem> ByModule { get; set; } = new();
- }
- // ── 9宫格 OrderGrid DTO ──────────────────────────────────────────────────────
- /// <summary>S1-S7 单个模块的订单健康分布(9宫格前7格)</summary>
- public class AdoS8ModuleOrderSummary
- {
- public string ModuleCode { get; set; } = string.Empty;
- public string ModuleLabel { get; set; } = string.Empty;
- /// <summary>绿色订单数(来自订单主数据,不从异常 severity 推导)。</summary>
- public int Green { get; set; }
- /// <summary>黄色订单数(FOLLOW 关注)。</summary>
- public int Yellow { get; set; }
- /// <summary>红色订单数(SERIOUS 严重,或黄色超时)。</summary>
- public int Red { get; set; }
- public int Total { get; set; }
- /// <summary>异常发生频率(每百订单异常数)</summary>
- public double Frequency { get; set; }
- /// <summary>平均处理时效(小时)</summary>
- public double AvgProcessHours { get; set; }
- /// <summary>异常关闭百分比</summary>
- public double CloseRate { get; set; }
- }
- /// <summary>S8格:按业务类别汇总(第8格)</summary>
- public class AdoS8CategorySummary
- {
- public string Category { get; set; } = string.Empty;
- public int Total { get; set; }
- public double AvgProcessHours { get; set; }
- public double CloseRate { get; set; }
- }
- /// <summary>S9格:按责任部门汇总(第9格)</summary>
- public class AdoS8DeptSummary
- {
- public string DeptName { get; set; } = string.Empty;
- public int Total { get; set; }
- public double AvgProcessHours { get; set; }
- public double CloseRate { get; set; }
- }
- /// <summary>9宫格完整出参</summary>
- public class AdoS8OrderGridDto
- {
- public List<AdoS8ModuleOrderSummary> Modules { get; set; } = new();
- public List<AdoS8CategorySummary> ByCategory { get; set; } = new();
- public List<AdoS8DeptSummary> ByDept { get; set; } = new();
- }
- /// <summary>S8-DELIVERY-TREND-CHART-REPLACE-DUPLICATE-SECTION-1:Delivery 页近 N 日交付异常趋势出参。</summary>
- public class AdoS8DeliveryTrendDto
- {
- public List<AdoS8DeliveryTrendDayDto> Days { get; set; } = new();
- public AdoS8DeliveryTrendSummaryDto Summary { get; set; } = new();
- }
- public class AdoS8DeliveryTrendDayDto
- {
- /// <summary>日期短格式 MM/dd(图表 X 轴)</summary>
- public string Date { get; set; } = string.Empty;
- /// <summary>原始日期 yyyy-MM-dd</summary>
- public string RawDate { get; set; } = string.Empty;
- public int OrderChange { get; set; }
- public int DeliveryDelay { get; set; }
- public int PendingShipment { get; set; }
- public int Total { get; set; }
- }
- public class AdoS8DeliveryTrendSummaryDto
- {
- public int PeakValue { get; set; }
- public string? PeakDate { get; set; }
- public double AvgValue { get; set; }
- public int TodayValue { get; set; }
- /// <summary>今日相对昨日变化率(%);昨日为 0 时返回 null。</summary>
- public double? TodayChangeRate { get; set; }
- }
- /// <summary>S8-PROD-SUPPLY-TREND-CHART-REPLACE-DUPLICATE-SECTION-1:Production 页近 N 日生产异常趋势出参。</summary>
- public class AdoS8ProductionTrendDto
- {
- public List<AdoS8ProductionTrendDayDto> Days { get; set; } = new();
- public AdoS8DeliveryTrendSummaryDto Summary { get; set; } = new();
- }
- public class AdoS8ProductionTrendDayDto
- {
- public string Date { get; set; } = string.Empty;
- public string RawDate { get; set; } = string.Empty;
- public int EquipmentFault { get; set; }
- public int MaterialFault { get; set; }
- public int QualityFault { get; set; }
- public int Total { get; set; }
- }
- /// <summary>S8-PROD-SUPPLY-TREND-CHART-REPLACE-DUPLICATE-SECTION-1:Supply 页近 N 日供应异常趋势出参。</summary>
- public class AdoS8SupplyTrendDto
- {
- public List<AdoS8SupplyTrendDayDto> Days { get; set; } = new();
- public AdoS8DeliveryTrendSummaryDto Summary { get; set; } = new();
- }
- public class AdoS8SupplyTrendDayDto
- {
- public string Date { get; set; } = string.Empty;
- public string RawDate { get; set; } = string.Empty;
- public int SupplierEtaIssue { get; set; }
- public int SupplierShipIssue { get; set; }
- public int WarehouseReceiptAbnormal { get; set; }
- public int IqcIssue { get; set; }
- public int WarehousePutawayIssue { get; set; }
- public int WorkOrderKittingAbnormal { get; set; }
- public int WorkOrderIssueAbnormal { get; set; }
- public int Total { get; set; }
- }
- /// <summary>
- /// S8-SIDEBAR-TYPE-CARD-WINDOW-TOGGLE-1:右侧异常类型卡按时间窗口切片(LAST_24H / LAST_7D)出参。
- /// 同一窗口内 total / open / closed / avgProcessHours / closeRate 共用同一分母,避免跨窗口拼接误读。
- /// </summary>
- public class AdoS8DomainTypeMetricsDto
- {
- public string Domain { get; set; } = string.Empty;
- public string Window { get; set; } = string.Empty;
- public int Total { get; set; }
- public List<AdoS8DomainTypeMetricItemDto> Items { get; set; } = new();
- }
- public class AdoS8DomainTypeMetricItemDto
- {
- public string Key { get; set; } = string.Empty;
- public string Label { get; set; } = string.Empty;
- public string TypeCode { get; set; } = string.Empty;
- public int Total { get; set; }
- public int OpenCount { get; set; }
- public int ClosedCount { get; set; }
- /// <summary>已关闭样本均时(小时);无 closed 样本时 null,前端展示 --。</summary>
- public double? AvgProcessHours { get; set; }
- /// <summary>关闭率 %;total=0 时 null,前端展示 --。</summary>
- public double? CloseRate { get; set; }
- }
- public class AdoS8SubmitVerificationDto
- {
- public long VerifierId { get; set; }
- public string? Remark { get; set; }
- }
- public class AdoS8ApproveVerificationDto
- {
- public string? Remark { get; set; }
- }
- public class AdoS8RejectVerificationDto
- {
- public string Remark { get; set; } = string.Empty;
- }
|