实现修改原料营养信息
This commit is contained in:
@@ -2897,6 +2897,64 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/feed/raw-materials/{id}/nutrients": {
|
||||
"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": "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"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/monitor/device-command-logs": {
|
||||
"get": {
|
||||
"security": [
|
||||
@@ -7360,9 +7418,6 @@
|
||||
"dto.NutrientResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -7378,9 +7433,6 @@
|
||||
"items": {
|
||||
"$ref": "#/definitions/dto.NutrientRawMaterialDTO"
|
||||
}
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -7453,9 +7505,6 @@
|
||||
"dto.PigAgeStageResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -7464,9 +7513,6 @@
|
||||
},
|
||||
"name": {
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -7659,9 +7705,6 @@
|
||||
"breed_disadvantages": {
|
||||
"type": "string"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -7673,9 +7716,6 @@
|
||||
},
|
||||
"parent_info": {
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -7696,9 +7736,6 @@
|
||||
"dto.PigNutrientRequirementDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
@@ -7716,9 +7753,6 @@
|
||||
"nutrient_name": {
|
||||
"description": "营养素名称",
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -7897,9 +7931,6 @@
|
||||
"description": "猪品种名称",
|
||||
"type": "string"
|
||||
},
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"daily_feed_intake": {
|
||||
"type": "number"
|
||||
},
|
||||
@@ -7930,9 +7961,6 @@
|
||||
"items": {
|
||||
"$ref": "#/definitions/dto.PigNutrientRequirementDTO"
|
||||
}
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -8044,9 +8072,6 @@
|
||||
"dto.RawMaterialNutrientDTO": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"id": {
|
||||
"type": "integer"
|
||||
},
|
||||
@@ -8057,21 +8082,32 @@
|
||||
"description": "营养素名称",
|
||||
"type": "string"
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"value": {
|
||||
"description": "营养价值含量",
|
||||
"type": "number"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.RawMaterialNutrientItem": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"nutrient_id"
|
||||
],
|
||||
"properties": {
|
||||
"nutrient_id": {
|
||||
"description": "营养素ID",
|
||||
"type": "integer"
|
||||
},
|
||||
"value": {
|
||||
"description": "含量值,必须大于等于0",
|
||||
"type": "number",
|
||||
"minimum": 0
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.RawMaterialResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"created_at": {
|
||||
"type": "string"
|
||||
},
|
||||
"description": {
|
||||
"type": "string"
|
||||
},
|
||||
@@ -8087,9 +8123,6 @@
|
||||
"items": {
|
||||
"$ref": "#/definitions/dto.RawMaterialNutrientDTO"
|
||||
}
|
||||
},
|
||||
"updated_at": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -8983,6 +9016,20 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.UpdateRawMaterialNutrientsRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"nutrients"
|
||||
],
|
||||
"properties": {
|
||||
"nutrients": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/dto.RawMaterialNutrientItem"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.UpdateRawMaterialRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
|
||||
Reference in New Issue
Block a user