计划监控增加计划名

This commit is contained in:
2025-10-29 17:52:07 +08:00
parent 2910c9186a
commit af8689d627
9 changed files with 271 additions and 61 deletions

View File

@@ -17,6 +17,7 @@ definitions:
- 2001
- 4000
- 4001
- 4003
- 4004
- 4009
- 5000
@@ -26,6 +27,7 @@ definitions:
CodeBadRequest: 请求参数错误
CodeConflict: 资源冲突
CodeCreated: 创建成功
CodeForbidden: 禁止访问
CodeInternalError: 服务器内部错误
CodeNotFound: 资源未找到
CodeServiceUnavailable: 服务不可用
@@ -36,6 +38,7 @@ definitions:
- 创建成功
- 请求参数错误
- 未授权
- 禁止访问
- 资源未找到
- 资源冲突
- 服务器内部错误
@@ -45,6 +48,7 @@ definitions:
- CodeCreated
- CodeBadRequest
- CodeUnauthorized
- CodeForbidden
- CodeNotFound
- CodeConflict
- CodeInternalError
@@ -421,6 +425,16 @@ definitions:
pagination:
$ref: '#/definitions/dto.PaginationDTO'
type: object
dto.ListPlansResponse:
properties:
plans:
items:
$ref: '#/definitions/dto.PlanResponse'
type: array
total:
example: 100
type: integer
type: object
dto.ListRawMaterialPurchaseResponse:
properties:
list:
@@ -879,6 +893,8 @@ definitions:
type: integer
plan_id:
type: integer
plan_name:
type: string
started_at:
type: string
status:
@@ -914,6 +930,10 @@ definitions:
name:
example: 猪舍温度控制计划
type: string
plan_type:
allOf:
- $ref: '#/definitions/models.PlanType'
example: 自定义任务
status:
allOf:
- $ref: '#/definitions/models.PlanStatus'
@@ -1808,6 +1828,14 @@ definitions:
- PlanStatusEnabled
- PlanStatusStopped
- PlanStatusFailed
models.PlanType:
enum:
- 自定义任务
- 系统任务
type: string
x-enum-varnames:
- PlanTypeCustom
- PlanTypeSystem
models.SensorType:
enum:
- 信号强度
@@ -1855,19 +1883,23 @@ definitions:
- 计划分析
- 等待
- 下料
- 全量采集
type: string
x-enum-comments:
TaskPlanAnalysis: 解析Plan的Task列表并添加到待执行队列的特殊任务
TaskTypeFullCollection: 新增的全量采集任务
TaskTypeReleaseFeedWeight: 下料口释放指定重量任务
TaskTypeWaiting: 等待任务
x-enum-descriptions:
- 解析Plan的Task列表并添加到待执行队列的特殊任务
- 等待任务
- 下料口释放指定重量任务
- 新增的全量采集任务
x-enum-varnames:
- TaskPlanAnalysis
- TaskTypeWaiting
- TaskTypeReleaseFeedWeight
- TaskTypeFullCollection
models.ValueDescriptor:
properties:
multiplier:
@@ -1893,7 +1925,6 @@ definitions:
- NotifierTypeLog
zapcore.Level:
enum:
- 7
- -1
- 0
- 1
@@ -1904,10 +1935,10 @@ definitions:
- -1
- 5
- 6
- 7
format: int32
type: integer
x-enum-varnames:
- _numLevels
- DebugLevel
- InfoLevel
- WarnLevel
@@ -1918,6 +1949,7 @@ definitions:
- _minLevel
- _maxLevel
- InvalidLevel
- _numLevels
info:
contact:
email: divano@example.com
@@ -2489,7 +2521,6 @@ paths:
name: end_time
type: string
- enum:
- 7
- -1
- 0
- 1
@@ -2500,12 +2531,12 @@ paths:
- -1
- 5
- 6
- 7
format: int32
in: query
name: level
type: integer
x-enum-varnames:
- _numLevels
- DebugLevel
- InfoLevel
- WarnLevel
@@ -2516,6 +2547,7 @@ paths:
- _minLevel
- _maxLevel
- InvalidLevel
- _numLevels
- enum:
- 邮件
- 企业微信
@@ -4038,7 +4070,20 @@ paths:
- 猪场管理
/api/v1/plans:
get:
description: 获取所有计划的列表
description: 获取所有计划的列表,支持按类型过滤和分页
parameters:
- description: 页码
in: query
name: page
type: integer
- description: 每页大小
in: query
name: pageSize
type: integer
- description: 计划类型 (all, custom, system),默认为 custom
in: query
name: planType
type: string
produces:
- application/json
responses:
@@ -4049,9 +4094,7 @@ paths:
- $ref: '#/definitions/controller.Response'
- properties:
data:
items:
$ref: '#/definitions/dto.PlanResponse'
type: array
$ref: '#/definitions/dto.ListPlansResponse'
type: object
security:
- BearerAuth: []
@@ -4088,7 +4131,7 @@ paths:
- 计划管理
/api/v1/plans/{id}:
delete:
description: 根据计划ID删除计划。软删除
description: 根据计划ID删除计划。软删除系统计划不允许删除。
parameters:
- description: 计划ID
in: path
@@ -4135,7 +4178,7 @@ paths:
put:
consumes:
- application/json
description: 根据计划ID更新计划的详细信息。
description: 根据计划ID更新计划的详细信息。系统计划不允许修改。
parameters:
- description: 计划ID
in: path
@@ -4167,7 +4210,7 @@ paths:
- 计划管理
/api/v1/plans/{id}/start:
post:
description: 根据计划ID启动一个计划的执行。
description: 根据计划ID启动一个计划的执行。系统计划不允许手动启动。
parameters:
- description: 计划ID
in: path
@@ -4188,7 +4231,7 @@ paths:
- 计划管理
/api/v1/plans/{id}/stop:
post:
description: 根据计划ID停止一个正在执行的计划。
description: 根据计划ID停止一个正在执行的计划。系统计划不能被停止。
parameters:
- description: 计划ID
in: path