namespace Admin.NET.Plugin.AiDOP.Manufacturing.Dto; /// Phase 1D 审核流状态(只读,供前端按钮控制)。所有判定/状态由后端拥有,前端不得回传状态。 public class S6ReviewStateOutput { public long BillId { get; set; } public long? InstanceId { get; set; } /// Phase 1C 质量结果(PASS/FAIL/PENDING/INVALID)—— 只读回显,审批不改写。 public string? OverallResult { get; set; } /// Phase 1C 结果状态(NOT_STARTED/IN_PROGRESS/COMPLETED)。 public string? ResultStatus { get; set; } /// 流程状态:NotStarted / Running / Approved / Rejected / Cancelled / Terminated。 public string? FlowStatus { get; set; } public string? CurrentNodeCode { get; set; } public string? CurrentNodeName { get; set; } public string? CurrentAssigneeRole { get; set; } public bool IsCompleted { get; set; } public bool HasDisposition { get; set; } /// 网关判据(FAIL→1)。 public int DispositionRequired { get; set; } // 按钮门控(后端计算) public bool CanSubmitReview { get; set; } public bool CanSupervisorApprove { get; set; } public bool CanSupervisorReturn { get; set; } public bool CanSubmitDisposition { get; set; } public string? Message { get; set; } // ── Phase 1E 展示收口(后端拥有业务中文,前端不猜语义)── /// 检验结果业务文案:合格 / 不合格 / 检验中 / —。 public string? QualityText { get; set; } /// 统一展示状态(业务中文):检验中 / 待提交审核 / 主管审核中 / QE质量处置中 / 已关闭 / …。 public string? DisplayStatus { get; set; } /// QE 质量处置(存在则展示;不改写质量结果)。 public S6DispositionView? Disposition { get; set; } /// 审核历史(正式 ApprovalFlow 时间线,按时间升序)。 public List History { get; set; } = new(); } /// QE 质量处置展示(只读)。 public class S6DispositionView { public string? DispositionType { get; set; } public string? DispositionTypeText { get; set; } public decimal? DispositionQty { get; set; } public string? DispositionOpinion { get; set; } public string? ResponsibilityDept { get; set; } public string? ResponsibleUser { get; set; } public string? OperatorName { get; set; } public DateTime? SubmittedAt { get; set; } } /// 审核历史条目(源自 ApprovalFlowLog;action/node 已转业务中文)。 public class S6ReviewHistoryItem { public DateTime? Time { get; set; } public string? OperatorName { get; set; } public string? NodeName { get; set; } public string? ActionText { get; set; } public string? Comment { get; set; } } /// 提交审核入参:仅单据 id;租户/发起人后端自解析。 public class S6SubmitReviewInput { public long BillId { get; set; } public string? Comment { get; set; } } /// 主管审核通过入参(路由自动按 overall_result 决定去向)。 public class S6ReviewApproveInput { public long BillId { get; set; } public string? Comment { get; set; } } /// 主管退回入参(意见必填)。 public class S6ReviewReturnInput { public long BillId { get; set; } public string? Comment { get; set; } } /// QE 质量处置入参(不改写 Phase 1C 质量结果)。 public class S6QeDispositionInput { public long BillId { get; set; } /// REWORK / CONCESSION / SCRAP / OTHER。 public string DispositionType { get; set; } = string.Empty; public decimal? DispositionQty { get; set; } public decimal? ReworkQty { get; set; } public decimal? ConcessionQty { get; set; } public decimal? ScrapQty { get; set; } public string? DispositionOpinion { get; set; } public string? ResponsibilityDept { get; set; } public string? ResponsibleUser { get; set; } public string? Comment { get; set; } }