operation.go 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  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. }
  41. // UpdateOpsOperationEventReq 运维事件更新请求
  42. type UpdateOpsOperationEventReq struct {
  43. Id int `json:"id" v:"min:1#ID不能为空"` // 主键
  44. OpsOperationEventReq
  45. }
  46. // OpsOperationEventProcessReq 运维事件处理请求
  47. type OpsOperationEventProcessReq struct {
  48. Id int64 `json:"id" v:"min:1#任务ID不能为空"`
  49. HandleContent string `json:"handleContent" v:"required#处理内容不能为空"`
  50. HandleResult string `json:"handleResult"`
  51. OperateType string `json:"operateType" v:"required#操作类型不能为空"`
  52. }
  53. // OpsOperationEventRecordSearchReq 运维事件处理记录搜索请求
  54. type OpsOperationEventRecordSearchReq struct {
  55. EventId int `json:"eventId" v:"min:1#事件ID不能为空"` // 事件ID
  56. request.PageReq
  57. }
  58. // OpsOperationEventAttachmentReq 附件上传请求
  59. type OpsOperationEventAttachmentReq struct {
  60. EventId int `json:"eventId" v:"min:1#事件ID不能为空"` // 事件ID
  61. EventRecordId int `json:"eventRecordId"` // 事件记录ID
  62. FileName string `json:"fileName" v:"required#文件名不能为空"` // 文件名
  63. FileUrl string `json:"fileUrl" v:"required#文件地址不能为空"` // 文件地址
  64. FileType string `json:"fileType"` // 文件类型
  65. Remark string `json:"remark"` // 备注
  66. }
  67. const (
  68. EventStatusPending = "10" // 待处理
  69. EventStatusProcessing = "20" // 处理中(重点)
  70. EventStatusProcessingNormal = "30" // 处理中(普通)
  71. EventStatusTransfer = "40" // 转研发
  72. EventStatusSuspended = "70" // 挂起
  73. EventStatusClosed = "80" // 已关闭
  74. )
  75. const (
  76. HandleResultResolved = "10" // 已解决
  77. HandleResultPartially = "20" // 部分解决
  78. HandleResultUnresolved = "30" // 未解决
  79. )
  80. const (
  81. OperateTypeProcess = "20" // 处理
  82. OperateTypeResume = "25" // 转处理(恢复)
  83. OperateTypeTransfer = "40" // 转研发
  84. OperateTypeSuspend = "70" // 挂起
  85. OperateTypeClose = "80" // 关闭
  86. )
  87. // OpsOperationEventKanbanSearchReq 看板搜索请求
  88. type OpsOperationEventKanbanSearchReq struct {
  89. KeyWords string `json:"keyWords"` // 关键字搜索(事件编号/标题)
  90. SearchType string `json:"searchType"` // 搜索字段: title/custName/feedbackReporter/eventNo
  91. EventType string `json:"eventType"` // 事件类型
  92. PriorityLevel string `json:"priorityLevel"` // 优先级
  93. }
  94. // AssignOpsUserReq 接收/分配运维人员请求
  95. type AssignOpsUserReq struct {
  96. Id int64 `json:"id" v:"min:1#事件ID不能为空"`
  97. OpsUserId int `json:"opsUserId"`
  98. OpsUserName string `json:"opsUserName"`
  99. }
  100. // AddRecordReq 添加处理记录请求
  101. type AddRecordReq struct {
  102. EventId int64 `json:"eventId" v:"min:1#事件ID不能为空"`
  103. HandleContent string `json:"handleContent" v:"required#处理内容不能为空"`
  104. HandleResult string `json:"handleResult"` // 处理结果
  105. }
  106. // OpsOperationEventHistorySearchReq 运维历史搜索请求
  107. type OpsOperationEventHistorySearchReq struct {
  108. ScopeType string `json:"scopeType"` // 范围: my-本人处理, all-全部
  109. IncludeClosed bool `json:"includeClosed"` // 是否包含未关闭事件
  110. EventTitle string `json:"eventTitle"` // 事件标题(模糊搜索)
  111. CustName string `json:"custName"` // 客户名称(模糊搜索)
  112. FeedbackReporter string `json:"feedbackReporter"` // 反馈人(模糊搜索)
  113. OpsUserName string `json:"opsUserName"` // 处理人(模糊搜索)
  114. BeginTime string `json:"beginTime"` // 反馈开始时间
  115. EndTime string `json:"endTime"` // 反馈结束时间
  116. request.PageReq
  117. }
  118. // OpsOperationEventHistoryExport 运维历史导出参数
  119. type OpsOperationEventHistoryExport struct {
  120. OpsOperationEventHistorySearchReq
  121. Columns []string `json:"columns"` // 导出列
  122. }
  123. // OpsOperationEventHistoryExportData 运维历史导出数据
  124. type OpsOperationEventHistoryExportData struct {
  125. EventNo string `json:"eventNo" export:"事件编号"`
  126. EventTitle string `json:"eventTitle" export:"事件标题"`
  127. EventStatus string `json:"eventStatus" export:"事件状态"`
  128. EventType string `json:"eventType" export:"事件类型"`
  129. CustName string `json:"custName" export:"客户名称"`
  130. OpsUserName string `json:"opsUserName" export:"处理人员"`
  131. FeedbackDate string `json:"feedbackDate" export:"反馈时间"`
  132. PriorityLevel string `json:"priorityLevel" export:"优先级"`
  133. HandleProcess string `json:"handleProcess" export:"处理过程"`
  134. ClosedTime string `json:"closedTime" export:"关闭时间"`
  135. }
  136. // OpsOperationEventHistoryExportContent 运维历史导出内容
  137. type OpsOperationEventHistoryExportContent struct {
  138. Content string `json:"content"` // 导出内容(base64编码)
  139. }
  140. type OpsOperationEventExport struct {
  141. Columns []string `json:"columns"`
  142. }
  143. type OpsOperationEventExportData struct {
  144. EventNo string `json:"eventNo" export:"事件编号"`
  145. EventTitle string `json:"eventTitle" export:"事件标题"`
  146. EventStatus string `json:"eventStatus" export:"事件状态"`
  147. EventType string `json:"eventType" export:"事件类型"`
  148. CustName string `json:"custName" export:"客户名称"`
  149. OpsUserName string `json:"opsUserName" export:"处理人员"`
  150. FeedbackDate string `json:"feedbackDate" export:"反馈时间"`
  151. PriorityLevel string `json:"priorityLevel" export:"优先级"`
  152. HandleProcess string `json:"handleProcess" export:"处理过程"`
  153. }