AdoS8Dtos.cs 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221
  1. namespace Admin.NET.Plugin.AiDOP.Dto.S8;
  2. public class AdoS8ExceptionQueryDto
  3. {
  4. public long TenantId { get; set; } = 1;
  5. public long FactoryId { get; set; } = 1;
  6. public string? Keyword { get; set; }
  7. public string? Status { get; set; }
  8. public string? StatusBucket { get; set; }
  9. public string? Severity { get; set; }
  10. public string? SceneCode { get; set; }
  11. /// <summary>模块码过滤(S1-S7),用于监控页下钻</summary>
  12. public string? ModuleCode { get; set; }
  13. public long? DeptId { get; set; }
  14. public bool? TimeoutFlag { get; set; }
  15. public string? ProcessNodeCode { get; set; }
  16. public string? RelatedObjectCode { get; set; }
  17. public DateTime? BeginTime { get; set; }
  18. public DateTime? EndTime { get; set; }
  19. public int Page { get; set; } = 1;
  20. public int PageSize { get; set; } = 20;
  21. }
  22. public class AdoS8ExceptionListItemDto
  23. {
  24. public long Id { get; set; }
  25. public string ExceptionCode { get; set; } = string.Empty;
  26. public string Title { get; set; } = string.Empty;
  27. public string Status { get; set; } = string.Empty;
  28. public string? StatusLabel { get; set; }
  29. public string Severity { get; set; } = string.Empty;
  30. public string? SeverityLabel { get; set; }
  31. public decimal PriorityScore { get; set; }
  32. public string PriorityLevel { get; set; } = string.Empty;
  33. public string SceneCode { get; set; } = string.Empty;
  34. public string? SceneName { get; set; }
  35. public long ResponsibleDeptId { get; set; }
  36. public string? ResponsibleDeptName { get; set; }
  37. public long? AssigneeId { get; set; }
  38. public string? AssigneeName { get; set; }
  39. public DateTime? SlaDeadline { get; set; }
  40. public bool TimeoutFlag { get; set; }
  41. public DateTime CreatedAt { get; set; }
  42. public DateTime? ClosedAt { get; set; }
  43. }
  44. public class AdoS8ExceptionDetailDto : AdoS8ExceptionListItemDto
  45. {
  46. public string? Description { get; set; }
  47. public string SourceType { get; set; } = string.Empty;
  48. public long OccurrenceDeptId { get; set; }
  49. public string? OccurrenceDeptName { get; set; }
  50. public long? ResponsibleGroupId { get; set; }
  51. public long? ReporterId { get; set; }
  52. public string? ReporterName { get; set; }
  53. public DateTime? AssignedAt { get; set; }
  54. public DateTime? UpdatedAt { get; set; }
  55. }
  56. public class AdoS8ManualReportCreateDto
  57. {
  58. public long TenantId { get; set; } = 1;
  59. public long FactoryId { get; set; } = 1;
  60. public string Title { get; set; } = string.Empty;
  61. public string? Description { get; set; }
  62. public string SceneCode { get; set; } = string.Empty;
  63. public string Severity { get; set; } = "MEDIUM";
  64. public long OccurrenceDeptId { get; set; }
  65. public long ResponsibleDeptId { get; set; }
  66. public long? ReporterId { get; set; }
  67. }
  68. public class AdoS8ManualReportResultDto
  69. {
  70. public long ExceptionId { get; set; }
  71. public string ExceptionCode { get; set; } = string.Empty;
  72. public long TaskId { get; set; }
  73. }
  74. public class AdoS8TimelineItemDto
  75. {
  76. public long Id { get; set; }
  77. public string ActionCode { get; set; } = string.Empty;
  78. public string ActionLabel { get; set; } = string.Empty;
  79. public string? FromStatus { get; set; }
  80. public string? ToStatus { get; set; }
  81. public long? OperatorId { get; set; }
  82. public string? OperatorName { get; set; }
  83. public string? ActionRemark { get; set; }
  84. public DateTime CreatedAt { get; set; }
  85. }
  86. public class AdoS8DecisionItemDto
  87. {
  88. public long Id { get; set; }
  89. public string DecisionType { get; set; } = string.Empty;
  90. public long DecisionMakerId { get; set; }
  91. public string DecisionMakerName { get; set; } = string.Empty;
  92. public string? DecisionBasis { get; set; }
  93. public string? DecisionResult { get; set; }
  94. public string? DecisionRemark { get; set; }
  95. public DateTime DecisionTime { get; set; }
  96. }
  97. public class AdoS8EvidenceItemDto
  98. {
  99. public long Id { get; set; }
  100. public string EvidenceType { get; set; } = string.Empty;
  101. public string FileName { get; set; } = string.Empty;
  102. public string FileUrl { get; set; } = string.Empty;
  103. public string? SourceSystem { get; set; }
  104. public long? UploadedBy { get; set; }
  105. public DateTime UploadedAt { get; set; }
  106. }
  107. public class AdoS8CommentDto
  108. {
  109. public string? Remark { get; set; }
  110. }
  111. public class AdoS8TransferDto
  112. {
  113. public long AssigneeId { get; set; }
  114. public string? Remark { get; set; }
  115. }
  116. public class AdoS8AttachmentCreateDto
  117. {
  118. public string EvidenceType { get; set; } = "file";
  119. public string FileName { get; set; } = string.Empty;
  120. public string FileUrl { get; set; } = string.Empty;
  121. public string? SourceSystem { get; set; }
  122. public long? UploadedBy { get; set; }
  123. }
  124. // ── 监控汇总 DTO ─────────────────────────────────────────────────────────────
  125. public class AdoS8MonitoringSummaryQueryDto
  126. {
  127. public long TenantId { get; set; } = 1;
  128. public long FactoryId { get; set; } = 1;
  129. /// <summary>场景码过滤(不传 = 全部)</summary>
  130. public string? SceneCode { get; set; }
  131. /// <summary>模块码过滤(不传 = 全部)</summary>
  132. public string? ModuleCode { get; set; }
  133. public DateTime? BizDateFrom { get; set; }
  134. public DateTime? BizDateTo { get; set; }
  135. }
  136. /// <summary>单个模块的异常汇总行</summary>
  137. public class AdoS8ModuleSummaryItem
  138. {
  139. public string ModuleCode { get; set; } = string.Empty;
  140. public string ModuleLabel { get; set; } = string.Empty;
  141. public string SceneCode { get; set; } = string.Empty;
  142. public string SceneLabel { get; set; } = string.Empty;
  143. public int Total { get; set; }
  144. public int Red { get; set; }
  145. public int Yellow { get; set; }
  146. public int Green { get; set; }
  147. public int Timeout { get; set; }
  148. }
  149. /// <summary>监控汇总出参(综合全景页顶部 + 表格数据)</summary>
  150. public class AdoS8MonitoringSummaryDto
  151. {
  152. public int Total { get; set; }
  153. public int Red { get; set; }
  154. public int Yellow { get; set; }
  155. public int Green { get; set; }
  156. public int Timeout { get; set; }
  157. public List<AdoS8ModuleSummaryItem> ByModule { get; set; } = new();
  158. }
  159. // ── 9宫格 OrderGrid DTO ──────────────────────────────────────────────────────
  160. /// <summary>S1-S7 单个模块的订单健康分布(9宫格前7格)</summary>
  161. public class AdoS8ModuleOrderSummary
  162. {
  163. public string ModuleCode { get; set; } = string.Empty;
  164. public string ModuleLabel { get; set; } = string.Empty;
  165. /// <summary>绿色订单数(该阶段无未关闭异常)</summary>
  166. public int Green { get; set; }
  167. /// <summary>黄色订单数(有 MEDIUM 未关闭)</summary>
  168. public int Yellow { get; set; }
  169. /// <summary>红色订单数(有 CRITICAL/HIGH 未关闭,或黄色超时)</summary>
  170. public int Red { get; set; }
  171. public int Total { get; set; }
  172. /// <summary>异常发生频率(每百订单异常数)</summary>
  173. public double Frequency { get; set; }
  174. /// <summary>平均处理时效(小时)</summary>
  175. public double AvgProcessHours { get; set; }
  176. /// <summary>异常关闭百分比</summary>
  177. public double CloseRate { get; set; }
  178. }
  179. /// <summary>S8格:按业务类别汇总(第8格)</summary>
  180. public class AdoS8CategorySummary
  181. {
  182. public string Category { get; set; } = string.Empty;
  183. public int Total { get; set; }
  184. public double AvgProcessHours { get; set; }
  185. public double CloseRate { get; set; }
  186. }
  187. /// <summary>S9格:按责任部门汇总(第9格)</summary>
  188. public class AdoS8DeptSummary
  189. {
  190. public string DeptName { get; set; } = string.Empty;
  191. public int Total { get; set; }
  192. public double AvgProcessHours { get; set; }
  193. public double CloseRate { get; set; }
  194. }
  195. /// <summary>9宫格完整出参</summary>
  196. public class AdoS8OrderGridDto
  197. {
  198. public List<AdoS8ModuleOrderSummary> Modules { get; set; } = new();
  199. public List<AdoS8CategorySummary> ByCategory { get; set; } = new();
  200. public List<AdoS8DeptSummary> ByDept { get; set; } = new();
  201. }