| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- namespace Admin.NET.Plugin.AiDOP.Manufacturing.Dto;
- /// <summary>Phase 1D 审核流状态(只读,供前端按钮控制)。所有判定/状态由后端拥有,前端不得回传状态。</summary>
- public class S6ReviewStateOutput
- {
- public long BillId { get; set; }
- public long? InstanceId { get; set; }
- /// <summary>Phase 1C 质量结果(PASS/FAIL/PENDING/INVALID)—— 只读回显,审批不改写。</summary>
- public string? OverallResult { get; set; }
- /// <summary>Phase 1C 结果状态(NOT_STARTED/IN_PROGRESS/COMPLETED)。</summary>
- public string? ResultStatus { get; set; }
- /// <summary>流程状态:NotStarted / Running / Approved / Rejected / Cancelled / Terminated。</summary>
- 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; }
- /// <summary>网关判据(FAIL→1)。</summary>
- public int DispositionRequired { get; set; }
- // 按钮门控(后端计算)
- /// <summary>
- /// S6-IPQC-EDIT-1:当前用户此刻是否可修改检验录入(项目结果 / 样本实测)。
- /// 与 <see cref="CanSubmitReview"/> 共用同一份 N1 待办归属判定,但**不叠加"检验已完成"**条件 ——
- /// 二者语义不等价:N1 己有待办且 ResultStatus=IN_PROGRESS 时 CanEdit=true / CanSubmitReview=false,
- /// 而这正是需要编辑的状态。故前端不得用 canSubmitReview 顶替 canEdit。
- /// 取值口径:未起流程 → true(首次录入);主管退回回到 N1 且待办归属本人 → true;
- /// N2 / N3 / 无本人待办 / 流程已结束 → false。
- /// </summary>
- public bool CanEdit { 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 展示收口(后端拥有业务中文,前端不猜语义)──
- /// <summary>检验结果业务文案:合格 / 不合格 / 检验中 / —。</summary>
- public string? QualityText { get; set; }
- /// <summary>统一展示状态(业务中文):检验中 / 待提交审核 / 主管审核中 / QE质量处置中 / 已关闭 / …。</summary>
- public string? DisplayStatus { get; set; }
- /// <summary>QE 质量处置(存在则展示;不改写质量结果)。</summary>
- public S6DispositionView? Disposition { get; set; }
- /// <summary>审核历史(正式 ApprovalFlow 时间线,按时间升序)。</summary>
- public List<S6ReviewHistoryItem> History { get; set; } = new();
- }
- /// <summary>QE 质量处置展示(只读)。</summary>
- 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; }
- }
- /// <summary>审核历史条目(源自 ApprovalFlowLog;action/node 已转业务中文)。</summary>
- 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; }
- }
- /// <summary>提交审核入参:仅单据 id;租户/发起人后端自解析。</summary>
- public class S6SubmitReviewInput
- {
- public long BillId { get; set; }
- public string? Comment { get; set; }
- }
- /// <summary>主管审核通过入参(路由自动按 overall_result 决定去向)。</summary>
- public class S6ReviewApproveInput
- {
- public long BillId { get; set; }
- public string? Comment { get; set; }
- }
- /// <summary>主管退回入参(意见必填)。</summary>
- public class S6ReviewReturnInput
- {
- public long BillId { get; set; }
- public string? Comment { get; set; }
- }
- /// <summary>QE 质量处置入参(不改写 Phase 1C 质量结果)。</summary>
- public class S6QeDispositionInput
- {
- public long BillId { get; set; }
- /// <summary>REWORK / CONCESSION / SCRAP / OTHER。</summary>
- 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; }
- }
|