2025-10-03 23:59:25 +08:00
|
|
|
|
// Package docs Code generated by swaggo/swag. DO NOT EDIT
|
|
|
|
|
|
package docs
|
|
|
|
|
|
|
|
|
|
|
|
import "github.com/swaggo/swag"
|
|
|
|
|
|
|
|
|
|
|
|
const docTemplate = `{
|
|
|
|
|
|
"schemes": {{ marshal .Schemes }},
|
|
|
|
|
|
"swagger": "2.0",
|
|
|
|
|
|
"info": {
|
|
|
|
|
|
"description": "{{escape .Description}}",
|
|
|
|
|
|
"title": "{{.Title}}",
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"contact": {
|
|
|
|
|
|
"name": "Divano",
|
|
|
|
|
|
"url": "http://www.example.com",
|
|
|
|
|
|
"email": "divano@example.com"
|
|
|
|
|
|
},
|
|
|
|
|
|
"license": {
|
|
|
|
|
|
"name": "Apache 2.0",
|
|
|
|
|
|
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"version": "{{.Version}}"
|
|
|
|
|
|
},
|
|
|
|
|
|
"host": "{{.Host}}",
|
|
|
|
|
|
"basePath": "{{.BasePath}}",
|
|
|
|
|
|
"paths": {
|
2025-11-10 13:41:26 +08:00
|
|
|
|
"/api/v1/alarm/threshold/active-alarms": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据过滤条件和分页参数查询活跃告警列表",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"告警管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "批量查询活跃告警",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "告警触发时间范围 - 结束时间",
|
|
|
|
|
|
"name": "end_time",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "boolean",
|
|
|
|
|
|
"description": "按是否被忽略过滤",
|
|
|
|
|
|
"name": "is_ignored",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"enum": [
|
2025-11-18 22:22:31 +08:00
|
|
|
|
"debug",
|
|
|
|
|
|
"info",
|
|
|
|
|
|
"warn",
|
|
|
|
|
|
"error",
|
|
|
|
|
|
"dpanic",
|
|
|
|
|
|
"panic",
|
|
|
|
|
|
"fatal"
|
2025-11-10 13:41:26 +08:00
|
|
|
|
],
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"DebugLevel",
|
|
|
|
|
|
"InfoLevel",
|
|
|
|
|
|
"WarnLevel",
|
|
|
|
|
|
"ErrorLevel",
|
|
|
|
|
|
"DPanicLevel",
|
|
|
|
|
|
"PanicLevel",
|
|
|
|
|
|
"FatalLevel"
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "按告警严重性等级过滤",
|
|
|
|
|
|
"name": "level",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "排序字段,例如 \"trigger_time DESC\"",
|
|
|
|
|
|
"name": "order_by",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"name": "page",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"name": "page_size",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "按告警来源ID过滤",
|
|
|
|
|
|
"name": "source_id",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"普通设备",
|
|
|
|
|
|
"区域主控",
|
|
|
|
|
|
"系统"
|
|
|
|
|
|
],
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"AlarmSourceTypeDevice",
|
|
|
|
|
|
"AlarmSourceTypeAreaController",
|
|
|
|
|
|
"AlarmSourceTypeSystem"
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "按告警来源类型过滤",
|
|
|
|
|
|
"name": "source_type",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "告警触发时间范围 - 开始时间",
|
|
|
|
|
|
"name": "trigger_time",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "成功获取活跃告警列表",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ListActiveAlarmResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-10 19:18:49 +08:00
|
|
|
|
"/api/v1/alarm/threshold/area": {
|
2025-11-16 16:30:26 +08:00
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据过滤条件和分页参数查询区域阈值告警列表",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"告警管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "批量查询区域阈值告警",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "按区域主控ID过滤",
|
|
|
|
|
|
"name": "area_controller_id",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"enum": [
|
2025-11-18 22:22:31 +08:00
|
|
|
|
"debug",
|
|
|
|
|
|
"info",
|
|
|
|
|
|
"warn",
|
|
|
|
|
|
"error",
|
|
|
|
|
|
"dpanic",
|
|
|
|
|
|
"panic",
|
|
|
|
|
|
"fatal"
|
2025-11-16 16:30:26 +08:00
|
|
|
|
],
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"DebugLevel",
|
|
|
|
|
|
"InfoLevel",
|
|
|
|
|
|
"WarnLevel",
|
|
|
|
|
|
"ErrorLevel",
|
|
|
|
|
|
"DPanicLevel",
|
|
|
|
|
|
"PanicLevel",
|
|
|
|
|
|
"FatalLevel"
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "按告警等级过滤",
|
|
|
|
|
|
"name": "level",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "排序字段,例如 \"id DESC\"",
|
|
|
|
|
|
"name": "order_by",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"name": "page",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"name": "page_size",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"信号强度",
|
|
|
|
|
|
"电池电量",
|
|
|
|
|
|
"温度",
|
|
|
|
|
|
"湿度",
|
|
|
|
|
|
"重量"
|
|
|
|
|
|
],
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"x-enum-comments": {
|
|
|
|
|
|
"SensorTypeBatteryLevel": "电池电量",
|
|
|
|
|
|
"SensorTypeHumidity": "湿度",
|
|
|
|
|
|
"SensorTypeSignalMetrics": "信号强度",
|
|
|
|
|
|
"SensorTypeTemperature": "温度",
|
|
|
|
|
|
"SensorTypeWeight": "重量"
|
|
|
|
|
|
},
|
|
|
|
|
|
"x-enum-descriptions": [
|
|
|
|
|
|
"信号强度",
|
|
|
|
|
|
"电池电量",
|
|
|
|
|
|
"温度",
|
|
|
|
|
|
"湿度",
|
|
|
|
|
|
"重量"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"SensorTypeSignalMetrics",
|
|
|
|
|
|
"SensorTypeBatteryLevel",
|
|
|
|
|
|
"SensorTypeTemperature",
|
|
|
|
|
|
"SensorTypeHumidity",
|
|
|
|
|
|
"SensorTypeWeight"
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "按传感器类型过滤",
|
|
|
|
|
|
"name": "sensor_type",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "成功获取区域阈值告警列表",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ListAreaThresholdAlarmResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-10 19:18:49 +08:00
|
|
|
|
"post": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "为指定的区域主控创建一个新的阈值告警规则",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"告警管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "创建区域阈值告警",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "创建区域阈值告警请求体",
|
|
|
|
|
|
"name": "request",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.CreateAreaThresholdAlarmDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "成功创建区域阈值告警",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/alarm/threshold/area/{task_id}": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据任务ID获取单个区域阈值告警规则的详细信息",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"告警管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取区域阈值告警",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "任务ID",
|
|
|
|
|
|
"name": "task_id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "成功获取区域阈值告警",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.AreaThresholdAlarmDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"put": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据任务ID更新已存在的区域阈值告警规则",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"告警管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "更新区域阈值告警",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "任务ID",
|
|
|
|
|
|
"name": "task_id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "更新区域阈值告警请求体",
|
|
|
|
|
|
"name": "request",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.UpdateAreaThresholdAlarmDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "成功更新区域阈值告警",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"delete": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据任务ID删除区域阈值告警规则",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"告警管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "删除区域阈值告警",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "任务ID",
|
|
|
|
|
|
"name": "task_id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "成功删除区域阈值告警",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/alarm/threshold/device": {
|
2025-11-16 16:30:26 +08:00
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据过滤条件和分页参数查询设备阈值告警列表",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"告警管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "批量查询设备阈值告警",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "按设备ID过滤",
|
|
|
|
|
|
"name": "device_id",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"enum": [
|
2025-11-18 22:22:31 +08:00
|
|
|
|
"debug",
|
|
|
|
|
|
"info",
|
|
|
|
|
|
"warn",
|
|
|
|
|
|
"error",
|
|
|
|
|
|
"dpanic",
|
|
|
|
|
|
"panic",
|
|
|
|
|
|
"fatal"
|
2025-11-16 16:30:26 +08:00
|
|
|
|
],
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"DebugLevel",
|
|
|
|
|
|
"InfoLevel",
|
|
|
|
|
|
"WarnLevel",
|
|
|
|
|
|
"ErrorLevel",
|
|
|
|
|
|
"DPanicLevel",
|
|
|
|
|
|
"PanicLevel",
|
|
|
|
|
|
"FatalLevel"
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "按告警等级过滤",
|
|
|
|
|
|
"name": "level",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "排序字段,例如 \"id DESC\"",
|
|
|
|
|
|
"name": "order_by",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"name": "page",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"name": "page_size",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"信号强度",
|
|
|
|
|
|
"电池电量",
|
|
|
|
|
|
"温度",
|
|
|
|
|
|
"湿度",
|
|
|
|
|
|
"重量"
|
|
|
|
|
|
],
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"x-enum-comments": {
|
|
|
|
|
|
"SensorTypeBatteryLevel": "电池电量",
|
|
|
|
|
|
"SensorTypeHumidity": "湿度",
|
|
|
|
|
|
"SensorTypeSignalMetrics": "信号强度",
|
|
|
|
|
|
"SensorTypeTemperature": "温度",
|
|
|
|
|
|
"SensorTypeWeight": "重量"
|
|
|
|
|
|
},
|
|
|
|
|
|
"x-enum-descriptions": [
|
|
|
|
|
|
"信号强度",
|
|
|
|
|
|
"电池电量",
|
|
|
|
|
|
"温度",
|
|
|
|
|
|
"湿度",
|
|
|
|
|
|
"重量"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"SensorTypeSignalMetrics",
|
|
|
|
|
|
"SensorTypeBatteryLevel",
|
|
|
|
|
|
"SensorTypeTemperature",
|
|
|
|
|
|
"SensorTypeHumidity",
|
|
|
|
|
|
"SensorTypeWeight"
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "按传感器类型过滤",
|
|
|
|
|
|
"name": "sensor_type",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "成功获取设备阈值告警列表",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ListDeviceThresholdAlarmResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-10 19:18:49 +08:00
|
|
|
|
"post": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "为单个设备创建一条新的阈值告警规则",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"告警管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "创建设备阈值告警",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "创建设备阈值告警请求体",
|
|
|
|
|
|
"name": "request",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.CreateDeviceThresholdAlarmDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "成功创建设备阈值告警",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/alarm/threshold/device/{task_id}": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据任务ID获取单个设备阈值告警规则的详细信息",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"告警管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取设备阈值告警",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "任务ID",
|
|
|
|
|
|
"name": "task_id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "成功获取设备阈值告警",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.DeviceThresholdAlarmDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"put": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据任务ID更新已存在的设备阈值告警规则",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"告警管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "更新设备阈值告警",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "任务ID",
|
|
|
|
|
|
"name": "task_id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "更新设备阈值告警请求体",
|
|
|
|
|
|
"name": "request",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.UpdateDeviceThresholdAlarmDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "成功更新设备阈值告警",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"delete": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据任务ID删除设备阈值告警规则",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"告警管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "删除设备阈值告警",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "任务ID",
|
|
|
|
|
|
"name": "task_id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "删除设备阈值告警请求体",
|
|
|
|
|
|
"name": "request",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.DeleteDeviceThresholdAlarmDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "成功删除设备阈值告警",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-10 13:41:26 +08:00
|
|
|
|
"/api/v1/alarm/threshold/historical-alarms": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据过滤条件和分页参数查询历史告警列表",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"告警管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "批量查询历史告警",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"enum": [
|
2025-11-18 22:22:31 +08:00
|
|
|
|
"debug",
|
|
|
|
|
|
"info",
|
|
|
|
|
|
"warn",
|
|
|
|
|
|
"error",
|
|
|
|
|
|
"dpanic",
|
|
|
|
|
|
"panic",
|
|
|
|
|
|
"fatal"
|
2025-11-10 13:41:26 +08:00
|
|
|
|
],
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"DebugLevel",
|
|
|
|
|
|
"InfoLevel",
|
|
|
|
|
|
"WarnLevel",
|
|
|
|
|
|
"ErrorLevel",
|
|
|
|
|
|
"DPanicLevel",
|
|
|
|
|
|
"PanicLevel",
|
|
|
|
|
|
"FatalLevel"
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "按告警严重性等级过滤",
|
|
|
|
|
|
"name": "level",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "排序字段,例如 \"trigger_time DESC\"",
|
|
|
|
|
|
"name": "order_by",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"name": "page",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"name": "page_size",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "告警解决时间范围 - 结束时间",
|
|
|
|
|
|
"name": "resolve_time_end",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "告警解决时间范围 - 开始时间",
|
|
|
|
|
|
"name": "resolve_time_start",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "按告警来源ID过滤",
|
|
|
|
|
|
"name": "source_id",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"普通设备",
|
|
|
|
|
|
"区域主控",
|
|
|
|
|
|
"系统"
|
|
|
|
|
|
],
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"AlarmSourceTypeDevice",
|
|
|
|
|
|
"AlarmSourceTypeAreaController",
|
|
|
|
|
|
"AlarmSourceTypeSystem"
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "按告警来源类型过滤",
|
|
|
|
|
|
"name": "source_type",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "告警触发时间范围 - 结束时间",
|
|
|
|
|
|
"name": "trigger_time_end",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "告警触发时间范围 - 开始时间",
|
|
|
|
|
|
"name": "trigger_time_start",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "成功获取历史告警列表",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ListHistoricalAlarmResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/alarm/threshold/{id}/cancel-snooze": {
|
|
|
|
|
|
"post": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据告警ID取消对一个阈值告警的忽略状态",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"告警管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "取消忽略阈值告警",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "告警ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "成功取消忽略告警",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/alarm/threshold/{id}/snooze": {
|
|
|
|
|
|
"post": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据告警ID忽略一个活跃的阈值告警,或更新其忽略时间",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"告警管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "忽略阈值告警",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "告警ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "忽略告警请求体",
|
|
|
|
|
|
"name": "request",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.SnoozeAlarmRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "成功忽略告警",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"/api/v1/area-controllers": {
|
|
|
|
|
|
"get": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"description": "获取系统中所有区域主控的列表",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"区域主控管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取所有区域主控列表",
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.AreaControllerResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"post": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"description": "根据提供的信息创建一个新区域主控",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"区域主控管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "创建新区域主控",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "区域主控信息",
|
|
|
|
|
|
"name": "areaController",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.CreateAreaControllerRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.AreaControllerResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/area-controllers/{id}": {
|
|
|
|
|
|
"get": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"description": "根据ID获取单个区域主控的详细信息",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"区域主控管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取区域主控信息",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "区域主控ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.AreaControllerResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"put": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"description": "根据ID更新一个已存在的区域主控信息",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"区域主控管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "更新区域主控信息",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "区域主控ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "要更新的区域主控信息",
|
|
|
|
|
|
"name": "areaController",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.UpdateAreaControllerRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.AreaControllerResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"delete": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"description": "根据ID删除一个区域主控(软删除)",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"区域主控管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "删除区域主控",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "区域主控ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/device-templates": {
|
|
|
|
|
|
"get": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"description": "获取系统中所有设备模板的列表",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"设备模板管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取设备模板列表",
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.DeviceTemplateResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"post": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"description": "根据提供的信息创建一个新设备模板",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"设备模板管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "创建新设备模板",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "设备模板信息",
|
|
|
|
|
|
"name": "deviceTemplate",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.CreateDeviceTemplateRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.DeviceTemplateResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/device-templates/{id}": {
|
|
|
|
|
|
"get": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"description": "根据设备模板ID获取单个设备模板的详细信息",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"设备模板管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取设备模板信息",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "设备模板ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.DeviceTemplateResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"put": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"description": "根据设备模板ID更新一个已存在的设备模板信息",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"设备模板管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "更新设备模板信息",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "设备模板ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "要更新的设备模板信息",
|
|
|
|
|
|
"name": "deviceTemplate",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.UpdateDeviceTemplateRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.DeviceTemplateResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"delete": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"description": "根据设备模板ID删除一个设备模板(软删除)",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"设备模板管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "删除设备模板",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "设备模板ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/devices": {
|
|
|
|
|
|
"get": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"description": "获取系统中所有设备的列表",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"设备管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取设备列表",
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.DeviceResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"post": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"description": "根据提供的信息创建一个新设备",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"设备管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "创建新设备",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "设备信息",
|
|
|
|
|
|
"name": "device",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.CreateDeviceRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.DeviceResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"/api/v1/devices/manual-control/{id}": {
|
|
|
|
|
|
"post": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "根据设备ID和指定的动作(开启或关闭)来手动控制设备",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"设备管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "手动控制设备",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "设备ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "手动控制指令",
|
|
|
|
|
|
"name": "manualControl",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ManualControlDeviceRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"/api/v1/devices/{id}": {
|
|
|
|
|
|
"get": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"description": "根据设备ID获取单个设备的详细信息",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"设备管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取设备信息",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "设备ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.DeviceResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"put": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"description": "根据设备ID更新一个已存在的设备信息",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"设备管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "更新设备信息",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "设备ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "要更新的设备信息",
|
|
|
|
|
|
"name": "device",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.UpdateDeviceRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.DeviceResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"delete": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"description": "根据设备ID删除一个设备(软删除)",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"设备管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "删除设备",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "设备ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"/api/v1/feed/nutrients": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "获取所有营养种类的列表,支持分页和过滤。",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-11-23 14:49:55 +08:00
|
|
|
|
"饲料管理-营养"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取营养种类列表",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-11-21 17:23:57 +08:00
|
|
|
|
"description": "按营养名称模糊查询",
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"name": "name",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "排序字段,例如 \"id DESC\"",
|
|
|
|
|
|
"name": "order_by",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "页码",
|
|
|
|
|
|
"name": "page",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "每页数量",
|
|
|
|
|
|
"name": "page_size",
|
|
|
|
|
|
"in": "query"
|
2025-11-21 17:23:57 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "按原料名称模糊查询",
|
|
|
|
|
|
"name": "raw_material_name",
|
|
|
|
|
|
"in": "query"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表成功获取列表",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ListNutrientResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"post": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "创建一个新的营养种类。",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-11-23 14:49:55 +08:00
|
|
|
|
"饲料管理-营养"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "创建营养种类",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "营养种类信息",
|
|
|
|
|
|
"name": "nutrient",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.CreateNutrientRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为201代表创建成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.NutrientResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/feed/nutrients/{id}": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据ID获取单个营养种类的详细信息。",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-11-23 14:49:55 +08:00
|
|
|
|
"饲料管理-营养"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取营养种类详情",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "营养种类ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表成功获取",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.NutrientResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"put": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据ID更新营养种类信息。",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-11-23 14:49:55 +08:00
|
|
|
|
"饲料管理-营养"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "更新营养种类",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "营养种类ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "更新后的营养种类信息",
|
|
|
|
|
|
"name": "nutrient",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.UpdateNutrientRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表更新成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.NutrientResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"delete": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据ID删除营养种类。",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-11-23 14:49:55 +08:00
|
|
|
|
"饲料管理-营养"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "删除营养种类",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "营养种类ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表删除成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/feed/pig-age-stages": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "获取所有猪年龄阶段的列表,支持分页和过滤。",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-11-23 14:49:55 +08:00
|
|
|
|
"饲料管理-猪"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取猪年龄阶段列表",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "按名称模糊查询",
|
|
|
|
|
|
"name": "name",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "排序字段,例如 \"id DESC\"",
|
|
|
|
|
|
"name": "order_by",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "页码",
|
|
|
|
|
|
"name": "page",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "每页数量",
|
|
|
|
|
|
"name": "page_size",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表成功获取列表",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ListPigAgeStageResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"post": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "创建一个新的猪年龄阶段。",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-11-23 14:49:55 +08:00
|
|
|
|
"饲料管理-猪"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "创建猪年龄阶段",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "猪年龄阶段信息",
|
|
|
|
|
|
"name": "pigAgeStage",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.CreatePigAgeStageRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为201代表创建成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigAgeStageResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/feed/pig-age-stages/{id}": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据ID获取单个猪年龄阶段的详细信息。",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-11-23 14:49:55 +08:00
|
|
|
|
"饲料管理-猪"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取猪年龄阶段详情",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪年龄阶段ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表成功获取",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigAgeStageResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"put": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据ID更新猪年龄阶段信息。",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-11-23 14:49:55 +08:00
|
|
|
|
"饲料管理-猪"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "更新猪年龄阶段",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪年龄阶段ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "更新后的猪年龄阶段信息",
|
|
|
|
|
|
"name": "pigAgeStage",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.UpdatePigAgeStageRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表更新成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigAgeStageResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"delete": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据ID删除猪年龄阶段。",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-11-23 14:49:55 +08:00
|
|
|
|
"饲料管理-猪"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "删除猪年龄阶段",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪年龄阶段ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表删除成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/feed/pig-breeds": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "获取所有猪品种的列表,支持分页和过滤。",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-11-23 14:49:55 +08:00
|
|
|
|
"饲料管理-猪"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取猪品种列表",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "按名称模糊查询",
|
|
|
|
|
|
"name": "name",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "排序字段,例如 \"id DESC\"",
|
|
|
|
|
|
"name": "order_by",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "页码",
|
|
|
|
|
|
"name": "page",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "每页数量",
|
|
|
|
|
|
"name": "page_size",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表成功获取列表",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ListPigBreedResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"post": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "创建一个新的猪品种。",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-11-23 14:49:55 +08:00
|
|
|
|
"饲料管理-猪"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "创建猪品种",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "猪品种信息",
|
|
|
|
|
|
"name": "pigBreed",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.CreatePigBreedRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为201代表创建成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigBreedResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/feed/pig-breeds/{id}": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据ID获取单个猪品种的详细信息。",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-11-23 14:49:55 +08:00
|
|
|
|
"饲料管理-猪"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取猪品种详情",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪品种ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表成功获取",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigBreedResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"put": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据ID更新猪品种信息。",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-11-23 14:49:55 +08:00
|
|
|
|
"饲料管理-猪"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "更新猪品种",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪品种ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "更新后的猪品种信息",
|
|
|
|
|
|
"name": "pigBreed",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.UpdatePigBreedRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表更新成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigBreedResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"delete": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据ID删除猪品种。",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-11-23 14:49:55 +08:00
|
|
|
|
"饲料管理-猪"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "删除猪品种",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪品种ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表删除成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/feed/pig-types": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "获取所有猪类型的列表,支持分页和过滤。",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-11-23 14:49:55 +08:00
|
|
|
|
"饲料管理-猪"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取猪类型列表",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "关联的猪年龄阶段ID",
|
|
|
|
|
|
"name": "age_stage_id",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "关联的猪年龄阶段名称 (用于模糊查询)",
|
|
|
|
|
|
"name": "age_stage_name",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "关联的猪品种ID",
|
|
|
|
|
|
"name": "breed_id",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "关联的猪品种名称 (用于模糊查询)",
|
|
|
|
|
|
"name": "breed_name",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "排序字段,例如 \"id DESC\"",
|
|
|
|
|
|
"name": "order_by",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "页码",
|
|
|
|
|
|
"name": "page",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "每页数量",
|
|
|
|
|
|
"name": "page_size",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表成功获取列表",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ListPigTypeResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"post": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "创建一个新的猪类型。",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-11-23 14:49:55 +08:00
|
|
|
|
"饲料管理-猪"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "创建猪类型",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "猪类型信息",
|
|
|
|
|
|
"name": "pigType",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.CreatePigTypeRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为201代表创建成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigTypeResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/feed/pig-types/{id}": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据ID获取单个猪类型的详细信息。",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-11-23 14:49:55 +08:00
|
|
|
|
"饲料管理-猪"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取猪类型详情",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪类型ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表成功获取",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigTypeResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"put": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据ID更新猪类型信息。",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-11-23 14:49:55 +08:00
|
|
|
|
"饲料管理-猪"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "更新猪类型",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪类型ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "更新后的猪类型信息",
|
|
|
|
|
|
"name": "pigType",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.UpdatePigTypeRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表更新成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigTypeResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"delete": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据ID删除猪类型。",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-11-23 14:49:55 +08:00
|
|
|
|
"饲料管理-猪"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "删除猪类型",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪类型ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表删除成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-22 17:55:52 +08:00
|
|
|
|
"/api/v1/feed/pig-types/{id}/nutrient-requirements": {
|
|
|
|
|
|
"put": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据猪类型ID,替换其所有的营养需求信息。这是一个覆盖操作。",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-11-23 14:49:55 +08:00
|
|
|
|
"饲料管理-猪"
|
2025-11-22 17:55:52 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "全量更新猪类型的营养需求",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪类型ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "新的营养需求列表",
|
|
|
|
|
|
"name": "nutrientRequirements",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.UpdatePigTypeNutrientRequirementsRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表更新成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigTypeResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"/api/v1/feed/raw-materials": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "获取所有原料的列表,支持分页和过滤。",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-11-23 14:49:55 +08:00
|
|
|
|
"饲料管理-原料"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取原料列表",
|
|
|
|
|
|
"parameters": [
|
2025-11-25 20:22:38 +08:00
|
|
|
|
{
|
|
|
|
|
|
"type": "number",
|
|
|
|
|
|
"description": "参考价格最大值",
|
|
|
|
|
|
"name": "max_reference_price",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "number",
|
|
|
|
|
|
"description": "参考价格最小值",
|
|
|
|
|
|
"name": "min_reference_price",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
2025-11-21 16:02:06 +08:00
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-11-21 17:23:57 +08:00
|
|
|
|
"description": "按原料名称模糊查询",
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"name": "name",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
2025-11-21 17:23:57 +08:00
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "按营养名称模糊查询",
|
|
|
|
|
|
"name": "nutrient_name",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
2025-11-21 16:02:06 +08:00
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "排序字段,例如 \"id DESC\"",
|
|
|
|
|
|
"name": "order_by",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "页码",
|
|
|
|
|
|
"name": "page",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "每页数量",
|
|
|
|
|
|
"name": "page_size",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表成功获取列表",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ListRawMaterialResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"post": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "创建一个新的原料。",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-11-23 14:49:55 +08:00
|
|
|
|
"饲料管理-原料"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "创建原料",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
2025-11-25 20:22:38 +08:00
|
|
|
|
"description": "原料信息,包含名称、描述和参考价格",
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"name": "rawMaterial",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.CreateRawMaterialRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为201代表创建成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.RawMaterialResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/feed/raw-materials/{id}": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据ID获取单个原料的详细信息。",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-11-23 14:49:55 +08:00
|
|
|
|
"饲料管理-原料"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取原料详情",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "原料ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表成功获取",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.RawMaterialResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"put": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据ID更新原料信息。",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-11-23 14:49:55 +08:00
|
|
|
|
"饲料管理-原料"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "更新原料",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "原料ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-11-25 20:22:38 +08:00
|
|
|
|
"description": "更新后的原料信息,包含名称、描述和参考价格",
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"name": "rawMaterial",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.UpdateRawMaterialRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表更新成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.RawMaterialResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"delete": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据ID删除原料。",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-11-23 14:49:55 +08:00
|
|
|
|
"饲料管理-原料"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "删除原料",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "原料ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表删除成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-22 16:44:22 +08:00
|
|
|
|
"/api/v1/feed/raw-materials/{id}/nutrients": {
|
|
|
|
|
|
"put": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据原料ID,替换其所有的营养成分信息。这是一个覆盖操作。",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-11-23 14:49:55 +08:00
|
|
|
|
"饲料管理-原料"
|
2025-11-22 16:44:22 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "全量更新原料的营养成分",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "原料ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "新的营养成分列表",
|
|
|
|
|
|
"name": "nutrients",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.UpdateRawMaterialNutrientsRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表更新成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.RawMaterialResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-24 13:25:15 +08:00
|
|
|
|
"/api/v1/feed/recipes": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "获取所有配方的列表,支持分页和过滤。",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"饲料管理-配方"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取配方列表",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "按名称模糊查询",
|
|
|
|
|
|
"name": "name",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "排序字段,例如 \"id DESC\"",
|
|
|
|
|
|
"name": "order_by",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "页码",
|
|
|
|
|
|
"name": "page",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "每页数量",
|
|
|
|
|
|
"name": "page_size",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表成功获取列表",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ListRecipeResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"post": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "创建一个新的配方,包含其原料组成。",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"饲料管理-配方"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "创建配方",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "配方信息",
|
|
|
|
|
|
"name": "recipe",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.CreateRecipeRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为201代表创建成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.RecipeResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-26 20:44:41 +08:00
|
|
|
|
"/api/v1/feed/recipes/generate-from-all-materials/{pig_type_id}": {
|
|
|
|
|
|
"post": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据指定的猪类型ID,使用系统中所有可用的原料,自动计算并创建一个成本最优的配方。",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"饲料管理-配方"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "使用系统中所有可用的原料一键生成配方",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪类型ID",
|
|
|
|
|
|
"name": "pig_type_id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"201": {
|
|
|
|
|
|
"description": "业务码为201代表创建成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.GenerateRecipeResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-24 13:25:15 +08:00
|
|
|
|
"/api/v1/feed/recipes/{id}": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据ID获取单个配方的详细信息。",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"饲料管理-配方"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取配方详情",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "配方ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表成功获取",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.RecipeResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"put": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据ID更新配方信息及其原料组成。",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"饲料管理-配方"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "更新配方",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "配方ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "更新后的配方信息",
|
|
|
|
|
|
"name": "recipe",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.UpdateRecipeRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表更新成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.RecipeResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"delete": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据ID删除配方。",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"饲料管理-配方"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "删除配方",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "配方ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表删除成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-25 18:10:28 +08:00
|
|
|
|
"/api/v1/inventory/stock/adjust": {
|
|
|
|
|
|
"post": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "手动调整指定原料的库存量。",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"库存管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "调整原料库存",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "库存调整请求",
|
|
|
|
|
|
"name": "request",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.StockAdjustmentRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表调整成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.StockLogResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/inventory/stock/current": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "获取所有原料的当前库存列表,支持分页和过滤。",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"库存管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取当前库存列表",
|
|
|
|
|
|
"parameters": [
|
2025-11-27 17:33:28 +08:00
|
|
|
|
{
|
|
|
|
|
|
"type": "boolean",
|
|
|
|
|
|
"description": "只查询有库存的原料",
|
|
|
|
|
|
"name": "has_stock",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
2025-11-25 18:10:28 +08:00
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "排序字段, 例如 \"stock DESC\"",
|
|
|
|
|
|
"name": "order_by",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "页码",
|
|
|
|
|
|
"name": "page",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "每页数量",
|
|
|
|
|
|
"name": "page_size",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "按原料名称模糊查询",
|
|
|
|
|
|
"name": "raw_material_name",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表成功获取列表",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ListCurrentStockResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/inventory/stock/logs": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "获取原料库存变动历史记录,支持分页、过滤和时间范围查询。",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"库存管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取库存变动日志",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "结束时间 (RFC3339格式)",
|
|
|
|
|
|
"name": "end_time",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "排序字段",
|
|
|
|
|
|
"name": "order_by",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "页码",
|
|
|
|
|
|
"name": "page",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "每页数量",
|
|
|
|
|
|
"name": "page_size",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "按原料ID精确查询",
|
|
|
|
|
|
"name": "raw_material_id",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
2025-11-25 20:22:38 +08:00
|
|
|
|
"enum": [
|
|
|
|
|
|
"采购入库",
|
|
|
|
|
|
"饲喂出库",
|
|
|
|
|
|
"变质出库",
|
|
|
|
|
|
"售卖出库",
|
|
|
|
|
|
"杂用领取",
|
|
|
|
|
|
"手动盘点",
|
|
|
|
|
|
"发酵出库",
|
|
|
|
|
|
"发酵入库"
|
|
|
|
|
|
],
|
2025-11-25 18:10:28 +08:00
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"collectionFormat": "csv",
|
|
|
|
|
|
"description": "按来源类型查询",
|
|
|
|
|
|
"name": "source_types",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"description": "开始时间 (RFC3339格式, e.g., \"2023-01-01T00:00:00Z\")",
|
|
|
|
|
|
"name": "start_time",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表成功获取列表",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ListStockLogResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"/api/v1/monitor/device-command-logs": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据提供的过滤条件,分页获取设备命令日志",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"数据监控"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取设备命令日志列表",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "device_id",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "end_time",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "order_by",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"name": "page",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "page_size",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "boolean",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "received_success",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "start_time",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ListDeviceCommandLogResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/monitor/medication-logs": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据提供的过滤条件,分页获取用药记录",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"数据监控"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取用药记录列表",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "end_time",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "medication_id",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "operator_id",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "order_by",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"name": "page",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "page_size",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "pig_batch_id",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"name": "reason",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "start_time",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ListMedicationLogResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-25 15:04:47 +08:00
|
|
|
|
"/api/v1/monitor/notifications": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据提供的过滤条件,分页获取通知列表",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"数据监控"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "批量查询通知",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "end_time",
|
2025-10-25 15:04:47 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"enum": [
|
2025-11-27 17:33:28 +08:00
|
|
|
|
7,
|
2025-10-25 15:04:47 +08:00
|
|
|
|
-1,
|
|
|
|
|
|
0,
|
|
|
|
|
|
1,
|
|
|
|
|
|
2,
|
|
|
|
|
|
3,
|
|
|
|
|
|
4,
|
|
|
|
|
|
5,
|
|
|
|
|
|
-1,
|
|
|
|
|
|
5,
|
2025-11-27 17:33:28 +08:00
|
|
|
|
6
|
2025-10-25 15:04:47 +08:00
|
|
|
|
],
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"format": "int32",
|
|
|
|
|
|
"x-enum-varnames": [
|
2025-11-27 17:33:28 +08:00
|
|
|
|
"_numLevels",
|
2025-10-25 15:04:47 +08:00
|
|
|
|
"DebugLevel",
|
|
|
|
|
|
"InfoLevel",
|
|
|
|
|
|
"WarnLevel",
|
|
|
|
|
|
"ErrorLevel",
|
|
|
|
|
|
"DPanicLevel",
|
|
|
|
|
|
"PanicLevel",
|
|
|
|
|
|
"FatalLevel",
|
|
|
|
|
|
"_minLevel",
|
|
|
|
|
|
"_maxLevel",
|
2025-11-27 17:33:28 +08:00
|
|
|
|
"InvalidLevel"
|
2025-10-25 15:04:47 +08:00
|
|
|
|
],
|
|
|
|
|
|
"name": "level",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"邮件",
|
|
|
|
|
|
"企业微信",
|
|
|
|
|
|
"飞书",
|
|
|
|
|
|
"日志"
|
|
|
|
|
|
],
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"NotifierTypeSMTP",
|
|
|
|
|
|
"NotifierTypeWeChat",
|
|
|
|
|
|
"NotifierTypeLark",
|
|
|
|
|
|
"NotifierTypeLog"
|
|
|
|
|
|
],
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "notifier_type",
|
2025-10-25 15:04:47 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "order_by",
|
2025-10-25 15:04:47 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"name": "page",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "page_size",
|
2025-10-25 15:04:47 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "start_time",
|
2025-10-25 15:04:47 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"发送成功",
|
|
|
|
|
|
"发送失败",
|
|
|
|
|
|
"已跳过"
|
|
|
|
|
|
],
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"x-enum-comments": {
|
|
|
|
|
|
"NotificationStatusFailed": "通知发送失败",
|
|
|
|
|
|
"NotificationStatusSkipped": "通知因某些原因被跳过(例如:用户未配置联系方式)",
|
|
|
|
|
|
"NotificationStatusSuccess": "通知已成功发送"
|
|
|
|
|
|
},
|
|
|
|
|
|
"x-enum-descriptions": [
|
|
|
|
|
|
"通知已成功发送",
|
|
|
|
|
|
"通知发送失败",
|
|
|
|
|
|
"通知因某些原因被跳过(例如:用户未配置联系方式)"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"NotificationStatusSuccess",
|
|
|
|
|
|
"NotificationStatusFailed",
|
|
|
|
|
|
"NotificationStatusSkipped"
|
|
|
|
|
|
],
|
|
|
|
|
|
"name": "status",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "user_id",
|
2025-10-25 15:04:47 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ListNotificationResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"/api/v1/monitor/pending-collections": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据提供的过滤条件,分页获取待采集请求",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"数据监控"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取待采集请求列表",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "device_id",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "end_time",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "order_by",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"name": "page",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "page_size",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "start_time",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"name": "status",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ListPendingCollectionResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/monitor/pig-batch-logs": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据提供的过滤条件,分页获取猪批次日志",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"数据监控"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取猪批次日志列表",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "change_type",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "end_time",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "operator_id",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "order_by",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"name": "page",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "page_size",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "pig_batch_id",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "start_time",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ListPigBatchLogResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/monitor/pig-purchases": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据提供的过滤条件,分页获取猪只采购记录",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"数据监控"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取猪只采购记录列表",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "end_time",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "operator_id",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "order_by",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"name": "page",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "page_size",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "pig_batch_id",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "start_time",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"name": "supplier",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ListPigPurchaseResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/monitor/pig-sales": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据提供的过滤条件,分页获取猪只售卖记录",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"数据监控"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取猪只售卖记录列表",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"name": "buyer",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "end_time",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "operator_id",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "order_by",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"name": "page",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "page_size",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "pig_batch_id",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "start_time",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ListPigSaleResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/monitor/pig-sick-logs": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据提供的过滤条件,分页获取病猪日志",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"数据监控"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取病猪日志列表",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "end_time",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "operator_id",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "order_by",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"name": "page",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "page_size",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "pen_id",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "pig_batch_id",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"name": "reason",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "start_time",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "treatment_location",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ListPigSickLogResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/monitor/pig-transfer-logs": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据提供的过滤条件,分页获取猪只迁移日志",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"数据监控"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取猪只迁移日志列表",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "correlation_id",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "end_time",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "operator_id",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "order_by",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"name": "page",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "page_size",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "pen_id",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "pig_batch_id",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "start_time",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "transfer_type",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ListPigTransferLogResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/monitor/plan-execution-logs": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据提供的过滤条件,分页获取计划执行日志",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"数据监控"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取计划执行日志列表",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "end_time",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "order_by",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"name": "page",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "page_size",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "plan_id",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "start_time",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"name": "status",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ListPlanExecutionLogResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/monitor/sensor-data": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据提供的过滤条件,分页获取传感器数据",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"数据监控"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取传感器数据列表",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "device_id",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "end_time",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "order_by",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"name": "page",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "page_size",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "sensor_type",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "start_time",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ListSensorDataResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/monitor/task-execution-logs": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据提供的过滤条件,分页获取任务执行日志",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"数据监控"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取任务执行日志列表",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "end_time",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "order_by",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"name": "page",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "page_size",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "plan_execution_log_id",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "start_time",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"name": "status",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "task_id",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ListTaskExecutionLogResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/monitor/user-action-logs": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据提供的过滤条件,分页获取用户操作日志",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"数据监控"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取用户操作日志列表",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "action_type",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "end_time",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "order_by",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"name": "page",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "page_size",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "start_time",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"name": "status",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "user_id",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"name": "username",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ListUserActionLogResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/monitor/weighing-batches": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据提供的过滤条件,分页获取批次称重记录",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"数据监控"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取批次称重记录列表",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "end_time",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "order_by",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"name": "page",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "page_size",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "pig_batch_id",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "start_time",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ListWeighingBatchResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/monitor/weighing-records": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "根据提供的过滤条件,分页获取单次称重记录",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"数据监控"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取单次称重记录列表",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "end_time",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "operator_id",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "order_by",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"name": "page",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "page_size",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "pen_id",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "string",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "start_time",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "weighing_batch_id",
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "OK",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ListWeighingRecordResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"/api/v1/pens": {
|
|
|
|
|
|
"get": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"description": "获取所有猪栏的列表",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"猪场管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取猪栏列表",
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "获取成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PenResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"post": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"description": "创建一个新的猪栏",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"猪场管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "创建猪栏",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "猪栏信息",
|
|
|
|
|
|
"name": "body",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.CreatePenRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"201": {
|
|
|
|
|
|
"description": "创建成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PenResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/pens/{id}": {
|
|
|
|
|
|
"get": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"description": "根据ID获取单个猪栏信息",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"猪场管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取单个猪栏",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪栏ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "获取成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PenResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"put": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"description": "更新一个已存在的猪栏信息",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"猪场管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "更新猪栏",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪栏ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "猪栏信息",
|
|
|
|
|
|
"name": "body",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.UpdatePenRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "更新成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PenResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"delete": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"description": "根据ID删除一个猪栏",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"猪场管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "删除猪栏",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪栏ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "删除成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-04 01:31:35 +08:00
|
|
|
|
"/api/v1/pens/{id}/status": {
|
|
|
|
|
|
"put": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-04 01:31:35 +08:00
|
|
|
|
"description": "更新指定猪栏的当前状态",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"猪场管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "更新猪栏状态",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪栏ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "新的猪栏状态",
|
|
|
|
|
|
"name": "body",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.UpdatePenStatusRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "更新成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PenResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"/api/v1/pig-batches": {
|
|
|
|
|
|
"get": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"description": "获取所有猪批次的列表,支持按活跃状态筛选",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"猪群管理"
|
2025-10-03 23:59:25 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取猪批次列表",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "boolean",
|
|
|
|
|
|
"description": "是否活跃 (true/false)",
|
|
|
|
|
|
"name": "is_active",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "获取成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigBatchResponseDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"post": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"description": "创建一个新的猪批次",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"猪群管理"
|
2025-10-03 23:59:25 +08:00
|
|
|
|
],
|
|
|
|
|
|
"summary": "创建猪批次",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "猪批次信息",
|
|
|
|
|
|
"name": "body",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigBatchCreateDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"201": {
|
|
|
|
|
|
"description": "创建成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigBatchResponseDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"/api/v1/pig-batches/assign-pens/{id}": {
|
|
|
|
|
|
"post": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "将一个或多个空闲猪栏分配给指定的猪批次",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
2025-10-06 23:10:58 +08:00
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"猪群管理"
|
2025-10-06 23:10:58 +08:00
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"summary": "为猪批次分配空栏",
|
2025-10-06 23:10:58 +08:00
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪批次ID",
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"name": "id",
|
2025-10-06 23:10:58 +08:00
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "待分配的猪栏ID列表",
|
|
|
|
|
|
"name": "body",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.AssignEmptyPensToBatchRequest"
|
|
|
|
|
|
}
|
2025-10-06 23:10:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "分配成功",
|
2025-10-06 23:10:58 +08:00
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"/api/v1/pig-batches/buy-pigs/{id}": {
|
2025-10-06 23:10:58 +08:00
|
|
|
|
"post": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "记录猪批次中的猪只购买事件",
|
2025-10-06 23:10:58 +08:00
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"猪群管理"
|
2025-10-06 23:10:58 +08:00
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"summary": "处理买猪的业务逻辑",
|
2025-10-06 23:10:58 +08:00
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "猪批次ID",
|
|
|
|
|
|
"name": "id",
|
2025-10-06 23:10:58 +08:00
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "买猪请求信息",
|
2025-10-06 23:10:58 +08:00
|
|
|
|
"name": "body",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"$ref": "#/definitions/dto.BuyPigsRequest"
|
2025-10-06 23:10:58 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "买猪成功",
|
2025-10-06 23:10:58 +08:00
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"/api/v1/pig-batches/move-pigs-into-pen/{id}": {
|
|
|
|
|
|
"post": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "将指定数量的猪只从批次的“虚拟库存”移入一个已分配的猪栏",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"猪群管理"
|
2025-10-03 23:59:25 +08:00
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"summary": "将猪只从“虚拟库存”移入指定猪栏",
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪批次ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
2025-10-13 12:16:36 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "移入猪只请求信息 (包含目标猪栏ID、数量和备注)",
|
|
|
|
|
|
"name": "body",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.MovePigsIntoPenRequest"
|
|
|
|
|
|
}
|
2025-10-03 23:59:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "移入成功",
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"schema": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
2025-10-03 23:59:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-10-13 12:16:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/pig-batches/reclassify-pen/{fromBatchID}": {
|
|
|
|
|
|
"post": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "将一个猪栏(连同其中的猪只)从一个批次整体划拨到另一个批次",
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"猪群管理"
|
2025-10-03 23:59:25 +08:00
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"summary": "将猪栏划拨到新批次",
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "源猪批次ID",
|
|
|
|
|
|
"name": "fromBatchID",
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "划拨请求信息 (包含目标批次ID、猪栏ID和备注)",
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"name": "body",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"$ref": "#/definitions/dto.ReclassifyPenToNewBatchRequest"
|
2025-10-03 23:59:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "划拨成功",
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"schema": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
2025-10-03 23:59:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-10-13 12:16:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/pig-batches/record-cull/{id}": {
|
|
|
|
|
|
"post": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "记录猪批次中正常猪只淘汰的数量和发生时间",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"猪群管理"
|
2025-10-03 23:59:25 +08:00
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"summary": "记录正常猪只淘汰事件",
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪批次ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
2025-10-13 12:16:36 +08:00
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "记录正常猪只淘汰请求信息",
|
|
|
|
|
|
"name": "body",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.RecordCullRequest"
|
|
|
|
|
|
}
|
2025-10-03 23:59:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "记录成功",
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"/api/v1/pig-batches/record-death/{id}": {
|
2025-10-06 23:10:58 +08:00
|
|
|
|
"post": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "记录猪批次中正常猪只死亡的数量和发生时间",
|
2025-10-04 00:47:27 +08:00
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"猪群管理"
|
2025-10-04 00:47:27 +08:00
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"summary": "记录正常猪只死亡事件",
|
2025-10-04 00:47:27 +08:00
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪批次ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "记录正常猪只死亡请求信息",
|
2025-10-04 00:47:27 +08:00
|
|
|
|
"name": "body",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"$ref": "#/definitions/dto.RecordDeathRequest"
|
2025-10-04 00:47:27 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "记录成功",
|
2025-10-06 23:10:58 +08:00
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"/api/v1/pig-batches/record-sick-pig-cull/{id}": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"post": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "记录猪批次中病猪淘汰的数量、治疗地点和发生时间",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"猪群管理"
|
2025-10-06 23:22:47 +08:00
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"summary": "记录病猪淘汰事件",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪批次ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "记录病猪淘汰请求信息",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"name": "body",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"$ref": "#/definitions/dto.RecordSickPigCullRequest"
|
2025-10-06 23:22:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "记录成功",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"/api/v1/pig-batches/record-sick-pig-death/{id}": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"post": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "记录猪批次中病猪死亡的数量、治疗地点和发生时间",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"猪群管理"
|
|
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"summary": "记录病猪死亡事件",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪批次ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "记录病猪死亡请求信息",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"name": "body",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"$ref": "#/definitions/dto.RecordSickPigDeathRequest"
|
2025-10-06 23:22:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "记录成功",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"/api/v1/pig-batches/record-sick-pig-recovery/{id}": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"post": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "记录猪批次中病猪康复的数量、治疗地点和发生时间",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"猪群管理"
|
2025-10-06 23:22:47 +08:00
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"summary": "记录病猪康复事件",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪批次ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "记录病猪康复请求信息",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"name": "body",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"$ref": "#/definitions/dto.RecordSickPigRecoveryRequest"
|
2025-10-06 23:22:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "记录成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"/api/v1/pig-batches/record-sick-pigs/{id}": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"post": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "记录猪批次中新增病猪的数量、治疗地点和发生时间",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"猪群管理"
|
2025-10-06 23:22:47 +08:00
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"summary": "记录新增病猪事件",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪批次ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "记录病猪请求信息",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"name": "body",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"$ref": "#/definitions/dto.RecordSickPigsRequest"
|
2025-10-06 23:22:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "记录成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"/api/v1/pig-batches/remove-pen/{penID}/{batchID}": {
|
|
|
|
|
|
"delete": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "将一个空闲猪栏从指定的猪批次中移除",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"猪群管理"
|
2025-10-06 23:22:47 +08:00
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"summary": "从猪批次移除空栏",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪批次ID",
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"name": "batchID",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "待移除的猪栏ID",
|
|
|
|
|
|
"name": "penID",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
2025-10-06 23:22:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "移除成功",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"/api/v1/pig-batches/sell-pigs/{id}": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"post": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "记录猪批次中的猪只出售事件",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"猪群管理"
|
2025-10-06 23:22:47 +08:00
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"summary": "处理卖猪的业务逻辑",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪批次ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "卖猪请求信息",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"name": "body",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"$ref": "#/definitions/dto.SellPigsRequest"
|
2025-10-06 23:22:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "卖猪成功",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"/api/v1/pig-batches/transfer-across-batches/{sourceBatchID}": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"post": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "将指定数量的猪只从一个猪群的猪栏调动到另一个猪群的猪栏",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"猪群管理"
|
2025-10-06 23:22:47 +08:00
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"summary": "跨猪群调栏",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "源猪批次ID",
|
|
|
|
|
|
"name": "sourceBatchID",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "跨群调栏请求信息",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"name": "body",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"$ref": "#/definitions/dto.TransferPigsAcrossBatchesRequest"
|
2025-10-06 23:22:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "调栏成功",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"/api/v1/pig-batches/transfer-within-batch/{id}": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"post": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "将指定数量的猪只在同一个猪群的不同猪栏间调动",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"猪群管理"
|
2025-10-06 23:22:47 +08:00
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"summary": "群内调栏",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪批次ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "群内调栏请求信息",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"name": "body",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"$ref": "#/definitions/dto.TransferPigsWithinBatchRequest"
|
2025-10-06 23:22:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "调栏成功",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"/api/v1/pig-batches/{id}": {
|
|
|
|
|
|
"get": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "根据ID获取单个猪批次信息",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"猪群管理"
|
2025-10-06 23:22:47 +08:00
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"summary": "获取单个猪批次",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪批次ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "获取成功",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"schema": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigBatchResponseDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
2025-10-06 23:22:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-10-13 12:16:36 +08:00
|
|
|
|
},
|
|
|
|
|
|
"put": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "更新一个已存在的猪批次信息",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"猪群管理"
|
2025-10-06 23:22:47 +08:00
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"summary": "更新猪批次",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪批次ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "猪批次信息",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"name": "body",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"$ref": "#/definitions/dto.PigBatchUpdateDTO"
|
2025-10-06 23:22:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "更新成功",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"schema": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigBatchResponseDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
2025-10-06 23:22:47 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-10-13 12:16:36 +08:00
|
|
|
|
},
|
|
|
|
|
|
"delete": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "根据ID删除一个猪批次",
|
2025-10-06 23:10:58 +08:00
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"猪群管理"
|
2025-10-06 23:10:58 +08:00
|
|
|
|
],
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"summary": "删除猪批次",
|
2025-10-06 23:10:58 +08:00
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "猪批次ID",
|
|
|
|
|
|
"name": "id",
|
2025-10-06 23:10:58 +08:00
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
2025-10-13 12:16:36 +08:00
|
|
|
|
"description": "删除成功",
|
2025-10-04 00:47:27 +08:00
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"/api/v1/pig-houses": {
|
|
|
|
|
|
"get": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"description": "获取所有猪舍的列表",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"猪场管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取猪舍列表",
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "获取成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigHouseResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"post": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-31 16:01:49 +08:00
|
|
|
|
"description": "根据提供的信息创建一个新猪舍",
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"猪场管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "创建猪舍",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "猪舍信息",
|
|
|
|
|
|
"name": "body",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.CreatePigHouseRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"201": {
|
|
|
|
|
|
"description": "创建成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigHouseResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/pig-houses/{id}": {
|
|
|
|
|
|
"get": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"description": "根据ID获取单个猪舍信息",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"猪场管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取单个猪舍",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪舍ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "获取成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigHouseResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"put": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"description": "更新一个已存在的猪舍信息",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"猪场管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "更新猪舍",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪舍ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "猪舍信息",
|
|
|
|
|
|
"name": "body",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.UpdatePigHouseRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "更新成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigHouseResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"delete": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"description": "根据ID删除一个猪舍",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"猪场管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "删除猪舍",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "猪舍ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "删除成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/plans": {
|
|
|
|
|
|
"get": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-29 17:52:07 +08:00
|
|
|
|
"description": "获取所有计划的列表,支持按类型过滤和分页",
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"计划管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取计划列表",
|
2025-10-29 17:52:07 +08:00
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "页码",
|
|
|
|
|
|
"name": "page",
|
|
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "每页大小",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "page_size",
|
2025-10-29 17:52:07 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
2025-10-29 18:56:05 +08:00
|
|
|
|
"enum": [
|
|
|
|
|
|
"所有任务",
|
|
|
|
|
|
"自定义任务",
|
|
|
|
|
|
"系统任务"
|
|
|
|
|
|
],
|
2025-10-29 17:52:07 +08:00
|
|
|
|
"type": "string",
|
2025-10-29 18:56:05 +08:00
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"PlanTypeFilterAll",
|
|
|
|
|
|
"PlanTypeFilterCustom",
|
|
|
|
|
|
"PlanTypeFilterSystem"
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "计划类型",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"name": "plan_type",
|
2025-10-29 17:52:07 +08:00
|
|
|
|
"in": "query"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表成功获取列表",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
2025-10-29 17:52:07 +08:00
|
|
|
|
"$ref": "#/definitions/dto.ListPlansResponse"
|
2025-10-03 23:59:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"post": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"description": "创建一个新的计划,包括其基本信息和所有关联的子计划/任务。",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"计划管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "创建计划",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "计划信息",
|
|
|
|
|
|
"name": "plan",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.CreatePlanRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为201代表创建成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PlanResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/plans/{id}": {
|
|
|
|
|
|
"get": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"description": "根据计划ID获取单个计划的详细信息。",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"计划管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "获取计划详情",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "计划ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表成功获取",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PlanResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"put": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-29 17:52:07 +08:00
|
|
|
|
"description": "根据计划ID更新计划的详细信息。系统计划不允许修改。",
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"计划管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "更新计划",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "计划ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "更新后的计划信息",
|
|
|
|
|
|
"name": "plan",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.UpdatePlanRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表更新成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PlanResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"delete": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-29 17:52:07 +08:00
|
|
|
|
"description": "根据计划ID删除计划。(软删除)系统计划不允许删除。",
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"计划管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "删除计划",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "计划ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表删除成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/plans/{id}/start": {
|
|
|
|
|
|
"post": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-29 17:52:07 +08:00
|
|
|
|
"description": "根据计划ID启动一个计划的执行。系统计划不允许手动启动。",
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"计划管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "启动计划",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "计划ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表成功启动计划",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/plans/{id}/stop": {
|
|
|
|
|
|
"post": {
|
2025-10-13 14:15:38 +08:00
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
2025-10-29 17:52:07 +08:00
|
|
|
|
"description": "根据计划ID停止一个正在执行的计划。系统计划不能被停止。",
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"计划管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "停止计划",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "计划ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表成功停止计划",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/users": {
|
|
|
|
|
|
"post": {
|
|
|
|
|
|
"description": "根据用户名和密码创建一个新的系统用户。",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"用户管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "创建新用户",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "用户信息",
|
|
|
|
|
|
"name": "user",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.CreateUserRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为201代表创建成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.CreateUserResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/api/v1/users/login": {
|
|
|
|
|
|
"post": {
|
|
|
|
|
|
"description": "用户可以使用用户名、邮箱、手机号、微信号或飞书账号进行登录,成功后返回 JWT 令牌。",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"用户管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "用户登录",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "登录凭证",
|
|
|
|
|
|
"name": "credentials",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.LoginRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "业务码为200代表登录成功",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.LoginResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-24 21:24:48 +08:00
|
|
|
|
"/api/v1/users/{id}/notifications/test": {
|
|
|
|
|
|
"post": {
|
|
|
|
|
|
"security": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"BearerAuth": []
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"description": "为指定用户发送一条特定渠道的测试消息,以验证其配置是否正确。",
|
|
|
|
|
|
"consumes": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"用户管理"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "发送测试通知",
|
|
|
|
|
|
"parameters": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"description": "用户ID",
|
|
|
|
|
|
"name": "id",
|
|
|
|
|
|
"in": "path",
|
|
|
|
|
|
"required": true
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"description": "请求体",
|
|
|
|
|
|
"name": "body",
|
|
|
|
|
|
"in": "body",
|
|
|
|
|
|
"required": true,
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.SendTestNotificationRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "成功响应",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
},
|
|
|
|
|
|
{
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"data": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-11-06 16:41:06 +08:00
|
|
|
|
},
|
|
|
|
|
|
"/healthz": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"description": "检查服务进程是否运行正常,只要服务能响应就返回 200 OK。",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"健康检查"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "服务存活检查",
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "服务存活",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"/readyz": {
|
|
|
|
|
|
"get": {
|
|
|
|
|
|
"description": "检查服务是否已准备好接收流量。当前实现为只要服务能响应即代表就绪。",
|
|
|
|
|
|
"produces": [
|
|
|
|
|
|
"application/json"
|
|
|
|
|
|
],
|
|
|
|
|
|
"tags": [
|
|
|
|
|
|
"健康检查"
|
|
|
|
|
|
],
|
|
|
|
|
|
"summary": "服务就绪检查",
|
|
|
|
|
|
"responses": {
|
|
|
|
|
|
"200": {
|
|
|
|
|
|
"description": "服务已就绪",
|
|
|
|
|
|
"schema": {
|
|
|
|
|
|
"$ref": "#/definitions/controller.Response"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-10-03 23:59:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"definitions": {
|
|
|
|
|
|
"controller.Response": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"code": {
|
|
|
|
|
|
"description": "业务状态码",
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/controller.ResponseCode"
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
"data": {
|
2025-10-31 16:01:49 +08:00
|
|
|
|
"description": "业务数据, omitempty表示如果为空则不序列化"
|
2025-10-03 23:59:25 +08:00
|
|
|
|
},
|
|
|
|
|
|
"message": {
|
|
|
|
|
|
"description": "提示信息",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"controller.ResponseCode": {
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
2000,
|
|
|
|
|
|
2001,
|
|
|
|
|
|
4000,
|
|
|
|
|
|
4001,
|
2025-10-29 17:52:07 +08:00
|
|
|
|
4003,
|
2025-10-03 23:59:25 +08:00
|
|
|
|
4004,
|
|
|
|
|
|
4009,
|
|
|
|
|
|
5000,
|
|
|
|
|
|
5003
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-comments": {
|
|
|
|
|
|
"CodeBadRequest": "请求参数错误",
|
|
|
|
|
|
"CodeConflict": "资源冲突",
|
|
|
|
|
|
"CodeCreated": "创建成功",
|
2025-10-29 17:52:07 +08:00
|
|
|
|
"CodeForbidden": "禁止访问",
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"CodeInternalError": "服务器内部错误",
|
|
|
|
|
|
"CodeNotFound": "资源未找到",
|
|
|
|
|
|
"CodeServiceUnavailable": "服务不可用",
|
|
|
|
|
|
"CodeSuccess": "操作成功",
|
|
|
|
|
|
"CodeUnauthorized": "未授权"
|
|
|
|
|
|
},
|
|
|
|
|
|
"x-enum-descriptions": [
|
|
|
|
|
|
"操作成功",
|
|
|
|
|
|
"创建成功",
|
|
|
|
|
|
"请求参数错误",
|
|
|
|
|
|
"未授权",
|
2025-10-29 17:52:07 +08:00
|
|
|
|
"禁止访问",
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"资源未找到",
|
|
|
|
|
|
"资源冲突",
|
|
|
|
|
|
"服务器内部错误",
|
|
|
|
|
|
"服务不可用"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"CodeSuccess",
|
|
|
|
|
|
"CodeCreated",
|
|
|
|
|
|
"CodeBadRequest",
|
|
|
|
|
|
"CodeUnauthorized",
|
2025-10-29 17:52:07 +08:00
|
|
|
|
"CodeForbidden",
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"CodeNotFound",
|
|
|
|
|
|
"CodeConflict",
|
|
|
|
|
|
"CodeInternalError",
|
|
|
|
|
|
"CodeServiceUnavailable"
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
2025-11-10 13:41:26 +08:00
|
|
|
|
"dto.ActiveAlarmDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"alarm_code": {
|
|
|
|
|
|
"$ref": "#/definitions/models.AlarmCode"
|
|
|
|
|
|
},
|
|
|
|
|
|
"alarm_details": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"alarm_summary": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"created_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"ignored_until": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"is_ignored": {
|
|
|
|
|
|
"type": "boolean"
|
|
|
|
|
|
},
|
|
|
|
|
|
"last_notified_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"level": {
|
|
|
|
|
|
"$ref": "#/definitions/models.SeverityLevel"
|
|
|
|
|
|
},
|
|
|
|
|
|
"source_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"source_type": {
|
|
|
|
|
|
"$ref": "#/definitions/models.AlarmSourceType"
|
|
|
|
|
|
},
|
|
|
|
|
|
"trigger_time": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"updated_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"dto.AreaControllerResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"created_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"location": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"network_id": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"additionalProperties": true
|
|
|
|
|
|
},
|
|
|
|
|
|
"status": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"updated_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-10 19:18:49 +08:00
|
|
|
|
"dto.AreaThresholdAlarmDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"area_controller_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"level": {
|
|
|
|
|
|
"$ref": "#/definitions/models.SeverityLevel"
|
|
|
|
|
|
},
|
|
|
|
|
|
"operator": {
|
|
|
|
|
|
"$ref": "#/definitions/models.Operator"
|
|
|
|
|
|
},
|
|
|
|
|
|
"sensor_type": {
|
|
|
|
|
|
"$ref": "#/definitions/models.SensorType"
|
|
|
|
|
|
},
|
|
|
|
|
|
"thresholds": {
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-06 23:10:58 +08:00
|
|
|
|
"dto.AssignEmptyPensToBatchRequest": {
|
2025-10-31 17:59:48 +08:00
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"pen_ids"
|
2025-10-31 17:59:48 +08:00
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"pen_ids": {
|
2025-10-31 17:59:48 +08:00
|
|
|
|
"description": "待分配的猪栏ID列表",
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"minItems": 1,
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"example": [
|
|
|
|
|
|
1,
|
|
|
|
|
|
2,
|
|
|
|
|
|
3
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-10-06 23:10:58 +08:00
|
|
|
|
},
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"dto.BuyPigsRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"pen_id",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"quantity",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"total_price",
|
|
|
|
|
|
"trade_date",
|
|
|
|
|
|
"trader_name",
|
|
|
|
|
|
"unit_price"
|
2025-10-06 23:22:47 +08:00
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"pen_id": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "猪栏ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"quantity": {
|
|
|
|
|
|
"description": "买入猪只数量",
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"minimum": 1
|
|
|
|
|
|
},
|
|
|
|
|
|
"remarks": {
|
|
|
|
|
|
"description": "备注",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"total_price": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "总价",
|
|
|
|
|
|
"type": "number",
|
|
|
|
|
|
"minimum": 0
|
|
|
|
|
|
},
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"trade_date": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "交易日期",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"trader_name": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "交易方名称",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"unit_price": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "单价",
|
|
|
|
|
|
"type": "number",
|
|
|
|
|
|
"minimum": 0
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"dto.CreateAreaControllerRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"name",
|
|
|
|
|
|
"network_id"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"location": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"network_id": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"additionalProperties": true
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-10 19:18:49 +08:00
|
|
|
|
"dto.CreateAreaThresholdAlarmDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"area_controller_id",
|
|
|
|
|
|
"operator",
|
|
|
|
|
|
"sensor_type",
|
|
|
|
|
|
"thresholds"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"area_controller_id": {
|
|
|
|
|
|
"description": "区域主控ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"level": {
|
|
|
|
|
|
"description": "告警等级,可选",
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.SeverityLevel"
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
"operator": {
|
|
|
|
|
|
"description": "操作符",
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.Operator"
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
"sensor_type": {
|
|
|
|
|
|
"description": "传感器类型",
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.SensorType"
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
"thresholds": {
|
|
|
|
|
|
"description": "阈值",
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"dto.CreateDeviceRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"area_controller_id",
|
|
|
|
|
|
"device_template_id",
|
|
|
|
|
|
"name"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"area_controller_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"device_template_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"location": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"additionalProperties": true
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.CreateDeviceTemplateRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"category",
|
|
|
|
|
|
"commands",
|
|
|
|
|
|
"name"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"category": {
|
|
|
|
|
|
"$ref": "#/definitions/models.DeviceCategory"
|
|
|
|
|
|
},
|
|
|
|
|
|
"commands": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"additionalProperties": true
|
|
|
|
|
|
},
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"manufacturer": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"values": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/models.ValueDescriptor"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-10 19:18:49 +08:00
|
|
|
|
"dto.CreateDeviceThresholdAlarmDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"device_id",
|
|
|
|
|
|
"operator",
|
|
|
|
|
|
"sensor_type",
|
|
|
|
|
|
"thresholds"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"device_id": {
|
|
|
|
|
|
"description": "设备ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"level": {
|
|
|
|
|
|
"description": "告警等级,可选,如果未提供则使用默认值",
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.SeverityLevel"
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
"operator": {
|
|
|
|
|
|
"description": "操作符 (使用string类型,与前端交互更通用)",
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.Operator"
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
"sensor_type": {
|
|
|
|
|
|
"description": "传感器类型",
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.SensorType"
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
"thresholds": {
|
|
|
|
|
|
"description": "阈值",
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"dto.CreateNutrientRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"name"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"description": "描述",
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"maxLength": 255
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"description": "营养素名称",
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"maxLength": 100
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"dto.CreatePenRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"capacity",
|
|
|
|
|
|
"house_id",
|
2025-10-04 01:31:35 +08:00
|
|
|
|
"pen_number"
|
2025-10-03 23:59:25 +08:00
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"capacity": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"house_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"pen_number": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"dto.CreatePigAgeStageRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"name"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"description": "阶段描述",
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"maxLength": 255
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"description": "年龄阶段名称",
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"maxLength": 50
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.CreatePigBreedRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"name"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"appearance_features": {
|
|
|
|
|
|
"description": "外貌特征",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"breed_advantages": {
|
|
|
|
|
|
"description": "品种优点",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"breed_disadvantages": {
|
|
|
|
|
|
"description": "品种缺点",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"description": "其他描述",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"description": "品种名称",
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"maxLength": 50
|
|
|
|
|
|
},
|
|
|
|
|
|
"parent_info": {
|
|
|
|
|
|
"description": "父母信息",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"dto.CreatePigHouseRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"name"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"dto.CreatePigTypeRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"age_stage_id",
|
|
|
|
|
|
"breed_id"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"age_stage_id": {
|
|
|
|
|
|
"description": "关联的猪年龄阶段ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"breed_id": {
|
|
|
|
|
|
"description": "关联的猪品种ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"daily_feed_intake": {
|
|
|
|
|
|
"description": "理论日均食量 (g/天)",
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
},
|
|
|
|
|
|
"daily_gain_weight": {
|
|
|
|
|
|
"description": "理论日增重 (g/天)",
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
},
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"description": "该猪类型的描述或特点",
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"maxLength": 255
|
|
|
|
|
|
},
|
|
|
|
|
|
"max_days": {
|
|
|
|
|
|
"description": "该猪类型在该年龄阶段的最大日龄",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"max_weight": {
|
|
|
|
|
|
"description": "该猪类型在该年龄阶段的最大体重 (g)",
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
},
|
|
|
|
|
|
"min_days": {
|
|
|
|
|
|
"description": "该猪类型在该年龄阶段的最小日龄",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"min_weight": {
|
|
|
|
|
|
"description": "该猪类型在该年龄阶段的最小体重 (g)",
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"dto.CreatePlanRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"execution_type",
|
|
|
|
|
|
"name"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"cron_expression": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"example": "0 0 6 * * *"
|
|
|
|
|
|
},
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"example": "根据温度自动调节风扇和加热器"
|
|
|
|
|
|
},
|
|
|
|
|
|
"execute_num": {
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 16:01:49 +08:00
|
|
|
|
"minimum": 0,
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"example": 10
|
|
|
|
|
|
},
|
|
|
|
|
|
"execution_type": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.PlanExecutionType"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"example": "自动"
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"example": "猪舍温度控制计划"
|
|
|
|
|
|
},
|
|
|
|
|
|
"sub_plan_ids": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"tasks": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.TaskRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"dto.CreateRawMaterialRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"name"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"description": "描述",
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"maxLength": 255
|
|
|
|
|
|
},
|
2025-11-27 17:33:28 +08:00
|
|
|
|
"max_addition_ratio": {
|
|
|
|
|
|
"description": "最大添加比例",
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
},
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"name": {
|
|
|
|
|
|
"description": "原料名称",
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"maxLength": 100
|
2025-11-25 20:22:38 +08:00
|
|
|
|
},
|
|
|
|
|
|
"reference_price": {
|
|
|
|
|
|
"description": "参考价格(kg/元)",
|
|
|
|
|
|
"type": "number"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-24 13:25:15 +08:00
|
|
|
|
"dto.CreateRecipeRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"name"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"description": "配方描述",
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"maxLength": 255
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"description": "配方名称",
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"maxLength": 100
|
|
|
|
|
|
},
|
|
|
|
|
|
"recipe_ingredients": {
|
|
|
|
|
|
"description": "配方原料组成",
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.RecipeIngredientDto"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"dto.CreateUserRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"password",
|
|
|
|
|
|
"username"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"password": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"example": "password123"
|
|
|
|
|
|
},
|
|
|
|
|
|
"username": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"example": "newuser"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.CreateUserResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"example": 1
|
|
|
|
|
|
},
|
|
|
|
|
|
"username": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"example": "newuser"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-25 18:10:28 +08:00
|
|
|
|
"dto.CurrentStockResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"last_updated": {
|
|
|
|
|
|
"description": "最后更新时间",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"raw_material_id": {
|
|
|
|
|
|
"description": "原料ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"raw_material_name": {
|
|
|
|
|
|
"description": "原料名称",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"stock": {
|
|
|
|
|
|
"description": "当前库存量, 单位: g",
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-10 19:18:49 +08:00
|
|
|
|
"dto.DeleteDeviceThresholdAlarmDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"sensor_type"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"sensor_type": {
|
|
|
|
|
|
"description": "传感器类型",
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.SensorType"
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"dto.DeviceCommandLogDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"acknowledged_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"device_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"message_id": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"received_success": {
|
|
|
|
|
|
"type": "boolean"
|
|
|
|
|
|
},
|
|
|
|
|
|
"sent_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"dto.DeviceResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"area_controller_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"area_controller_name": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"created_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"device_template_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"device_template_name": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"location": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"additionalProperties": true
|
|
|
|
|
|
},
|
|
|
|
|
|
"updated_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.DeviceTemplateResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"category": {
|
|
|
|
|
|
"$ref": "#/definitions/models.DeviceCategory"
|
|
|
|
|
|
},
|
|
|
|
|
|
"commands": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"additionalProperties": true
|
|
|
|
|
|
},
|
|
|
|
|
|
"created_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"manufacturer": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"updated_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"values": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/models.ValueDescriptor"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-10 19:18:49 +08:00
|
|
|
|
"dto.DeviceThresholdAlarmDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"device_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"level": {
|
|
|
|
|
|
"$ref": "#/definitions/models.SeverityLevel"
|
|
|
|
|
|
},
|
|
|
|
|
|
"operator": {
|
|
|
|
|
|
"$ref": "#/definitions/models.Operator"
|
|
|
|
|
|
},
|
|
|
|
|
|
"sensor_type": {
|
|
|
|
|
|
"$ref": "#/definitions/models.SensorType"
|
|
|
|
|
|
},
|
|
|
|
|
|
"thresholds": {
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-26 20:44:41 +08:00
|
|
|
|
"dto.GenerateRecipeResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"description": "新生成的配方描述",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"description": "新生成的配方ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"description": "新生成的配方名称",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-10 13:41:26 +08:00
|
|
|
|
"dto.HistoricalAlarmDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"alarm_code": {
|
|
|
|
|
|
"$ref": "#/definitions/models.AlarmCode"
|
|
|
|
|
|
},
|
|
|
|
|
|
"alarm_summary": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
2025-11-16 16:30:26 +08:00
|
|
|
|
"json_details": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
2025-11-10 13:41:26 +08:00
|
|
|
|
"level": {
|
|
|
|
|
|
"$ref": "#/definitions/models.SeverityLevel"
|
|
|
|
|
|
},
|
|
|
|
|
|
"resolve_method": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"resolve_time": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"resolved_by": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"source_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"source_type": {
|
|
|
|
|
|
"$ref": "#/definitions/models.AlarmSourceType"
|
|
|
|
|
|
},
|
|
|
|
|
|
"trigger_time": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.ListActiveAlarmResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"list": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.ActiveAlarmDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"pagination": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PaginationDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-16 16:30:26 +08:00
|
|
|
|
"dto.ListAreaThresholdAlarmResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"list": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.AreaThresholdAlarmDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"pagination": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PaginationDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-25 18:10:28 +08:00
|
|
|
|
"dto.ListCurrentStockResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"list": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.CurrentStockResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"pagination": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PaginationDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"dto.ListDeviceCommandLogResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"list": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.DeviceCommandLogDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"pagination": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PaginationDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-16 16:30:26 +08:00
|
|
|
|
"dto.ListDeviceThresholdAlarmResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"list": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.DeviceThresholdAlarmDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"pagination": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PaginationDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-10 13:41:26 +08:00
|
|
|
|
"dto.ListHistoricalAlarmResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"list": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.HistoricalAlarmDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"pagination": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PaginationDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"dto.ListMedicationLogResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"list": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.MedicationLogDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"pagination": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PaginationDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-25 15:04:47 +08:00
|
|
|
|
"dto.ListNotificationResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"list": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.NotificationDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"pagination": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PaginationDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"dto.ListNutrientResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"list": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.NutrientResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"pagination": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PaginationDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"dto.ListPendingCollectionResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"list": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PendingCollectionDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"pagination": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PaginationDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"dto.ListPigAgeStageResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"list": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigAgeStageResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"pagination": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PaginationDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"dto.ListPigBatchLogResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"list": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigBatchLogDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"pagination": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PaginationDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"dto.ListPigBreedResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"list": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigBreedResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"pagination": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PaginationDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"dto.ListPigPurchaseResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"list": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigPurchaseDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"pagination": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PaginationDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.ListPigSaleResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"list": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigSaleDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"pagination": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PaginationDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.ListPigSickLogResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"list": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigSickLogDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"pagination": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PaginationDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.ListPigTransferLogResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"list": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigTransferLogDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"pagination": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PaginationDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"dto.ListPigTypeResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"list": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigTypeResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"pagination": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PaginationDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"dto.ListPlanExecutionLogResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"list": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PlanExecutionLogDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"pagination": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PaginationDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-29 17:52:07 +08:00
|
|
|
|
"dto.ListPlansResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"plans": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PlanResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"total": {
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"example": 100
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"dto.ListRawMaterialResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"list": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.RawMaterialResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"pagination": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PaginationDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-24 13:25:15 +08:00
|
|
|
|
"dto.ListRecipeResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"list": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.RecipeResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"pagination": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PaginationDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"dto.ListSensorDataResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"list": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.SensorDataDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"pagination": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PaginationDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-25 18:10:28 +08:00
|
|
|
|
"dto.ListStockLogResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"list": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.StockLogResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"pagination": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PaginationDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"dto.ListTaskExecutionLogResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"list": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.TaskExecutionLogDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"pagination": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PaginationDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.ListUserActionLogResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"list": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.UserActionLogDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"pagination": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PaginationDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.ListWeighingBatchResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"list": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.WeighingBatchDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"pagination": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PaginationDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.ListWeighingRecordResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"list": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.WeighingRecordDTO"
|
2025-10-03 23:59:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"pagination": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PaginationDTO"
|
2025-10-03 23:59:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.LoginRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"identifier",
|
|
|
|
|
|
"password"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"identifier": {
|
|
|
|
|
|
"description": "Identifier 可以是用户名、邮箱、手机号、微信号或飞书账号",
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"example": "testuser"
|
|
|
|
|
|
},
|
|
|
|
|
|
"password": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"example": "password123"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.LoginResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"example": 1
|
|
|
|
|
|
},
|
|
|
|
|
|
"token": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
|
|
|
|
|
|
},
|
|
|
|
|
|
"username": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"example": "testuser"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-10-13 12:16:36 +08:00
|
|
|
|
},
|
|
|
|
|
|
"dto.ManualControlDeviceRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"action": {
|
|
|
|
|
|
"description": "Action 不传表示这是一个传感器, 会触发一次采集",
|
2025-10-13 14:37:57 +08:00
|
|
|
|
"type": "string"
|
2025-10-13 12:16:36 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-10-03 23:59:25 +08:00
|
|
|
|
},
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"dto.MedicationDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.MedicationLogDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"dosage_used": {
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
},
|
|
|
|
|
|
"happened_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"medication": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.MedicationDTO"
|
|
|
|
|
|
},
|
|
|
|
|
|
"medication_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"operator_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"pig_batch_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"reason": {
|
|
|
|
|
|
"$ref": "#/definitions/models.MedicationReasonType"
|
|
|
|
|
|
},
|
|
|
|
|
|
"target_count": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-06 23:10:58 +08:00
|
|
|
|
"dto.MovePigsIntoPenRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"quantity",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"to_pen_id"
|
2025-10-06 23:10:58 +08:00
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"quantity": {
|
|
|
|
|
|
"description": "移入猪只数量",
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"minimum": 1
|
|
|
|
|
|
},
|
|
|
|
|
|
"remarks": {
|
|
|
|
|
|
"description": "备注",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"to_pen_id": {
|
2025-10-06 23:10:58 +08:00
|
|
|
|
"description": "目标猪栏ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-25 15:04:47 +08:00
|
|
|
|
"dto.NotificationDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"alarm_timestamp": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"created_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"error_message": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"level": {
|
2025-11-10 13:41:26 +08:00
|
|
|
|
"$ref": "#/definitions/models.SeverityLevel"
|
2025-10-25 15:04:47 +08:00
|
|
|
|
},
|
|
|
|
|
|
"message": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"notifier_type": {
|
2025-11-10 13:41:26 +08:00
|
|
|
|
"$ref": "#/definitions/models.NotifierType"
|
2025-10-25 15:04:47 +08:00
|
|
|
|
},
|
|
|
|
|
|
"status": {
|
|
|
|
|
|
"$ref": "#/definitions/models.NotificationStatus"
|
|
|
|
|
|
},
|
|
|
|
|
|
"title": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"to_address": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"updated_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"user_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-21 16:37:09 +08:00
|
|
|
|
"dto.NutrientRawMaterialDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"description": "原料ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"description": "原料名称",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"value": {
|
|
|
|
|
|
"description": "该原料中此营养素的含量",
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"dto.NutrientResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
2025-11-21 16:37:09 +08:00
|
|
|
|
"raw_materials": {
|
|
|
|
|
|
"description": "包含此营养的原料列表",
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.NutrientRawMaterialDTO"
|
|
|
|
|
|
}
|
2025-11-21 16:02:06 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"dto.PaginationDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"page": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
2025-10-31 17:59:48 +08:00
|
|
|
|
"page_size": {
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"total": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"dto.PenResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"capacity": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
2025-10-23 10:52:40 +08:00
|
|
|
|
"current_pig_count": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"house_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"pen_number": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"pig_batch_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"status": {
|
|
|
|
|
|
"$ref": "#/definitions/models.PenStatus"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"dto.PendingCollectionDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"command_metadata": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"correlation_id": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"created_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"device_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"fulfilled_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"status": {
|
|
|
|
|
|
"$ref": "#/definitions/models.PendingCollectionStatus"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"dto.PigAgeStageResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"dto.PigBatchCreateDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"batch_number",
|
|
|
|
|
|
"initial_count",
|
|
|
|
|
|
"origin_type",
|
|
|
|
|
|
"start_date",
|
|
|
|
|
|
"status"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"batch_number": {
|
|
|
|
|
|
"description": "批次编号,必填",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"initial_count": {
|
|
|
|
|
|
"description": "初始数量,必填,最小为1",
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"minimum": 1
|
|
|
|
|
|
},
|
|
|
|
|
|
"origin_type": {
|
|
|
|
|
|
"description": "批次来源,必填",
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.PigBatchOriginType"
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
"start_date": {
|
|
|
|
|
|
"description": "批次开始日期,必填",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"status": {
|
|
|
|
|
|
"description": "批次状态,必填",
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.PigBatchStatus"
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"dto.PigBatchLogDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"after_count": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"before_count": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"change_count": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"change_type": {
|
|
|
|
|
|
"$ref": "#/definitions/models.LogChangeType"
|
|
|
|
|
|
},
|
|
|
|
|
|
"created_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"happened_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"operator_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"pig_batch_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"reason": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"updated_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"dto.PigBatchResponseDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"batch_number": {
|
|
|
|
|
|
"description": "批次编号",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"create_time": {
|
|
|
|
|
|
"description": "创建时间",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"current_total_pigs_in_pens": {
|
2025-10-23 11:29:48 +08:00
|
|
|
|
"description": "当前存栏总数",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"current_total_quantity": {
|
2025-10-23 11:29:48 +08:00
|
|
|
|
"description": "当前总数",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"end_date": {
|
|
|
|
|
|
"description": "批次结束日期",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"description": "批次ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"initial_count": {
|
|
|
|
|
|
"description": "初始数量",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"is_active": {
|
|
|
|
|
|
"description": "是否活跃",
|
|
|
|
|
|
"type": "boolean"
|
|
|
|
|
|
},
|
|
|
|
|
|
"origin_type": {
|
|
|
|
|
|
"description": "批次来源",
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.PigBatchOriginType"
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
"start_date": {
|
|
|
|
|
|
"description": "批次开始日期",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"status": {
|
|
|
|
|
|
"description": "批次状态",
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.PigBatchStatus"
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
"update_time": {
|
|
|
|
|
|
"description": "更新时间",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.PigBatchUpdateDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"batch_number": {
|
|
|
|
|
|
"description": "批次编号,可选",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"end_date": {
|
|
|
|
|
|
"description": "批次结束日期,可选",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"initial_count": {
|
|
|
|
|
|
"description": "初始数量,可选",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"origin_type": {
|
|
|
|
|
|
"description": "批次来源,可选",
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.PigBatchOriginType"
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
"start_date": {
|
|
|
|
|
|
"description": "批次开始日期,可选",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"status": {
|
|
|
|
|
|
"description": "批次状态,可选",
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.PigBatchStatus"
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"dto.PigBreedResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"appearance_features": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"breed_advantages": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"breed_disadvantages": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"parent_info": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"dto.PigHouseResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"dto.PigNutrientRequirementDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"max_requirement": {
|
|
|
|
|
|
"description": "最高营养需求量",
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
},
|
|
|
|
|
|
"min_requirement": {
|
|
|
|
|
|
"description": "最低营养需求量",
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
},
|
|
|
|
|
|
"nutrient_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"nutrient_name": {
|
|
|
|
|
|
"description": "营养素名称",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-22 17:55:52 +08:00
|
|
|
|
"dto.PigNutrientRequirementItem": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"nutrient_id"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"max_requirement": {
|
|
|
|
|
|
"description": "最高营养需求量",
|
|
|
|
|
|
"type": "number",
|
|
|
|
|
|
"minimum": 0
|
|
|
|
|
|
},
|
|
|
|
|
|
"min_requirement": {
|
|
|
|
|
|
"description": "最低营养需求量",
|
|
|
|
|
|
"type": "number",
|
|
|
|
|
|
"minimum": 0
|
|
|
|
|
|
},
|
|
|
|
|
|
"nutrient_id": {
|
|
|
|
|
|
"description": "营养素ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"dto.PigPurchaseDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"created_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"operator_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"pig_batch_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"purchase_date": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"quantity": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"remarks": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"supplier": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"total_price": {
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
},
|
|
|
|
|
|
"unit_price": {
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
},
|
|
|
|
|
|
"updated_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.PigSaleDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"buyer": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"created_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"operator_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"pig_batch_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"quantity": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"remarks": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"sale_date": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"total_price": {
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
},
|
|
|
|
|
|
"unit_price": {
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
},
|
|
|
|
|
|
"updated_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.PigSickLogDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"after_count": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"before_count": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"change_count": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"created_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"happened_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"operator_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"pen_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"pig_batch_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"reason": {
|
|
|
|
|
|
"$ref": "#/definitions/models.PigBatchSickPigReasonType"
|
|
|
|
|
|
},
|
|
|
|
|
|
"remarks": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"treatment_location": {
|
|
|
|
|
|
"$ref": "#/definitions/models.PigBatchSickPigTreatmentLocation"
|
|
|
|
|
|
},
|
|
|
|
|
|
"updated_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.PigTransferLogDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"correlation_id": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"created_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"operator_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"pen_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"pig_batch_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"quantity": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"remarks": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"transfer_time": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"type": {
|
|
|
|
|
|
"$ref": "#/definitions/models.PigTransferType"
|
|
|
|
|
|
},
|
|
|
|
|
|
"updated_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"dto.PigTypeResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"age_stage_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"age_stage_name": {
|
|
|
|
|
|
"description": "猪年龄阶段名称",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"breed_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"breed_name": {
|
|
|
|
|
|
"description": "猪品种名称",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"daily_feed_intake": {
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
},
|
|
|
|
|
|
"daily_gain_weight": {
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
},
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"max_days": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"max_weight": {
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
},
|
|
|
|
|
|
"min_days": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"min_weight": {
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
},
|
|
|
|
|
|
"pig_nutrient_requirements": {
|
|
|
|
|
|
"description": "关联的营养需求",
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigNutrientRequirementDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"dto.PlanExecutionLogDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"created_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"ended_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"error": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"plan_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
2025-10-29 17:52:07 +08:00
|
|
|
|
"plan_name": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"started_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"status": {
|
|
|
|
|
|
"$ref": "#/definitions/models.ExecutionStatus"
|
|
|
|
|
|
},
|
|
|
|
|
|
"updated_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"dto.PlanResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"content_type": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.PlanContentType"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"example": "任务"
|
|
|
|
|
|
},
|
|
|
|
|
|
"cron_expression": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"example": "0 0 6 * * *"
|
|
|
|
|
|
},
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"example": "根据温度自动调节风扇和加热器"
|
|
|
|
|
|
},
|
|
|
|
|
|
"execute_count": {
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"example": 0
|
|
|
|
|
|
},
|
|
|
|
|
|
"execute_num": {
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"example": 10
|
|
|
|
|
|
},
|
|
|
|
|
|
"execution_type": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.PlanExecutionType"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"example": "自动"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"example": 1
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"example": "猪舍温度控制计划"
|
|
|
|
|
|
},
|
2025-10-29 17:52:07 +08:00
|
|
|
|
"plan_type": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.PlanType"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"example": "自定义任务"
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"status": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.PlanStatus"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"example": "已启用"
|
|
|
|
|
|
},
|
|
|
|
|
|
"sub_plans": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.SubPlanResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"tasks": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.TaskResponse"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"dto.RawMaterialNutrientDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"nutrient_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"nutrient_name": {
|
|
|
|
|
|
"description": "营养素名称",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"value": {
|
|
|
|
|
|
"description": "营养价值含量",
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-22 16:44:22 +08:00
|
|
|
|
"dto.RawMaterialNutrientItem": {
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"type": "object",
|
2025-11-22 16:44:22 +08:00
|
|
|
|
"required": [
|
|
|
|
|
|
"nutrient_id"
|
|
|
|
|
|
],
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"properties": {
|
2025-11-22 16:44:22 +08:00
|
|
|
|
"nutrient_id": {
|
|
|
|
|
|
"description": "营养素ID",
|
|
|
|
|
|
"type": "integer"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
},
|
2025-11-22 16:44:22 +08:00
|
|
|
|
"value": {
|
|
|
|
|
|
"description": "含量值,必须大于等于0",
|
|
|
|
|
|
"type": "number",
|
|
|
|
|
|
"minimum": 0
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.RawMaterialResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"description": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
2025-11-27 17:33:28 +08:00
|
|
|
|
"max_addition_ratio": {
|
|
|
|
|
|
"description": "最大添加比例",
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
},
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"name": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"raw_material_nutrients": {
|
|
|
|
|
|
"description": "关联的营养素信息",
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.RawMaterialNutrientDTO"
|
|
|
|
|
|
}
|
2025-11-25 20:22:38 +08:00
|
|
|
|
},
|
|
|
|
|
|
"reference_price": {
|
|
|
|
|
|
"description": "参考价格(kg/元)",
|
|
|
|
|
|
"type": "number"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-24 13:25:15 +08:00
|
|
|
|
"dto.RecipeIngredientDto": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"raw_material_id"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"percentage": {
|
|
|
|
|
|
"description": "原料在配方中的百分比 (0-1之间)",
|
|
|
|
|
|
"type": "number",
|
|
|
|
|
|
"maximum": 1,
|
|
|
|
|
|
"minimum": 0
|
|
|
|
|
|
},
|
|
|
|
|
|
"raw_material_id": {
|
|
|
|
|
|
"description": "原料ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.RecipeResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"recipe_ingredients": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.RecipeIngredientDto"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-06 23:10:58 +08:00
|
|
|
|
"dto.ReclassifyPenToNewBatchRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"pen_id",
|
|
|
|
|
|
"to_batch_id"
|
2025-10-06 23:10:58 +08:00
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"pen_id": {
|
2025-10-06 23:10:58 +08:00
|
|
|
|
"description": "待划拨的猪栏ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"remarks": {
|
|
|
|
|
|
"description": "备注",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"to_batch_id": {
|
2025-10-06 23:10:58 +08:00
|
|
|
|
"description": "目标猪批次ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"dto.RecordCullRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"happened_at",
|
|
|
|
|
|
"pen_id",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"quantity"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"happened_at": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "发生时间",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"pen_id": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "猪栏ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"quantity": {
|
|
|
|
|
|
"description": "淘汰猪数量",
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"minimum": 1
|
|
|
|
|
|
},
|
|
|
|
|
|
"remarks": {
|
|
|
|
|
|
"description": "备注",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.RecordDeathRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"happened_at",
|
|
|
|
|
|
"pen_id",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"quantity"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"happened_at": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "发生时间",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"pen_id": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "猪栏ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"quantity": {
|
|
|
|
|
|
"description": "死亡猪数量",
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"minimum": 1
|
|
|
|
|
|
},
|
|
|
|
|
|
"remarks": {
|
|
|
|
|
|
"description": "备注",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.RecordSickPigCullRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"happened_at",
|
|
|
|
|
|
"pen_id",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"quantity",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"treatment_location"
|
2025-10-06 23:22:47 +08:00
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"happened_at": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "发生时间",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"pen_id": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "猪栏ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"quantity": {
|
|
|
|
|
|
"description": "淘汰猪数量",
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"minimum": 1
|
|
|
|
|
|
},
|
|
|
|
|
|
"remarks": {
|
|
|
|
|
|
"description": "备注",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"treatment_location": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "治疗地点",
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.PigBatchSickPigTreatmentLocation"
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.RecordSickPigDeathRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"happened_at",
|
|
|
|
|
|
"pen_id",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"quantity",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"treatment_location"
|
2025-10-06 23:22:47 +08:00
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"happened_at": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "发生时间",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"pen_id": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "猪栏ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"quantity": {
|
|
|
|
|
|
"description": "死亡猪数量",
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"minimum": 1
|
|
|
|
|
|
},
|
|
|
|
|
|
"remarks": {
|
|
|
|
|
|
"description": "备注",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"treatment_location": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "治疗地点",
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.PigBatchSickPigTreatmentLocation"
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.RecordSickPigRecoveryRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"happened_at",
|
|
|
|
|
|
"pen_id",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"quantity",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"treatment_location"
|
2025-10-06 23:22:47 +08:00
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"happened_at": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "发生时间",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"pen_id": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "猪栏ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"quantity": {
|
|
|
|
|
|
"description": "康复猪数量",
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"minimum": 1
|
|
|
|
|
|
},
|
|
|
|
|
|
"remarks": {
|
|
|
|
|
|
"description": "备注",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"treatment_location": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "治疗地点",
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.PigBatchSickPigTreatmentLocation"
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.RecordSickPigsRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"happened_at",
|
|
|
|
|
|
"pen_id",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"quantity",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"treatment_location"
|
2025-10-06 23:22:47 +08:00
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"happened_at": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "发生时间",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"pen_id": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "猪栏ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"quantity": {
|
|
|
|
|
|
"description": "病猪数量",
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"minimum": 1
|
|
|
|
|
|
},
|
|
|
|
|
|
"remarks": {
|
|
|
|
|
|
"description": "备注",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"treatment_location": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "治疗地点",
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.PigBatchSickPigTreatmentLocation"
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.SellPigsRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"pen_id",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"quantity",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"total_price",
|
|
|
|
|
|
"trade_date",
|
|
|
|
|
|
"trader_name",
|
|
|
|
|
|
"unit_price"
|
2025-10-06 23:22:47 +08:00
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"pen_id": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "猪栏ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"quantity": {
|
|
|
|
|
|
"description": "卖出猪只数量",
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"minimum": 1
|
|
|
|
|
|
},
|
|
|
|
|
|
"remarks": {
|
|
|
|
|
|
"description": "备注",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"total_price": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "总价",
|
|
|
|
|
|
"type": "number",
|
|
|
|
|
|
"minimum": 0
|
|
|
|
|
|
},
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"trade_date": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "交易日期",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"trader_name": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "交易方名称",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"unit_price": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "单价",
|
|
|
|
|
|
"type": "number",
|
|
|
|
|
|
"minimum": 0
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-24 21:24:48 +08:00
|
|
|
|
"dto.SendTestNotificationRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"type"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"type": {
|
2025-10-24 21:38:52 +08:00
|
|
|
|
"description": "Type 指定要测试的通知渠道",
|
2025-10-24 21:24:48 +08:00
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
2025-11-10 13:41:26 +08:00
|
|
|
|
"$ref": "#/definitions/models.NotifierType"
|
2025-10-24 21:24:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"dto.SensorDataDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
2025-11-10 21:32:18 +08:00
|
|
|
|
"area_controller_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"data": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"device_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"sensor_type": {
|
|
|
|
|
|
"$ref": "#/definitions/models.SensorType"
|
|
|
|
|
|
},
|
|
|
|
|
|
"time": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-10 13:41:26 +08:00
|
|
|
|
"dto.SnoozeAlarmRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"duration_minutes"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"duration_minutes": {
|
|
|
|
|
|
"description": "忽略时长,单位分钟",
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"minimum": 1
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-25 18:10:28 +08:00
|
|
|
|
"dto.StockAdjustmentRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"change_amount",
|
|
|
|
|
|
"raw_material_id"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"change_amount": {
|
|
|
|
|
|
"description": "变动数量, 正数为入库, 负数为出库, 单位: g",
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
},
|
|
|
|
|
|
"raw_material_id": {
|
|
|
|
|
|
"description": "要调整的原料ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"remarks": {
|
|
|
|
|
|
"description": "备注",
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"maxLength": 255
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.StockLogResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"after_quantity": {
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
},
|
|
|
|
|
|
"before_quantity": {
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
},
|
|
|
|
|
|
"change_amount": {
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
},
|
|
|
|
|
|
"happened_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"raw_material_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"raw_material_name": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"remarks": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"source_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"source_type": {
|
2025-11-25 20:22:38 +08:00
|
|
|
|
"$ref": "#/definitions/models.StockLogSourceType"
|
2025-11-25 18:10:28 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"dto.SubPlanResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"child_plan": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PlanResponse"
|
|
|
|
|
|
},
|
|
|
|
|
|
"child_plan_id": {
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"example": 2
|
|
|
|
|
|
},
|
|
|
|
|
|
"execution_order": {
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"example": 1
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"example": 1
|
|
|
|
|
|
},
|
|
|
|
|
|
"parent_plan_id": {
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"example": 1
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"dto.TaskDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.TaskExecutionLogDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"created_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"ended_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"output": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"plan_execution_log_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"started_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"status": {
|
|
|
|
|
|
"$ref": "#/definitions/models.ExecutionStatus"
|
|
|
|
|
|
},
|
|
|
|
|
|
"task": {
|
|
|
|
|
|
"description": "嵌套的任务信息",
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/dto.TaskDTO"
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
"task_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"updated_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"dto.TaskRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"example": "打开1号风扇"
|
|
|
|
|
|
},
|
|
|
|
|
|
"execution_order": {
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"example": 1
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"example": "打开风扇"
|
|
|
|
|
|
},
|
|
|
|
|
|
"parameters": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"additionalProperties": true
|
|
|
|
|
|
},
|
|
|
|
|
|
"type": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.TaskType"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"example": "等待"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.TaskResponse": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"example": "打开1号风扇"
|
|
|
|
|
|
},
|
|
|
|
|
|
"execution_order": {
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"example": 1
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"example": 1
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"example": "打开风扇"
|
|
|
|
|
|
},
|
|
|
|
|
|
"parameters": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"additionalProperties": true
|
|
|
|
|
|
},
|
|
|
|
|
|
"plan_id": {
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"example": 1
|
|
|
|
|
|
},
|
|
|
|
|
|
"type": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.TaskType"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"example": "等待"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"dto.TransferPigsAcrossBatchesRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"dest_batch_id",
|
|
|
|
|
|
"from_pen_id",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"quantity",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"to_pen_id"
|
2025-10-06 23:22:47 +08:00
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"dest_batch_id": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "目标猪批次ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"from_pen_id": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "源猪栏ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"quantity": {
|
|
|
|
|
|
"description": "调栏猪只数量",
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"minimum": 1
|
|
|
|
|
|
},
|
|
|
|
|
|
"remarks": {
|
|
|
|
|
|
"description": "备注",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"to_pen_id": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "目标猪栏ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.TransferPigsWithinBatchRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"from_pen_id",
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"quantity",
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"to_pen_id"
|
2025-10-06 23:22:47 +08:00
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"from_pen_id": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "源猪栏ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"quantity": {
|
|
|
|
|
|
"description": "调栏猪只数量",
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"minimum": 1
|
|
|
|
|
|
},
|
|
|
|
|
|
"remarks": {
|
|
|
|
|
|
"description": "备注",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
2025-10-31 18:14:12 +08:00
|
|
|
|
"to_pen_id": {
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"description": "目标猪栏ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"dto.UpdateAreaControllerRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"name",
|
|
|
|
|
|
"network_id"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"location": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"network_id": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"additionalProperties": true
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-10 19:18:49 +08:00
|
|
|
|
"dto.UpdateAreaThresholdAlarmDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"operator",
|
|
|
|
|
|
"thresholds"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"level": {
|
|
|
|
|
|
"description": "新的告警等级,可选",
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.SeverityLevel"
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
"operator": {
|
|
|
|
|
|
"description": "新的操作符",
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.Operator"
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
"thresholds": {
|
|
|
|
|
|
"description": "新的阈值",
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"dto.UpdateDeviceRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"area_controller_id",
|
|
|
|
|
|
"device_template_id",
|
|
|
|
|
|
"name"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"area_controller_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"device_template_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"location": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"additionalProperties": true
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.UpdateDeviceTemplateRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"category",
|
|
|
|
|
|
"commands",
|
|
|
|
|
|
"name"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"category": {
|
|
|
|
|
|
"$ref": "#/definitions/models.DeviceCategory"
|
|
|
|
|
|
},
|
|
|
|
|
|
"commands": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"additionalProperties": true
|
|
|
|
|
|
},
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"manufacturer": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"values": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/models.ValueDescriptor"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-10 19:18:49 +08:00
|
|
|
|
"dto.UpdateDeviceThresholdAlarmDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"operator",
|
|
|
|
|
|
"thresholds"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"level": {
|
|
|
|
|
|
"description": "新的告警等级,可选",
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.SeverityLevel"
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
"operator": {
|
|
|
|
|
|
"description": "新的操作符",
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.Operator"
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
"thresholds": {
|
|
|
|
|
|
"description": "新的阈值",
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"dto.UpdateNutrientRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"name"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"description": "描述",
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"maxLength": 255
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"description": "营养素名称",
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"maxLength": 100
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"dto.UpdatePenRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"capacity",
|
|
|
|
|
|
"house_id",
|
|
|
|
|
|
"pen_number",
|
|
|
|
|
|
"status"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"capacity": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"house_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"pen_number": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"status": {
|
2025-10-04 01:31:35 +08:00
|
|
|
|
"description": "添加oneof校验",
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"空闲",
|
|
|
|
|
|
"使用中",
|
|
|
|
|
|
"病猪栏",
|
|
|
|
|
|
"康复栏",
|
|
|
|
|
|
"清洗消毒",
|
|
|
|
|
|
"维修中"
|
|
|
|
|
|
],
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.PenStatus"
|
|
|
|
|
|
}
|
|
|
|
|
|
]
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.UpdatePenStatusRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"status"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"status": {
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"空闲",
|
|
|
|
|
|
"使用中",
|
|
|
|
|
|
"病猪栏",
|
|
|
|
|
|
"康复栏",
|
|
|
|
|
|
"清洗消毒",
|
|
|
|
|
|
"维修中"
|
|
|
|
|
|
],
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.PenStatus"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"example": "病猪栏"
|
2025-10-03 23:59:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"dto.UpdatePigAgeStageRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"name"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"description": "阶段描述",
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"maxLength": 255
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"description": "年龄阶段名称",
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"maxLength": 50
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.UpdatePigBreedRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"name"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"appearance_features": {
|
|
|
|
|
|
"description": "外貌特征",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"breed_advantages": {
|
|
|
|
|
|
"description": "品种优点",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"breed_disadvantages": {
|
|
|
|
|
|
"description": "品种缺点",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"description": "其他描述",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"description": "品种名称",
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"maxLength": 50
|
|
|
|
|
|
},
|
|
|
|
|
|
"parent_info": {
|
|
|
|
|
|
"description": "父母信息",
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"dto.UpdatePigHouseRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"name"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-22 17:55:52 +08:00
|
|
|
|
"dto.UpdatePigTypeNutrientRequirementsRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"nutrient_requirements"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"nutrient_requirements": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.PigNutrientRequirementItem"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"dto.UpdatePigTypeRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"age_stage_id",
|
|
|
|
|
|
"breed_id"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"age_stage_id": {
|
|
|
|
|
|
"description": "关联的猪年龄阶段ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"breed_id": {
|
|
|
|
|
|
"description": "关联的猪品种ID",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"daily_feed_intake": {
|
|
|
|
|
|
"description": "理论日均食量 (g/天)",
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
},
|
|
|
|
|
|
"daily_gain_weight": {
|
|
|
|
|
|
"description": "理论日增重 (g/天)",
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
},
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"description": "该猪类型的描述或特点",
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"maxLength": 255
|
|
|
|
|
|
},
|
|
|
|
|
|
"max_days": {
|
|
|
|
|
|
"description": "该猪类型在该年龄阶段的最大日龄",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"max_weight": {
|
|
|
|
|
|
"description": "该猪类型在该年龄阶段的最大体重 (g)",
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
},
|
|
|
|
|
|
"min_days": {
|
|
|
|
|
|
"description": "该猪类型在该年龄阶段的最小日龄",
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"min_weight": {
|
|
|
|
|
|
"description": "该猪类型在该年龄阶段的最小体重 (g)",
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"dto.UpdatePlanRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"execution_type"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"cron_expression": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"example": "0 0 6 * * *"
|
|
|
|
|
|
},
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"example": "更新后的描述"
|
|
|
|
|
|
},
|
|
|
|
|
|
"execute_num": {
|
|
|
|
|
|
"type": "integer",
|
2025-10-31 16:01:49 +08:00
|
|
|
|
"minimum": 0,
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"example": 10
|
|
|
|
|
|
},
|
|
|
|
|
|
"execution_type": {
|
|
|
|
|
|
"allOf": [
|
|
|
|
|
|
{
|
|
|
|
|
|
"$ref": "#/definitions/models.PlanExecutionType"
|
|
|
|
|
|
}
|
|
|
|
|
|
],
|
|
|
|
|
|
"example": "自动"
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"example": "猪舍温度控制计划V2"
|
|
|
|
|
|
},
|
|
|
|
|
|
"sub_plan_ids": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"tasks": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.TaskRequest"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-22 16:44:22 +08:00
|
|
|
|
"dto.UpdateRawMaterialNutrientsRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"nutrients"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"nutrients": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.RawMaterialNutrientItem"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"dto.UpdateRawMaterialRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"name"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"description": "描述",
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"maxLength": 255
|
|
|
|
|
|
},
|
2025-11-27 17:33:28 +08:00
|
|
|
|
"max_addition_ratio": {
|
|
|
|
|
|
"description": "最大添加比例",
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
},
|
2025-11-21 16:02:06 +08:00
|
|
|
|
"name": {
|
|
|
|
|
|
"description": "原料名称",
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"maxLength": 100
|
2025-11-25 20:22:38 +08:00
|
|
|
|
},
|
|
|
|
|
|
"reference_price": {
|
|
|
|
|
|
"description": "参考价格(kg/元)",
|
|
|
|
|
|
"type": "number"
|
2025-11-21 16:02:06 +08:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-24 13:25:15 +08:00
|
|
|
|
"dto.UpdateRecipeRequest": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"required": [
|
|
|
|
|
|
"name"
|
|
|
|
|
|
],
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"description": "配方描述",
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"maxLength": 255
|
|
|
|
|
|
},
|
|
|
|
|
|
"name": {
|
|
|
|
|
|
"description": "配方名称",
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"maxLength": 100
|
|
|
|
|
|
},
|
|
|
|
|
|
"recipe_ingredients": {
|
|
|
|
|
|
"description": "配方原料组成",
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"$ref": "#/definitions/dto.RecipeIngredientDto"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"dto.UserActionLogDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"action_type": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"http_method": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"http_path": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"result_details": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"source_ip": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"status": {
|
|
|
|
|
|
"$ref": "#/definitions/models.AuditStatus"
|
|
|
|
|
|
},
|
|
|
|
|
|
"target_resource": {
|
|
|
|
|
|
"type": "array",
|
|
|
|
|
|
"items": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"time": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"user_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"username": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.WeighingBatchDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"created_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"description": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"pig_batch_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"updated_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"weighing_time": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
|
|
|
|
|
"dto.WeighingRecordDTO": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"created_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"operator_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"pen_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"remark": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"updated_at": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"weighing_batch_id": {
|
|
|
|
|
|
"type": "integer"
|
|
|
|
|
|
},
|
|
|
|
|
|
"weighing_time": {
|
|
|
|
|
|
"type": "string"
|
|
|
|
|
|
},
|
|
|
|
|
|
"weight": {
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
},
|
2025-11-10 13:41:26 +08:00
|
|
|
|
"models.AlarmCode": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"温度阈值",
|
|
|
|
|
|
"湿度阈值",
|
|
|
|
|
|
"重量阈值",
|
|
|
|
|
|
"电池电量阈值",
|
|
|
|
|
|
"信号强度阈值",
|
|
|
|
|
|
"设备离线",
|
|
|
|
|
|
"区域主控离线"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"AlarmCodeTemperature",
|
|
|
|
|
|
"AlarmCodeHumidity",
|
|
|
|
|
|
"AlarmCodeWeight",
|
|
|
|
|
|
"AlarmCodeBatteryLevel",
|
|
|
|
|
|
"AlarmCodeSignalMetrics",
|
|
|
|
|
|
"AlarmCodeDeviceOffline",
|
|
|
|
|
|
"AlarmCodeAreaControllerOffline"
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
"models.AlarmSourceType": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"普通设备",
|
|
|
|
|
|
"区域主控",
|
|
|
|
|
|
"系统"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"AlarmSourceTypeDevice",
|
|
|
|
|
|
"AlarmSourceTypeAreaController",
|
|
|
|
|
|
"AlarmSourceTypeSystem"
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"models.AuditStatus": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"成功",
|
|
|
|
|
|
"失败"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"AuditStatusSuccess",
|
|
|
|
|
|
"AuditStatusFailed"
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"models.DeviceCategory": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"执行器",
|
|
|
|
|
|
"传感器"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"CategoryActuator",
|
|
|
|
|
|
"CategorySensor"
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"models.ExecutionStatus": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"已开始",
|
|
|
|
|
|
"已完成",
|
|
|
|
|
|
"失败",
|
|
|
|
|
|
"已取消",
|
|
|
|
|
|
"等待中"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-comments": {
|
|
|
|
|
|
"ExecutionStatusCancelled": "执行取消",
|
|
|
|
|
|
"ExecutionStatusCompleted": "执行完成",
|
|
|
|
|
|
"ExecutionStatusFailed": "执行失败",
|
|
|
|
|
|
"ExecutionStatusStarted": "开始执行",
|
|
|
|
|
|
"ExecutionStatusWaiting": "等待执行 (用于预写日志)"
|
|
|
|
|
|
},
|
|
|
|
|
|
"x-enum-descriptions": [
|
|
|
|
|
|
"开始执行",
|
|
|
|
|
|
"执行完成",
|
|
|
|
|
|
"执行失败",
|
|
|
|
|
|
"执行取消",
|
|
|
|
|
|
"等待执行 (用于预写日志)"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"ExecutionStatusStarted",
|
|
|
|
|
|
"ExecutionStatusCompleted",
|
|
|
|
|
|
"ExecutionStatusFailed",
|
|
|
|
|
|
"ExecutionStatusCancelled",
|
|
|
|
|
|
"ExecutionStatusWaiting"
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
"models.LogChangeType": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"死亡",
|
|
|
|
|
|
"淘汰",
|
|
|
|
|
|
"销售",
|
|
|
|
|
|
"购买",
|
|
|
|
|
|
"转入",
|
|
|
|
|
|
"转出",
|
|
|
|
|
|
"盘点校正"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"ChangeTypeDeath",
|
|
|
|
|
|
"ChangeTypeCull",
|
|
|
|
|
|
"ChangeTypeSale",
|
|
|
|
|
|
"ChangeTypeBuy",
|
|
|
|
|
|
"ChangeTypeTransferIn",
|
|
|
|
|
|
"ChangeTypeTransferOut",
|
|
|
|
|
|
"ChangeTypeCorrection"
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
"models.MedicationReasonType": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"预防",
|
|
|
|
|
|
"治疗",
|
|
|
|
|
|
"保健"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"ReasonTypePreventive",
|
|
|
|
|
|
"ReasonTypeTreatment",
|
|
|
|
|
|
"ReasonTypeHealthCare"
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
2025-10-25 15:04:47 +08:00
|
|
|
|
"models.NotificationStatus": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"发送成功",
|
|
|
|
|
|
"发送失败",
|
|
|
|
|
|
"已跳过"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-comments": {
|
|
|
|
|
|
"NotificationStatusFailed": "通知发送失败",
|
|
|
|
|
|
"NotificationStatusSkipped": "通知因某些原因被跳过(例如:用户未配置联系方式)",
|
|
|
|
|
|
"NotificationStatusSuccess": "通知已成功发送"
|
|
|
|
|
|
},
|
|
|
|
|
|
"x-enum-descriptions": [
|
|
|
|
|
|
"通知已成功发送",
|
|
|
|
|
|
"通知发送失败",
|
|
|
|
|
|
"通知因某些原因被跳过(例如:用户未配置联系方式)"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"NotificationStatusSuccess",
|
|
|
|
|
|
"NotificationStatusFailed",
|
|
|
|
|
|
"NotificationStatusSkipped"
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
2025-11-10 13:41:26 +08:00
|
|
|
|
"models.NotifierType": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"邮件",
|
|
|
|
|
|
"企业微信",
|
|
|
|
|
|
"飞书",
|
|
|
|
|
|
"日志"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"NotifierTypeSMTP",
|
|
|
|
|
|
"NotifierTypeWeChat",
|
|
|
|
|
|
"NotifierTypeLark",
|
|
|
|
|
|
"NotifierTypeLog"
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
2025-11-10 19:18:49 +08:00
|
|
|
|
"models.Operator": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"\u003c",
|
|
|
|
|
|
"\u003c=",
|
|
|
|
|
|
"\u003e",
|
|
|
|
|
|
"\u003e=",
|
|
|
|
|
|
"=",
|
|
|
|
|
|
"!="
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"OperatorLessThan",
|
|
|
|
|
|
"OperatorLessThanOrEqualTo",
|
|
|
|
|
|
"OperatorGreaterThan",
|
|
|
|
|
|
"OperatorGreaterThanOrEqualTo",
|
|
|
|
|
|
"OperatorEqualTo",
|
|
|
|
|
|
"OperatorNotEqualTo"
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"models.PenStatus": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"空闲",
|
2025-10-04 01:31:35 +08:00
|
|
|
|
"使用中",
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"病猪栏",
|
|
|
|
|
|
"康复栏",
|
|
|
|
|
|
"清洗消毒",
|
|
|
|
|
|
"维修中"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"PenStatusEmpty",
|
|
|
|
|
|
"PenStatusOccupied",
|
|
|
|
|
|
"PenStatusSickPen",
|
|
|
|
|
|
"PenStatusRecovering",
|
|
|
|
|
|
"PenStatusCleaning",
|
|
|
|
|
|
"PenStatusUnderMaint"
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"models.PendingCollectionStatus": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"等待中",
|
|
|
|
|
|
"已完成",
|
|
|
|
|
|
"已超时"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-comments": {
|
|
|
|
|
|
"PendingStatusFulfilled": "已收到设备响应并成功处理",
|
|
|
|
|
|
"PendingStatusPending": "请求已发送,等待设备响应",
|
|
|
|
|
|
"PendingStatusTimedOut": "请求超时,未收到设备响应"
|
|
|
|
|
|
},
|
|
|
|
|
|
"x-enum-descriptions": [
|
|
|
|
|
|
"请求已发送,等待设备响应",
|
|
|
|
|
|
"已收到设备响应并成功处理",
|
|
|
|
|
|
"请求超时,未收到设备响应"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"PendingStatusPending",
|
|
|
|
|
|
"PendingStatusFulfilled",
|
|
|
|
|
|
"PendingStatusTimedOut"
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"models.PigBatchOriginType": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"自繁",
|
|
|
|
|
|
"外购"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"OriginTypeSelfFarrowed",
|
|
|
|
|
|
"OriginTypePurchased"
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"models.PigBatchSickPigReasonType": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"患病",
|
|
|
|
|
|
"康复",
|
|
|
|
|
|
"死亡",
|
|
|
|
|
|
"淘汰",
|
|
|
|
|
|
"转入",
|
|
|
|
|
|
"转出",
|
|
|
|
|
|
"其他"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-comments": {
|
|
|
|
|
|
"SickPigReasonTypeDeath": "猪只死亡",
|
|
|
|
|
|
"SickPigReasonTypeEliminate": "猪只淘汰",
|
|
|
|
|
|
"SickPigReasonTypeIllness": "猪只患病",
|
|
|
|
|
|
"SickPigReasonTypeOther": "其他原因",
|
|
|
|
|
|
"SickPigReasonTypeRecovery": "猪只康复",
|
|
|
|
|
|
"SickPigReasonTypeTransferIn": "病猪转入当前批次",
|
|
|
|
|
|
"SickPigReasonTypeTransferOut": "病猪转出当前批次 (例如转到其他批次或出售)"
|
|
|
|
|
|
},
|
|
|
|
|
|
"x-enum-descriptions": [
|
|
|
|
|
|
"猪只患病",
|
|
|
|
|
|
"猪只康复",
|
|
|
|
|
|
"猪只死亡",
|
|
|
|
|
|
"猪只淘汰",
|
|
|
|
|
|
"病猪转入当前批次",
|
|
|
|
|
|
"病猪转出当前批次 (例如转到其他批次或出售)",
|
|
|
|
|
|
"其他原因"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"SickPigReasonTypeIllness",
|
|
|
|
|
|
"SickPigReasonTypeRecovery",
|
|
|
|
|
|
"SickPigReasonTypeDeath",
|
|
|
|
|
|
"SickPigReasonTypeEliminate",
|
|
|
|
|
|
"SickPigReasonTypeTransferIn",
|
|
|
|
|
|
"SickPigReasonTypeTransferOut",
|
|
|
|
|
|
"SickPigReasonTypeOther"
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
2025-10-06 23:22:47 +08:00
|
|
|
|
"models.PigBatchSickPigTreatmentLocation": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"原地治疗",
|
|
|
|
|
|
"病猪栏治疗"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"TreatmentLocationOnSite",
|
|
|
|
|
|
"TreatmentLocationSickBay"
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"models.PigBatchStatus": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"enum": [
|
2025-11-21 15:03:42 +08:00
|
|
|
|
"生产中",
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"待售",
|
|
|
|
|
|
"已出售",
|
|
|
|
|
|
"已归档"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-comments": {
|
2025-11-21 15:03:42 +08:00
|
|
|
|
"BatchStatusActive": "饲养中",
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"BatchStatusArchived": "批次结束(如全群淘汰等)",
|
2025-11-21 15:03:42 +08:00
|
|
|
|
"BatchStatusForSale": "达到出栏标准"
|
2025-10-03 23:59:25 +08:00
|
|
|
|
},
|
|
|
|
|
|
"x-enum-descriptions": [
|
2025-11-21 15:03:42 +08:00
|
|
|
|
"饲养中",
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"达到出栏标准",
|
|
|
|
|
|
"",
|
|
|
|
|
|
"批次结束(如全群淘汰等)"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
2025-11-21 15:03:42 +08:00
|
|
|
|
"BatchStatusActive",
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"BatchStatusForSale",
|
|
|
|
|
|
"BatchStatusSold",
|
|
|
|
|
|
"BatchStatusArchived"
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
2025-10-19 20:24:01 +08:00
|
|
|
|
"models.PigTransferType": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"群内调栏",
|
|
|
|
|
|
"跨群调栏",
|
|
|
|
|
|
"销售",
|
|
|
|
|
|
"死亡",
|
|
|
|
|
|
"淘汰",
|
|
|
|
|
|
"新购入",
|
|
|
|
|
|
"产房转入"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-comments": {
|
|
|
|
|
|
"PigTransferTypeCrossBatch": "不同猪群间的调动",
|
|
|
|
|
|
"PigTransferTypeCull": "猪只淘汰",
|
|
|
|
|
|
"PigTransferTypeDeath": "猪只死亡",
|
|
|
|
|
|
"PigTransferTypeDeliveryRoomTransfor": "产房转入",
|
|
|
|
|
|
"PigTransferTypeInternal": "同一猪群内猪栏间的调动",
|
|
|
|
|
|
"PigTransferTypePurchase": "新购入猪只",
|
|
|
|
|
|
"PigTransferTypeSale": "猪只售出"
|
|
|
|
|
|
},
|
|
|
|
|
|
"x-enum-descriptions": [
|
|
|
|
|
|
"同一猪群内猪栏间的调动",
|
|
|
|
|
|
"不同猪群间的调动",
|
|
|
|
|
|
"猪只售出",
|
|
|
|
|
|
"猪只死亡",
|
|
|
|
|
|
"猪只淘汰",
|
|
|
|
|
|
"新购入猪只",
|
|
|
|
|
|
"产房转入"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"PigTransferTypeInternal",
|
|
|
|
|
|
"PigTransferTypeCrossBatch",
|
|
|
|
|
|
"PigTransferTypeSale",
|
|
|
|
|
|
"PigTransferTypeDeath",
|
|
|
|
|
|
"PigTransferTypeCull",
|
|
|
|
|
|
"PigTransferTypePurchase",
|
|
|
|
|
|
"PigTransferTypeDeliveryRoomTransfor"
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"models.PlanContentType": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"子计划",
|
|
|
|
|
|
"任务"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-comments": {
|
|
|
|
|
|
"PlanContentTypeSubPlans": "计划包含子计划",
|
|
|
|
|
|
"PlanContentTypeTasks": "计划包含任务"
|
|
|
|
|
|
},
|
|
|
|
|
|
"x-enum-descriptions": [
|
|
|
|
|
|
"计划包含子计划",
|
|
|
|
|
|
"计划包含任务"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"PlanContentTypeSubPlans",
|
|
|
|
|
|
"PlanContentTypeTasks"
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
"models.PlanExecutionType": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"自动",
|
|
|
|
|
|
"手动"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-comments": {
|
|
|
|
|
|
"PlanExecutionTypeAutomatic": "自动执行 (包含定时和循环)",
|
|
|
|
|
|
"PlanExecutionTypeManual": "手动执行"
|
|
|
|
|
|
},
|
|
|
|
|
|
"x-enum-descriptions": [
|
|
|
|
|
|
"自动执行 (包含定时和循环)",
|
|
|
|
|
|
"手动执行"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"PlanExecutionTypeAutomatic",
|
|
|
|
|
|
"PlanExecutionTypeManual"
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
"models.PlanStatus": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"已禁用",
|
|
|
|
|
|
"已启用",
|
|
|
|
|
|
"执行完毕",
|
|
|
|
|
|
"执行失败"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-comments": {
|
|
|
|
|
|
"PlanStatusDisabled": "禁用计划",
|
|
|
|
|
|
"PlanStatusEnabled": "启用计划",
|
|
|
|
|
|
"PlanStatusFailed": "执行失败",
|
|
|
|
|
|
"PlanStatusStopped": "执行完毕"
|
|
|
|
|
|
},
|
|
|
|
|
|
"x-enum-descriptions": [
|
|
|
|
|
|
"禁用计划",
|
|
|
|
|
|
"启用计划",
|
|
|
|
|
|
"执行完毕",
|
|
|
|
|
|
"执行失败"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"PlanStatusDisabled",
|
|
|
|
|
|
"PlanStatusEnabled",
|
|
|
|
|
|
"PlanStatusStopped",
|
|
|
|
|
|
"PlanStatusFailed"
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
2025-10-29 17:52:07 +08:00
|
|
|
|
"models.PlanType": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"自定义任务",
|
|
|
|
|
|
"系统任务"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"PlanTypeCustom",
|
|
|
|
|
|
"PlanTypeSystem"
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"models.SensorType": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"信号强度",
|
|
|
|
|
|
"电池电量",
|
|
|
|
|
|
"温度",
|
|
|
|
|
|
"湿度",
|
|
|
|
|
|
"重量"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-comments": {
|
|
|
|
|
|
"SensorTypeBatteryLevel": "电池电量",
|
|
|
|
|
|
"SensorTypeHumidity": "湿度",
|
|
|
|
|
|
"SensorTypeSignalMetrics": "信号强度",
|
|
|
|
|
|
"SensorTypeTemperature": "温度",
|
|
|
|
|
|
"SensorTypeWeight": "重量"
|
|
|
|
|
|
},
|
|
|
|
|
|
"x-enum-descriptions": [
|
|
|
|
|
|
"信号强度",
|
|
|
|
|
|
"电池电量",
|
|
|
|
|
|
"温度",
|
|
|
|
|
|
"湿度",
|
|
|
|
|
|
"重量"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"SensorTypeSignalMetrics",
|
|
|
|
|
|
"SensorTypeBatteryLevel",
|
|
|
|
|
|
"SensorTypeTemperature",
|
|
|
|
|
|
"SensorTypeHumidity",
|
|
|
|
|
|
"SensorTypeWeight"
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
2025-11-10 13:41:26 +08:00
|
|
|
|
"models.SeverityLevel": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"enum": [
|
2025-11-18 22:22:31 +08:00
|
|
|
|
"debug",
|
|
|
|
|
|
"info",
|
|
|
|
|
|
"warn",
|
|
|
|
|
|
"error",
|
|
|
|
|
|
"dpanic",
|
|
|
|
|
|
"panic",
|
|
|
|
|
|
"fatal"
|
2025-11-10 13:41:26 +08:00
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"DebugLevel",
|
|
|
|
|
|
"InfoLevel",
|
|
|
|
|
|
"WarnLevel",
|
|
|
|
|
|
"ErrorLevel",
|
|
|
|
|
|
"DPanicLevel",
|
|
|
|
|
|
"PanicLevel",
|
|
|
|
|
|
"FatalLevel"
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
2025-11-25 20:22:38 +08:00
|
|
|
|
"models.StockLogSourceType": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"采购入库",
|
|
|
|
|
|
"饲喂出库",
|
|
|
|
|
|
"变质出库",
|
|
|
|
|
|
"售卖出库",
|
|
|
|
|
|
"杂用领取",
|
|
|
|
|
|
"手动盘点",
|
|
|
|
|
|
"发酵出库",
|
|
|
|
|
|
"发酵入库"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-comments": {
|
|
|
|
|
|
"StockLogSourceFermentEnd": "发酵料产出,作为新原料计入库存",
|
|
|
|
|
|
"StockLogSourceFermentStart": "原料投入发酵,从库存中扣除"
|
|
|
|
|
|
},
|
|
|
|
|
|
"x-enum-descriptions": [
|
|
|
|
|
|
"",
|
|
|
|
|
|
"",
|
|
|
|
|
|
"",
|
|
|
|
|
|
"",
|
|
|
|
|
|
"",
|
|
|
|
|
|
"",
|
|
|
|
|
|
"原料投入发酵,从库存中扣除",
|
|
|
|
|
|
"发酵料产出,作为新原料计入库存"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"StockLogSourcePurchase",
|
|
|
|
|
|
"StockLogSourceFeeding",
|
|
|
|
|
|
"StockLogSourceDeteriorate",
|
|
|
|
|
|
"StockLogSourceSale",
|
|
|
|
|
|
"StockLogSourceMiscellaneous",
|
|
|
|
|
|
"StockLogSourceManual",
|
|
|
|
|
|
"StockLogSourceFermentStart",
|
|
|
|
|
|
"StockLogSourceFermentEnd"
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"models.TaskType": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"计划分析",
|
|
|
|
|
|
"等待",
|
2025-10-29 17:52:07 +08:00
|
|
|
|
"下料",
|
2025-11-10 13:41:26 +08:00
|
|
|
|
"全量采集",
|
2025-11-10 19:18:49 +08:00
|
|
|
|
"告警通知",
|
2025-11-18 22:22:31 +08:00
|
|
|
|
"通知刷新",
|
2025-11-10 19:18:49 +08:00
|
|
|
|
"设备阈值检查",
|
|
|
|
|
|
"区域阈值检查"
|
2025-10-03 23:59:25 +08:00
|
|
|
|
],
|
|
|
|
|
|
"x-enum-comments": {
|
|
|
|
|
|
"TaskPlanAnalysis": "解析Plan的Task列表并添加到待执行队列的特殊任务",
|
2025-11-10 13:41:26 +08:00
|
|
|
|
"TaskTypeAlarmNotification": "告警通知任务",
|
2025-11-10 19:18:49 +08:00
|
|
|
|
"TaskTypeAreaCollectorThresholdCheck": "区域阈值检查任务",
|
|
|
|
|
|
"TaskTypeDeviceThresholdCheck": "设备阈值检查任务",
|
2025-10-29 17:52:07 +08:00
|
|
|
|
"TaskTypeFullCollection": "新增的全量采集任务",
|
2025-11-18 22:22:31 +08:00
|
|
|
|
"TaskTypeNotificationRefresh": "通知刷新任务",
|
2025-10-03 23:59:25 +08:00
|
|
|
|
"TaskTypeReleaseFeedWeight": "下料口释放指定重量任务",
|
|
|
|
|
|
"TaskTypeWaiting": "等待任务"
|
|
|
|
|
|
},
|
|
|
|
|
|
"x-enum-descriptions": [
|
|
|
|
|
|
"解析Plan的Task列表并添加到待执行队列的特殊任务",
|
|
|
|
|
|
"等待任务",
|
2025-10-29 17:52:07 +08:00
|
|
|
|
"下料口释放指定重量任务",
|
2025-11-10 13:41:26 +08:00
|
|
|
|
"新增的全量采集任务",
|
2025-11-10 19:18:49 +08:00
|
|
|
|
"告警通知任务",
|
2025-11-18 22:22:31 +08:00
|
|
|
|
"通知刷新任务",
|
2025-11-10 19:18:49 +08:00
|
|
|
|
"设备阈值检查任务",
|
|
|
|
|
|
"区域阈值检查任务"
|
2025-10-03 23:59:25 +08:00
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"TaskPlanAnalysis",
|
|
|
|
|
|
"TaskTypeWaiting",
|
2025-10-29 17:52:07 +08:00
|
|
|
|
"TaskTypeReleaseFeedWeight",
|
2025-11-10 13:41:26 +08:00
|
|
|
|
"TaskTypeFullCollection",
|
2025-11-10 19:18:49 +08:00
|
|
|
|
"TaskTypeAlarmNotification",
|
2025-11-18 22:22:31 +08:00
|
|
|
|
"TaskTypeNotificationRefresh",
|
2025-11-10 19:18:49 +08:00
|
|
|
|
"TaskTypeDeviceThresholdCheck",
|
|
|
|
|
|
"TaskTypeAreaCollectorThresholdCheck"
|
2025-10-03 23:59:25 +08:00
|
|
|
|
]
|
|
|
|
|
|
},
|
|
|
|
|
|
"models.ValueDescriptor": {
|
|
|
|
|
|
"type": "object",
|
|
|
|
|
|
"properties": {
|
|
|
|
|
|
"multiplier": {
|
|
|
|
|
|
"description": "乘数,用于原始数据转换",
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
},
|
|
|
|
|
|
"offset": {
|
|
|
|
|
|
"description": "偏移量,用于原始数据转换",
|
|
|
|
|
|
"type": "number"
|
|
|
|
|
|
},
|
|
|
|
|
|
"type": {
|
|
|
|
|
|
"$ref": "#/definitions/models.SensorType"
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|
2025-10-24 21:24:48 +08:00
|
|
|
|
},
|
2025-10-29 18:56:05 +08:00
|
|
|
|
"repository.PlanTypeFilter": {
|
|
|
|
|
|
"type": "string",
|
|
|
|
|
|
"enum": [
|
|
|
|
|
|
"所有任务",
|
|
|
|
|
|
"自定义任务",
|
|
|
|
|
|
"系统任务"
|
|
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
|
|
|
|
|
"PlanTypeFilterAll",
|
|
|
|
|
|
"PlanTypeFilterCustom",
|
|
|
|
|
|
"PlanTypeFilterSystem"
|
|
|
|
|
|
]
|
|
|
|
|
|
},
|
2025-10-25 15:04:47 +08:00
|
|
|
|
"zapcore.Level": {
|
|
|
|
|
|
"type": "integer",
|
|
|
|
|
|
"format": "int32",
|
|
|
|
|
|
"enum": [
|
2025-11-27 17:33:28 +08:00
|
|
|
|
7,
|
2025-10-25 15:04:47 +08:00
|
|
|
|
-1,
|
|
|
|
|
|
0,
|
|
|
|
|
|
1,
|
|
|
|
|
|
2,
|
|
|
|
|
|
3,
|
|
|
|
|
|
4,
|
|
|
|
|
|
5,
|
|
|
|
|
|
-1,
|
|
|
|
|
|
5,
|
2025-11-27 17:33:28 +08:00
|
|
|
|
6
|
2025-10-25 15:04:47 +08:00
|
|
|
|
],
|
|
|
|
|
|
"x-enum-varnames": [
|
2025-11-27 17:33:28 +08:00
|
|
|
|
"_numLevels",
|
2025-10-25 15:04:47 +08:00
|
|
|
|
"DebugLevel",
|
|
|
|
|
|
"InfoLevel",
|
|
|
|
|
|
"WarnLevel",
|
|
|
|
|
|
"ErrorLevel",
|
|
|
|
|
|
"DPanicLevel",
|
|
|
|
|
|
"PanicLevel",
|
|
|
|
|
|
"FatalLevel",
|
|
|
|
|
|
"_minLevel",
|
|
|
|
|
|
"_maxLevel",
|
2025-11-27 17:33:28 +08:00
|
|
|
|
"InvalidLevel"
|
2025-10-25 15:04:47 +08:00
|
|
|
|
]
|
2025-10-03 23:59:25 +08:00
|
|
|
|
}
|
2025-10-13 14:15:38 +08:00
|
|
|
|
},
|
|
|
|
|
|
"securityDefinitions": {
|
|
|
|
|
|
"BearerAuth": {
|
|
|
|
|
|
"type": "apiKey",
|
|
|
|
|
|
"name": "Authorization",
|
|
|
|
|
|
"in": "header"
|
|
|
|
|
|
}
|
2025-10-03 23:59:25 +08:00
|
|
|
|
}
|
|
|
|
|
|
}`
|
|
|
|
|
|
|
|
|
|
|
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
|
|
|
|
|
var SwaggerInfo = &swag.Spec{
|
2025-10-13 14:15:38 +08:00
|
|
|
|
Version: "1.0",
|
2025-10-03 23:59:25 +08:00
|
|
|
|
Host: "",
|
|
|
|
|
|
BasePath: "",
|
|
|
|
|
|
Schemes: []string{},
|
2025-10-13 14:15:38 +08:00
|
|
|
|
Title: "猪场管理系统 API",
|
|
|
|
|
|
Description: "这是一个用于管理猪场设备的后端服务。",
|
2025-10-03 23:59:25 +08:00
|
|
|
|
InfoInstanceName: "swagger",
|
|
|
|
|
|
SwaggerTemplate: docTemplate,
|
|
|
|
|
|
LeftDelim: "{{",
|
|
|
|
|
|
RightDelim: "}}",
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
|
|
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
|
|
|
|
|
}
|