更新猪群对应猪栏接口变更
This commit is contained in:
181
docs/docs.go
181
docs/docs.go
@@ -947,6 +947,83 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/pig-batches/{batchID}/remove-pen/{penID}": {
|
||||
"delete": {
|
||||
"description": "将一个空闲猪栏从指定的猪批次中移除",
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"猪批次管理"
|
||||
],
|
||||
"summary": "从猪批次移除空栏",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "猪批次ID",
|
||||
"name": "batchID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "待移除的猪栏ID",
|
||||
"name": "penID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "移除成功",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/pig-batches/{fromBatchID}/reclassify-pen": {
|
||||
"post": {
|
||||
"description": "将一个猪栏(连同其中的猪只)从一个批次整体划拨到另一个批次",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"猪批次管理"
|
||||
],
|
||||
"summary": "将猪栏划拨到新批次",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "源猪批次ID",
|
||||
"name": "fromBatchID",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "划拨请求信息 (包含目标批次ID、猪栏ID和备注)",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.ReclassifyPenToNewBatchRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "划拨成功",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/pig-batches/{id}": {
|
||||
"get": {
|
||||
"description": "根据ID获取单个猪批次信息",
|
||||
@@ -1066,9 +1143,9 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/pig-batches/{id}/pens": {
|
||||
"put": {
|
||||
"description": "更新指定猪批次当前关联的猪栏列表",
|
||||
"/api/v1/pig-batches/{id}/assign-pens": {
|
||||
"post": {
|
||||
"description": "将一个或多个空闲猪栏分配给指定的猪批次",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
@@ -1078,7 +1155,7 @@ const docTemplate = `{
|
||||
"tags": [
|
||||
"猪批次管理"
|
||||
],
|
||||
"summary": "更新猪批次关联的猪栏",
|
||||
"summary": "为猪批次分配空栏",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
@@ -1088,18 +1165,59 @@ const docTemplate = `{
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "猪批次关联的猪栏ID列表",
|
||||
"description": "待分配的猪栏ID列表",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.PigBatchUpdatePensRequest"
|
||||
"$ref": "#/definitions/dto.AssignEmptyPensToBatchRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "更新成功",
|
||||
"description": "分配成功",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/api/v1/pig-batches/{id}/move-pigs-into-pen": {
|
||||
"post": {
|
||||
"description": "将指定数量的猪只从批次的“虚拟库存”移入一个已分配的猪栏",
|
||||
"consumes": [
|
||||
"application/json"
|
||||
],
|
||||
"produces": [
|
||||
"application/json"
|
||||
],
|
||||
"tags": [
|
||||
"猪批次管理"
|
||||
],
|
||||
"summary": "将猪只从“虚拟库存”移入指定猪栏",
|
||||
"parameters": [
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "猪批次ID",
|
||||
"name": "id",
|
||||
"in": "path",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"description": "移入猪只请求信息 (包含目标猪栏ID、数量和备注)",
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/dto.MovePigsIntoPenRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "移入成功",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/controller.Response"
|
||||
}
|
||||
@@ -1809,6 +1927,9 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.AssignEmptyPensToBatchRequest": {
|
||||
"type": "object"
|
||||
},
|
||||
"dto.CreateAreaControllerRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
@@ -2144,6 +2265,28 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.MovePigsIntoPenRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"quantity",
|
||||
"toPenID"
|
||||
],
|
||||
"properties": {
|
||||
"quantity": {
|
||||
"description": "移入猪只数量",
|
||||
"type": "integer",
|
||||
"minimum": 1
|
||||
},
|
||||
"remarks": {
|
||||
"description": "备注",
|
||||
"type": "string"
|
||||
},
|
||||
"toPenID": {
|
||||
"description": "目标猪栏ID",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.PenResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -2298,9 +2441,6 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.PigBatchUpdatePensRequest": {
|
||||
"type": "object"
|
||||
},
|
||||
"dto.PigHouseResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -2380,6 +2520,27 @@ const docTemplate = `{
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.ReclassifyPenToNewBatchRequest": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"penID",
|
||||
"toBatchID"
|
||||
],
|
||||
"properties": {
|
||||
"penID": {
|
||||
"description": "待划拨的猪栏ID",
|
||||
"type": "integer"
|
||||
},
|
||||
"remarks": {
|
||||
"description": "备注",
|
||||
"type": "string"
|
||||
},
|
||||
"toBatchID": {
|
||||
"description": "目标猪批次ID",
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
},
|
||||
"dto.SubPlanResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
|
||||
Reference in New Issue
Block a user