namespace Admin.NET.Plugin.AiDOP.Manufacturing.Dto; /// prepare 入参:仅工单号;租户/检规均后端解析,前端不得传 tenantId/specId。 public class S6ProcessInspectionPrepareInput { public string? WorkOrderNo { get; set; } } /// prepare 结果。只有 Status==MATCHED 才有 BillId。 public class S6ProcessInspectionPrepareResult { public string Status { get; set; } = string.Empty; public string Message { get; set; } = string.Empty; public long? BillId { get; set; } /// 是否复用既有 active 检验单(幂等)。 public bool Reused { get; set; } public string? SpecCode { get; set; } public string? SpecVersion { get; set; } public int CandidateCount { get; set; } } /// 过程检验单详情(只读:单据 + 快照头 + 快照明细)。 public class S6ProcessInspectionDetailDto { public long BillId { get; set; } public string? WorkOrderNo { get; set; } public string? LotSerial { get; set; } public string? ItemCode { get; set; } public string? ItemName { get; set; } public string? Specification { get; set; } public long? SpecId { get; set; } public string? SpecCode { get; set; } public string? SpecVersion { get; set; } public string? EffectiveDate { get; set; } public string? InspectionStatus { get; set; } public string? CreatedByName { get; set; } public DateTime? CreateTime { get; set; } /// 结果头状态:NOT_STARTED/IN_PROGRESS/COMPLETED(后端计算)。 public string? OverallStatus { get; set; } /// 整单判定:PASS/FAIL/PENDING/INVALID(后端聚合)。 public string? OverallResult { get; set; } public List Lines { get; set; } = new(); } /// 快照明细行(只读,Phase 1B 冻结自 S0 检规明细)。 public class S6ProcessInspectionSnapshotLineDto { public long Id { get; set; } public string? InspectionItem { get; set; } public string? ProcessCode { get; set; } public string? ProcessName { get; set; } public string? Method { get; set; } public string? SpecValue { get; set; } public string? TechStandard { get; set; } public string? LowerLimit { get; set; } public string? UpperLimit { get; set; } public string? InspectionFrequency { get; set; } public string? ResultType { get; set; } public int? SortNo { get; set; } /// 要求样本量(冻结自快照)。 public int? SampleCount { get; set; } /// 单项完成状态:NOT_STARTED/IN_PROGRESS/COMPLETED(后端计算)。 public string? ItemStatus { get; set; } /// 单项结果:PASS/FAIL/PENDING/INVALID(后端计算)。 public string? ItemResult { get; set; } /// 已录样本(后端持久化,刷新可恢复)。 public List Samples { get; set; } = new(); } /// 已录样本行(含后端判定,只读回显)。 public class S6ProcessInspectionResultSampleDto { public int SampleIndex { get; set; } public decimal? ActualNumeric { get; set; } public string? ActualNonNumeric { get; set; } public string? Judgement { get; set; } public string? Remark { get; set; } } /// 保存检验结果入参:只接收工单/快照行/样本序号/实测值/备注;判定/租户/限值后端自取快照计算。 public class S6SaveResultInput { public long BillId { get; set; } public List Samples { get; set; } = new(); } public class S6SaveResultSample { public long SnapshotLineId { get; set; } public int SampleIndex { get; set; } /// NUMERIC:数值字符串;NON_NUMERIC:OK/NG。空/清除该样本。 public string? ActualValue { get; set; } public string? Remark { get; set; } } /// 保存/完成结果返回(判定为后端计算真值)。 public class S6SaveResultOutput { public bool Ok { get; set; } public string? Message { get; set; } public string? OverallStatus { get; set; } public string? OverallResult { get; set; } } /// 完成检验入参。 public class S6CompleteInput { public long BillId { get; set; } }