operation.go 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. package opsdev
  2. import (
  3. "dashoo.cn/opms_libary/request"
  4. )
  5. // OpsOperationEventSearchReq 运维事件搜索请求
  6. type OpsOperationEventSearchReq struct {
  7. EventNo string `json:"eventNo"` // 事件编号
  8. EventTitle string `json:"eventTitle"` // 事件标题(模糊搜索)
  9. EventStatus string `json:"eventStatus"` // 事件状态
  10. EventType string `json:"eventType"` // 事件类型
  11. PriorityLevel string `json:"priorityLevel"` // 优先级
  12. IsBig string `json:"isBig"` // 是否重大事件
  13. IsOps string `json:"isOps"` // 是否运维事件
  14. CustName string `json:"custName"` // 客户名称(模糊搜索)
  15. OpsUserName string `json:"opsUserName"` // 运维人员名称
  16. ContractName string `json:"contractName"` // 合同名称
  17. ProductLine string `json:"productLine"` // 产品线
  18. request.PageReq
  19. }
  20. // OpsOperationEventReq 运维事件创建/更新请求
  21. type OpsOperationEventReq struct {
  22. EventTitle string `json:"eventTitle" v:"required#事件标题不能为空"` // 事件标题
  23. EventDesc string `json:"eventDesc"` // 事件描述
  24. EventType string `json:"eventType"` // 事件类型
  25. EventStatus string `json:"eventStatus"` // 事件状态
  26. ContractId int `json:"contractId"` // 合同ID
  27. ContractName string `json:"contractName"` // 合同名称
  28. CustId int `json:"custId"` // 客户ID
  29. CustName string `json:"custName"` // 客户名称
  30. ProductLine string `json:"productLine"` // 产品线
  31. IsBig string `json:"isBig"` // 是否重大事件
  32. IsOps string `json:"isOps"` // 是否运维事件
  33. PriorityLevel string `json:"priorityLevel"` // 优先级
  34. FeedbackSource string `json:"feedbackSource"` // 反馈来源
  35. FeedbackReporter string `json:"feedbackReporter"` // 反馈报告人
  36. FeedbackDate string `json:"feedbackDate"` // 反馈日期
  37. OpsUserId int `json:"opsUserId"` // 运维人员ID
  38. OpsUserName string `json:"opsUserName"` // 运维人员名称
  39. Remark string `json:"remark"` // 备注
  40. Attachments []AttachmentReq `json:"attachments"` // 附件列表
  41. }
  42. // UpdateOpsOperationEventReq 运维事件更新请求
  43. type UpdateOpsOperationEventReq struct {
  44. Id int `json:"id" v:"min:1#ID不能为空"` // 主键
  45. OpsOperationEventReq
  46. }
  47. // OpsOperationEventProcessReq 运维事件处理请求
  48. type OpsOperationEventProcessReq struct {
  49. Id int64 `json:"id" v:"min:1#任务ID不能为空"`
  50. HandleContent string `json:"handleContent" v:"required#处理内容不能为空"`
  51. HandleResult string `json:"handleResult"`
  52. OperateType string `json:"operateType" v:"required#操作类型不能为空"`
  53. }
  54. // OpsOperationEventRecordSearchReq 运维事件处理记录搜索请求
  55. type OpsOperationEventRecordSearchReq struct {
  56. EventId int `json:"eventId" v:"min:1#事件ID不能为空"` // 事件ID
  57. request.PageReq
  58. }
  59. // OpsOperationEventRecordWithAttachments 带附件的处理记录
  60. type OpsOperationEventRecordWithAttachments struct {
  61. OpsOperationEventRecord
  62. Attachments []*OpsOperationEventAttachment `json:"attachments"` // 附件列表
  63. }
  64. // OpsOperationEventAttachmentReq 附件上传请求
  65. type OpsOperationEventAttachmentReq struct {
  66. EventId int `json:"eventId" v:"min:1#事件ID不能为空"` // 事件ID
  67. EventRecordId int `json:"eventRecordId"` // 事件记录ID
  68. FileName string `json:"fileName" v:"required#文件名不能为空"` // 文件名
  69. FileUrl string `json:"fileUrl" v:"required#文件地址不能为空"` // 文件地址
  70. FileType string `json:"fileType"` // 文件类型
  71. Remark string `json:"remark"` // 备注
  72. }
  73. const (
  74. EventStatusPending = "10" // 待处理
  75. EventStatusProcessing = "20" // 处理中(重点)
  76. EventStatusProcessingNormal = "30" // 处理中(普通)
  77. EventStatusTransfer = "40" // 转研发
  78. EventStatusSuspended = "70" // 挂起
  79. EventStatusClosed = "80" // 已关闭
  80. )
  81. const (
  82. HandleResultResolved = "10" // 已解决
  83. HandleResultPartially = "20" // 部分解决
  84. HandleResultUnresolved = "30" // 未解决
  85. )
  86. const (
  87. OperateTypeProcess = "20" // 处理
  88. OperateTypeResume = "25" // 转处理(恢复)
  89. OperateTypeTransfer = "40" // 转研发
  90. OperateTypeSuspend = "70" // 挂起
  91. OperateTypeClose = "80" // 关闭
  92. )
  93. // OpsOperationEventKanbanSearchReq 看板搜索请求
  94. type OpsOperationEventKanbanSearchReq struct {
  95. KeyWords string `json:"keyWords"` // 关键字搜索(事件编号/标题)
  96. SearchType string `json:"searchType"` // 搜索字段: title/custName/feedbackReporter/eventNo
  97. EventType string `json:"eventType"` // 事件类型
  98. PriorityLevel string `json:"priorityLevel"` // 优先级
  99. SortBy string `json:"sortBy"` // 排序字段: feedbackDateDesc/feedbackDateAsc/custName
  100. }
  101. // AssignOpsUserReq 接收/分配运维人员请求
  102. type AssignOpsUserReq struct {
  103. Id int64 `json:"id" v:"min:1#事件ID不能为空"`
  104. OpsUserId int `json:"opsUserId"`
  105. OpsUserName string `json:"opsUserName"`
  106. }
  107. // AttachmentReq 附件请求
  108. type AttachmentReq struct {
  109. FileName string `json:"fileName"` // 附件名称
  110. FileUrl string `json:"fileUrl"` // 附件URL
  111. FileType string `json:"fileType"` // 附件类型
  112. }
  113. // AddRecordReq 添加处理记录请求
  114. type AddRecordReq struct {
  115. EventId int64 `json:"eventId" v:"min:1#事件ID不能为空"`
  116. HandleContent string `json:"handleContent" v:"required#处理内容不能为空"`
  117. HandleResult string `json:"handleResult"` // 处理结果
  118. Attachments []AttachmentReq `json:"attachments"` // 附件列表
  119. }
  120. // OpsOperationEventHistorySearchReq 运维历史搜索请求
  121. type OpsOperationEventHistorySearchReq struct {
  122. ScopeType string `json:"scopeType"` // 范围: my-本人处理, all-全部
  123. IncludeClosed bool `json:"includeClosed"` // 是否包含未关闭事件
  124. EventTitle string `json:"eventTitle"` // 事件标题(模糊搜索)
  125. CustName string `json:"custName"` // 客户名称(模糊搜索)
  126. FeedbackReporter string `json:"feedbackReporter"` // 反馈人(模糊搜索)
  127. OpsUserName string `json:"opsUserName"` // 处理人(模糊搜索)
  128. BeginTime string `json:"beginTime"` // 反馈开始时间
  129. EndTime string `json:"endTime"` // 反馈结束时间
  130. request.PageReq
  131. }
  132. // OpsOperationEventHistoryExport 运维历史导出参数
  133. type OpsOperationEventHistoryExport struct {
  134. OpsOperationEventHistorySearchReq
  135. Columns []string `json:"columns"` // 导出列
  136. }
  137. // OpsOperationEventHistoryExportData 运维历史导出数据
  138. type OpsOperationEventHistoryExportData struct {
  139. EventNo string `json:"eventNo" export:"事件编号"`
  140. EventTitle string `json:"eventTitle" export:"事件标题"`
  141. EventStatus string `json:"eventStatus" export:"事件状态"`
  142. EventType string `json:"eventType" export:"事件类型"`
  143. CustName string `json:"custName" export:"客户名称"`
  144. OpsUserName string `json:"opsUserName" export:"处理人员"`
  145. FeedbackDate string `json:"feedbackDate" export:"反馈时间"`
  146. PriorityLevel string `json:"priorityLevel" export:"优先级"`
  147. HandleProcess string `json:"handleProcess" export:"处理过程"`
  148. ClosedTime string `json:"closedTime" export:"关闭时间"`
  149. }
  150. // OpsOperationEventHistoryExportContent 运维历史导出内容
  151. type OpsOperationEventHistoryExportContent struct {
  152. Content string `json:"content"` // 导出内容(base64编码)
  153. }
  154. type OpsOperationEventExport struct {
  155. Columns []string `json:"columns"`
  156. }
  157. type OpsOperationEventExportData struct {
  158. EventNo string `json:"eventNo" export:"事件编号"`
  159. EventTitle string `json:"eventTitle" export:"事件标题"`
  160. EventStatus string `json:"eventStatus" export:"事件状态"`
  161. EventType string `json:"eventType" export:"事件类型"`
  162. CustName string `json:"custName" export:"客户名称"`
  163. OpsUserName string `json:"opsUserName" export:"处理人员"`
  164. FeedbackDate string `json:"feedbackDate" export:"反馈时间"`
  165. PriorityLevel string `json:"priorityLevel" export:"优先级"`
  166. HandleProcess string `json:"handleProcess" export:"处理过程"`
  167. }