AdoS8Dtos.cs 9.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262
  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. /// <summary>是否包含 exception_type_code 为 NULL 的未分类历史异常;默认 false(隐藏)。</summary>
  20. public bool? IncludeUnclassified { get; set; }
  21. /// <summary>恢复状态筛选:RECOVERED / ACTIVE / 空=不限。</summary>
  22. public string? RecoveredStatus { get; set; }
  23. /// <summary>规则类型筛选:OUT_OF_RANGE / TIMEOUT / SHORTAGE / 空=不限;通过 source_rule_code join watch_rule.rule_type。</summary>
  24. public string? RuleType { get; set; }
  25. public int Page { get; set; } = 1;
  26. public int PageSize { get; set; } = 20;
  27. }
  28. public class AdoS8ExceptionListItemDto
  29. {
  30. public long Id { get; set; }
  31. public long FactoryId { get; set; }
  32. public string ExceptionCode { get; set; } = string.Empty;
  33. public string Title { get; set; } = string.Empty;
  34. public string Status { get; set; } = string.Empty;
  35. public string? StatusLabel { get; set; }
  36. public string Severity { get; set; } = string.Empty;
  37. public string? SeverityLabel { get; set; }
  38. public decimal PriorityScore { get; set; }
  39. public string PriorityLevel { get; set; } = string.Empty;
  40. public string SceneCode { get; set; } = string.Empty;
  41. public string? SceneName { get; set; }
  42. public long ResponsibleDeptId { get; set; }
  43. public string? ResponsibleDeptName { get; set; }
  44. public long? AssigneeId { get; set; }
  45. public string? AssigneeName { get; set; }
  46. public DateTime? SlaDeadline { get; set; }
  47. public bool TimeoutFlag { get; set; }
  48. public DateTime CreatedAt { get; set; }
  49. public DateTime? ClosedAt { get; set; }
  50. public string? ExceptionTypeCode { get; set; }
  51. public DateTime? RecoveredAt { get; set; }
  52. public string? SourceRuleCode { get; set; }
  53. public string? SourceObjectType { get; set; }
  54. public string? SourceObjectId { get; set; }
  55. public string? DedupKey { get; set; }
  56. public DateTime? LastDetectedAt { get; set; }
  57. public string? RuleType { get; set; }
  58. }
  59. public class AdoS8ExceptionDetailDto : AdoS8ExceptionListItemDto
  60. {
  61. public string? Description { get; set; }
  62. public string SourceType { get; set; } = string.Empty;
  63. public long OccurrenceDeptId { get; set; }
  64. public string? OccurrenceDeptName { get; set; }
  65. public long? ResponsibleGroupId { get; set; }
  66. public long? ReporterId { get; set; }
  67. public string? ReporterName { get; set; }
  68. public DateTime? AssignedAt { get; set; }
  69. public DateTime? UpdatedAt { get; set; }
  70. public long? ActiveFlowInstanceId { get; set; }
  71. public string? ActiveFlowBizType { get; set; }
  72. public long? VerifierId { get; set; }
  73. public string? VerifierName { get; set; }
  74. public DateTime? VerificationAssignedAt { get; set; }
  75. public DateTime? VerifiedAt { get; set; }
  76. public string? VerificationResult { get; set; }
  77. public string? VerificationRemark { get; set; }
  78. public long? SourceRuleId { get; set; }
  79. public string? RelatedObjectCode { get; set; }
  80. }
  81. public class AdoS8ManualReportCreateDto
  82. {
  83. public long TenantId { get; set; } = 1;
  84. public long FactoryId { get; set; } = 1;
  85. public string Title { get; set; } = string.Empty;
  86. public string? Description { get; set; }
  87. public string SceneCode { get; set; } = string.Empty;
  88. public string Severity { get; set; } = "MEDIUM";
  89. public long OccurrenceDeptId { get; set; }
  90. public long ResponsibleDeptId { get; set; }
  91. public long? ReporterId { get; set; }
  92. }
  93. public class AdoS8ManualReportResultDto
  94. {
  95. public long ExceptionId { get; set; }
  96. public string ExceptionCode { get; set; } = string.Empty;
  97. public long TaskId { get; set; }
  98. }
  99. public class AdoS8TimelineItemDto
  100. {
  101. public long Id { get; set; }
  102. public string ActionCode { get; set; } = string.Empty;
  103. public string ActionLabel { get; set; } = string.Empty;
  104. public string? FromStatus { get; set; }
  105. public string? ToStatus { get; set; }
  106. public long? OperatorId { get; set; }
  107. public string? OperatorName { get; set; }
  108. public string? ActionRemark { get; set; }
  109. public DateTime CreatedAt { get; set; }
  110. }
  111. public class AdoS8DecisionItemDto
  112. {
  113. public long Id { get; set; }
  114. public string DecisionType { get; set; } = string.Empty;
  115. public long DecisionMakerId { get; set; }
  116. public string DecisionMakerName { get; set; } = string.Empty;
  117. public string? DecisionBasis { get; set; }
  118. public string? DecisionResult { get; set; }
  119. public string? DecisionRemark { get; set; }
  120. public DateTime DecisionTime { get; set; }
  121. }
  122. public class AdoS8EvidenceItemDto
  123. {
  124. public long Id { get; set; }
  125. public string EvidenceType { get; set; } = string.Empty;
  126. public string FileName { get; set; } = string.Empty;
  127. public string FileUrl { get; set; } = string.Empty;
  128. public string? SourceSystem { get; set; }
  129. public long? UploadedBy { get; set; }
  130. public DateTime UploadedAt { get; set; }
  131. }
  132. public class AdoS8CommentDto
  133. {
  134. public string? Remark { get; set; }
  135. }
  136. public class AdoS8TransferDto
  137. {
  138. public long AssigneeId { get; set; }
  139. public string? Remark { get; set; }
  140. }
  141. public class AdoS8AttachmentCreateDto
  142. {
  143. public string EvidenceType { get; set; } = "file";
  144. public string FileName { get; set; } = string.Empty;
  145. public string FileUrl { get; set; } = string.Empty;
  146. public string? SourceSystem { get; set; }
  147. public long? UploadedBy { get; set; }
  148. }
  149. // ── 监控汇总 DTO ─────────────────────────────────────────────────────────────
  150. public class AdoS8MonitoringSummaryQueryDto
  151. {
  152. public long TenantId { get; set; } = 1;
  153. public long FactoryId { get; set; } = 1;
  154. /// <summary>场景码过滤(不传 = 全部)</summary>
  155. public string? SceneCode { get; set; }
  156. /// <summary>模块码过滤(不传 = 全部)</summary>
  157. public string? ModuleCode { get; set; }
  158. public DateTime? BizDateFrom { get; set; }
  159. public DateTime? BizDateTo { get; set; }
  160. }
  161. /// <summary>单个模块的异常汇总行</summary>
  162. public class AdoS8ModuleSummaryItem
  163. {
  164. public string ModuleCode { get; set; } = string.Empty;
  165. public string ModuleLabel { get; set; } = string.Empty;
  166. public string SceneCode { get; set; } = string.Empty;
  167. public string SceneLabel { get; set; } = string.Empty;
  168. public int Total { get; set; }
  169. public int Red { get; set; }
  170. public int Yellow { get; set; }
  171. public int Green { get; set; }
  172. public int Timeout { get; set; }
  173. }
  174. /// <summary>监控汇总出参(综合全景页顶部 + 表格数据)</summary>
  175. public class AdoS8MonitoringSummaryDto
  176. {
  177. public int Total { get; set; }
  178. public int Red { get; set; }
  179. public int Yellow { get; set; }
  180. public int Green { get; set; }
  181. public int Timeout { get; set; }
  182. public List<AdoS8ModuleSummaryItem> ByModule { get; set; } = new();
  183. }
  184. // ── 9宫格 OrderGrid DTO ──────────────────────────────────────────────────────
  185. /// <summary>S1-S7 单个模块的订单健康分布(9宫格前7格)</summary>
  186. public class AdoS8ModuleOrderSummary
  187. {
  188. public string ModuleCode { get; set; } = string.Empty;
  189. public string ModuleLabel { get; set; } = string.Empty;
  190. /// <summary>绿色订单数(该阶段无未关闭异常)</summary>
  191. public int Green { get; set; }
  192. /// <summary>黄色订单数(有 MEDIUM 未关闭)</summary>
  193. public int Yellow { get; set; }
  194. /// <summary>红色订单数(有 CRITICAL/HIGH 未关闭,或黄色超时)</summary>
  195. public int Red { get; set; }
  196. public int Total { get; set; }
  197. /// <summary>异常发生频率(每百订单异常数)</summary>
  198. public double Frequency { get; set; }
  199. /// <summary>平均处理时效(小时)</summary>
  200. public double AvgProcessHours { get; set; }
  201. /// <summary>异常关闭百分比</summary>
  202. public double CloseRate { get; set; }
  203. }
  204. /// <summary>S8格:按业务类别汇总(第8格)</summary>
  205. public class AdoS8CategorySummary
  206. {
  207. public string Category { get; set; } = string.Empty;
  208. public int Total { get; set; }
  209. public double AvgProcessHours { get; set; }
  210. public double CloseRate { get; set; }
  211. }
  212. /// <summary>S9格:按责任部门汇总(第9格)</summary>
  213. public class AdoS8DeptSummary
  214. {
  215. public string DeptName { get; set; } = string.Empty;
  216. public int Total { get; set; }
  217. public double AvgProcessHours { get; set; }
  218. public double CloseRate { get; set; }
  219. }
  220. /// <summary>9宫格完整出参</summary>
  221. public class AdoS8OrderGridDto
  222. {
  223. public List<AdoS8ModuleOrderSummary> Modules { get; set; } = new();
  224. public List<AdoS8CategorySummary> ByCategory { get; set; } = new();
  225. public List<AdoS8DeptSummary> ByDept { get; set; } = new();
  226. }
  227. public class AdoS8SubmitVerificationDto
  228. {
  229. public long VerifierId { get; set; }
  230. public string? Remark { get; set; }
  231. }
  232. public class AdoS8ApproveVerificationDto
  233. {
  234. public string? Remark { get; set; }
  235. }
  236. public class AdoS8RejectVerificationDto
  237. {
  238. public string Remark { get; set; } = string.Empty;
  239. }