S6ProcessInspectionReviewDto.cs 4.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. namespace Admin.NET.Plugin.AiDOP.Manufacturing.Dto;
  2. /// <summary>Phase 1D 审核流状态(只读,供前端按钮控制)。所有判定/状态由后端拥有,前端不得回传状态。</summary>
  3. public class S6ReviewStateOutput
  4. {
  5. public long BillId { get; set; }
  6. public long? InstanceId { get; set; }
  7. /// <summary>Phase 1C 质量结果(PASS/FAIL/PENDING/INVALID)—— 只读回显,审批不改写。</summary>
  8. public string? OverallResult { get; set; }
  9. /// <summary>Phase 1C 结果状态(NOT_STARTED/IN_PROGRESS/COMPLETED)。</summary>
  10. public string? ResultStatus { get; set; }
  11. /// <summary>流程状态:NotStarted / Running / Approved / Rejected / Cancelled / Terminated。</summary>
  12. public string? FlowStatus { get; set; }
  13. public string? CurrentNodeCode { get; set; }
  14. public string? CurrentNodeName { get; set; }
  15. public string? CurrentAssigneeRole { get; set; }
  16. public bool IsCompleted { get; set; }
  17. public bool HasDisposition { get; set; }
  18. /// <summary>网关判据(FAIL→1)。</summary>
  19. public int DispositionRequired { get; set; }
  20. // 按钮门控(后端计算)
  21. public bool CanSubmitReview { get; set; }
  22. public bool CanSupervisorApprove { get; set; }
  23. public bool CanSupervisorReturn { get; set; }
  24. public bool CanSubmitDisposition { get; set; }
  25. public string? Message { get; set; }
  26. // ── Phase 1E 展示收口(后端拥有业务中文,前端不猜语义)──
  27. /// <summary>检验结果业务文案:合格 / 不合格 / 检验中 / —。</summary>
  28. public string? QualityText { get; set; }
  29. /// <summary>统一展示状态(业务中文):检验中 / 待提交审核 / 主管审核中 / QE质量处置中 / 已关闭 / …。</summary>
  30. public string? DisplayStatus { get; set; }
  31. /// <summary>QE 质量处置(存在则展示;不改写质量结果)。</summary>
  32. public S6DispositionView? Disposition { get; set; }
  33. /// <summary>审核历史(正式 ApprovalFlow 时间线,按时间升序)。</summary>
  34. public List<S6ReviewHistoryItem> History { get; set; } = new();
  35. }
  36. /// <summary>QE 质量处置展示(只读)。</summary>
  37. public class S6DispositionView
  38. {
  39. public string? DispositionType { get; set; }
  40. public string? DispositionTypeText { get; set; }
  41. public decimal? DispositionQty { get; set; }
  42. public string? DispositionOpinion { get; set; }
  43. public string? ResponsibilityDept { get; set; }
  44. public string? ResponsibleUser { get; set; }
  45. public string? OperatorName { get; set; }
  46. public DateTime? SubmittedAt { get; set; }
  47. }
  48. /// <summary>审核历史条目(源自 ApprovalFlowLog;action/node 已转业务中文)。</summary>
  49. public class S6ReviewHistoryItem
  50. {
  51. public DateTime? Time { get; set; }
  52. public string? OperatorName { get; set; }
  53. public string? NodeName { get; set; }
  54. public string? ActionText { get; set; }
  55. public string? Comment { get; set; }
  56. }
  57. /// <summary>提交审核入参:仅单据 id;租户/发起人后端自解析。</summary>
  58. public class S6SubmitReviewInput
  59. {
  60. public long BillId { get; set; }
  61. public string? Comment { get; set; }
  62. }
  63. /// <summary>主管审核通过入参(路由自动按 overall_result 决定去向)。</summary>
  64. public class S6ReviewApproveInput
  65. {
  66. public long BillId { get; set; }
  67. public string? Comment { get; set; }
  68. }
  69. /// <summary>主管退回入参(意见必填)。</summary>
  70. public class S6ReviewReturnInput
  71. {
  72. public long BillId { get; set; }
  73. public string? Comment { get; set; }
  74. }
  75. /// <summary>QE 质量处置入参(不改写 Phase 1C 质量结果)。</summary>
  76. public class S6QeDispositionInput
  77. {
  78. public long BillId { get; set; }
  79. /// <summary>REWORK / CONCESSION / SCRAP / OTHER。</summary>
  80. public string DispositionType { get; set; } = string.Empty;
  81. public decimal? DispositionQty { get; set; }
  82. public decimal? ReworkQty { get; set; }
  83. public decimal? ConcessionQty { get; set; }
  84. public decimal? ScrapQty { get; set; }
  85. public string? DispositionOpinion { get; set; }
  86. public string? ResponsibilityDept { get; set; }
  87. public string? ResponsibleUser { get; set; }
  88. public string? Comment { get; set; }
  89. }