ManualControl
This commit is contained in:
1056
docs/docs.go
1056
docs/docs.go
File diff suppressed because it is too large
Load Diff
1056
docs/swagger.json
1056
docs/swagger.json
File diff suppressed because it is too large
Load Diff
@@ -334,6 +334,15 @@ definitions:
|
||||
example: testuser
|
||||
type: string
|
||||
type: object
|
||||
dto.ManualControlDeviceRequest:
|
||||
properties:
|
||||
action:
|
||||
description: Action 不传表示这是一个传感器, 会触发一次采集
|
||||
enum:
|
||||
- "on"
|
||||
- "off"
|
||||
type: string
|
||||
type: object
|
||||
dto.MovePigsIntoPenRequest:
|
||||
properties:
|
||||
quantity:
|
||||
@@ -1462,6 +1471,33 @@ paths:
|
||||
summary: 更新设备信息
|
||||
tags:
|
||||
- 设备管理
|
||||
/api/v1/devices/manual-control/{id}:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 根据设备ID和指定的动作(开启或关闭)来手动控制设备
|
||||
parameters:
|
||||
- description: 设备ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: string
|
||||
- description: 手动控制指令
|
||||
in: body
|
||||
name: manualControl
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ManualControlDeviceRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: OK
|
||||
schema:
|
||||
$ref: '#/definitions/controller.Response'
|
||||
summary: 手动控制设备
|
||||
tags:
|
||||
- 设备管理
|
||||
/api/v1/pens:
|
||||
get:
|
||||
description: 获取所有猪栏的列表
|
||||
@@ -1664,57 +1700,6 @@ paths:
|
||||
summary: 创建猪批次
|
||||
tags:
|
||||
- 猪群管理
|
||||
/api/v1/pig-batches/{batchID}/remove-pen/{penID}:
|
||||
delete:
|
||||
description: 将一个空闲猪栏从指定的猪批次中移除
|
||||
parameters:
|
||||
- description: 猪批次ID
|
||||
in: path
|
||||
name: batchID
|
||||
required: true
|
||||
type: integer
|
||||
- description: 待移除的猪栏ID
|
||||
in: path
|
||||
name: penID
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: 移除成功
|
||||
schema:
|
||||
$ref: '#/definitions/controller.Response'
|
||||
summary: 从猪批次移除空栏
|
||||
tags:
|
||||
- 猪群管理
|
||||
/api/v1/pig-batches/{fromBatchID}/reclassify-pen:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 将一个猪栏(连同其中的猪只)从一个批次整体划拨到另一个批次
|
||||
parameters:
|
||||
- description: 源猪批次ID
|
||||
in: path
|
||||
name: fromBatchID
|
||||
required: true
|
||||
type: integer
|
||||
- description: 划拨请求信息 (包含目标批次ID、猪栏ID和备注)
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ReclassifyPenToNewBatchRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: 划拨成功
|
||||
schema:
|
||||
$ref: '#/definitions/controller.Response'
|
||||
summary: 将猪栏划拨到新批次
|
||||
tags:
|
||||
- 猪群管理
|
||||
/api/v1/pig-batches/{id}:
|
||||
delete:
|
||||
description: 根据ID删除一个猪批次
|
||||
@@ -1788,7 +1773,7 @@ paths:
|
||||
summary: 更新猪批次
|
||||
tags:
|
||||
- 猪群管理
|
||||
/api/v1/pig-batches/{id}/assign-pens:
|
||||
/api/v1/pig-batches/assign-pens/{id}:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -1815,7 +1800,7 @@ paths:
|
||||
summary: 为猪批次分配空栏
|
||||
tags:
|
||||
- 猪群管理
|
||||
/api/v1/pig-batches/{id}/buy-pigs:
|
||||
/api/v1/pig-batches/buy-pigs/{id}:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -1841,8 +1826,8 @@ paths:
|
||||
$ref: '#/definitions/controller.Response'
|
||||
summary: 处理买猪的业务逻辑
|
||||
tags:
|
||||
- 猪批次管理
|
||||
/api/v1/pig-batches/{id}/move-pigs-into-pen:
|
||||
- 猪群管理
|
||||
/api/v1/pig-batches/move-pigs-into-pen/{id}:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -1869,7 +1854,34 @@ paths:
|
||||
summary: 将猪只从“虚拟库存”移入指定猪栏
|
||||
tags:
|
||||
- 猪群管理
|
||||
/api/v1/pig-batches/{id}/record-cull:
|
||||
/api/v1/pig-batches/reclassify-pen/{fromBatchID}:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 将一个猪栏(连同其中的猪只)从一个批次整体划拨到另一个批次
|
||||
parameters:
|
||||
- description: 源猪批次ID
|
||||
in: path
|
||||
name: fromBatchID
|
||||
required: true
|
||||
type: integer
|
||||
- description: 划拨请求信息 (包含目标批次ID、猪栏ID和备注)
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/dto.ReclassifyPenToNewBatchRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: 划拨成功
|
||||
schema:
|
||||
$ref: '#/definitions/controller.Response'
|
||||
summary: 将猪栏划拨到新批次
|
||||
tags:
|
||||
- 猪群管理
|
||||
/api/v1/pig-batches/record-cull/{id}:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -1895,8 +1907,8 @@ paths:
|
||||
$ref: '#/definitions/controller.Response'
|
||||
summary: 记录正常猪只淘汰事件
|
||||
tags:
|
||||
- 猪批次管理
|
||||
/api/v1/pig-batches/{id}/record-death:
|
||||
- 猪群管理
|
||||
/api/v1/pig-batches/record-death/{id}:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -1922,8 +1934,8 @@ paths:
|
||||
$ref: '#/definitions/controller.Response'
|
||||
summary: 记录正常猪只死亡事件
|
||||
tags:
|
||||
- 猪批次管理
|
||||
/api/v1/pig-batches/{id}/record-sick-pig-cull:
|
||||
- 猪群管理
|
||||
/api/v1/pig-batches/record-sick-pig-cull/{id}:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -1949,8 +1961,8 @@ paths:
|
||||
$ref: '#/definitions/controller.Response'
|
||||
summary: 记录病猪淘汰事件
|
||||
tags:
|
||||
- 猪批次管理
|
||||
/api/v1/pig-batches/{id}/record-sick-pig-death:
|
||||
- 猪群管理
|
||||
/api/v1/pig-batches/record-sick-pig-death/{id}:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -1976,8 +1988,8 @@ paths:
|
||||
$ref: '#/definitions/controller.Response'
|
||||
summary: 记录病猪死亡事件
|
||||
tags:
|
||||
- 猪批次管理
|
||||
/api/v1/pig-batches/{id}/record-sick-pig-recovery:
|
||||
- 猪群管理
|
||||
/api/v1/pig-batches/record-sick-pig-recovery/{id}:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -2003,8 +2015,8 @@ paths:
|
||||
$ref: '#/definitions/controller.Response'
|
||||
summary: 记录病猪康复事件
|
||||
tags:
|
||||
- 猪批次管理
|
||||
/api/v1/pig-batches/{id}/record-sick-pigs:
|
||||
- 猪群管理
|
||||
/api/v1/pig-batches/record-sick-pigs/{id}:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -2030,8 +2042,32 @@ paths:
|
||||
$ref: '#/definitions/controller.Response'
|
||||
summary: 记录新增病猪事件
|
||||
tags:
|
||||
- 猪批次管理
|
||||
/api/v1/pig-batches/{id}/sell-pigs:
|
||||
- 猪群管理
|
||||
/api/v1/pig-batches/remove-pen/{penID}/{batchID}:
|
||||
delete:
|
||||
description: 将一个空闲猪栏从指定的猪批次中移除
|
||||
parameters:
|
||||
- description: 猪批次ID
|
||||
in: path
|
||||
name: batchID
|
||||
required: true
|
||||
type: integer
|
||||
- description: 待移除的猪栏ID
|
||||
in: path
|
||||
name: penID
|
||||
required: true
|
||||
type: integer
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: 移除成功
|
||||
schema:
|
||||
$ref: '#/definitions/controller.Response'
|
||||
summary: 从猪批次移除空栏
|
||||
tags:
|
||||
- 猪群管理
|
||||
/api/v1/pig-batches/sell-pigs/{id}:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -2057,35 +2093,8 @@ paths:
|
||||
$ref: '#/definitions/controller.Response'
|
||||
summary: 处理卖猪的业务逻辑
|
||||
tags:
|
||||
- 猪批次管理
|
||||
/api/v1/pig-batches/{id}/transfer-within-batch:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 将指定数量的猪只在同一个猪群的不同猪栏间调动
|
||||
parameters:
|
||||
- description: 猪批次ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 群内调栏请求信息
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/dto.TransferPigsWithinBatchRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: 调栏成功
|
||||
schema:
|
||||
$ref: '#/definitions/controller.Response'
|
||||
summary: 群内调栏
|
||||
tags:
|
||||
- 猪批次管理
|
||||
/api/v1/pig-batches/{sourceBatchID}/transfer-across-batches:
|
||||
- 猪群管理
|
||||
/api/v1/pig-batches/transfer-across-batches/{sourceBatchID}:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
@@ -2111,7 +2120,34 @@ paths:
|
||||
$ref: '#/definitions/controller.Response'
|
||||
summary: 跨猪群调栏
|
||||
tags:
|
||||
- 猪批次管理
|
||||
- 猪群管理
|
||||
/api/v1/pig-batches/transfer-within-batch/{id}:
|
||||
post:
|
||||
consumes:
|
||||
- application/json
|
||||
description: 将指定数量的猪只在同一个猪群的不同猪栏间调动
|
||||
parameters:
|
||||
- description: 猪批次ID
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
type: integer
|
||||
- description: 群内调栏请求信息
|
||||
in: body
|
||||
name: body
|
||||
required: true
|
||||
schema:
|
||||
$ref: '#/definitions/dto.TransferPigsWithinBatchRequest'
|
||||
produces:
|
||||
- application/json
|
||||
responses:
|
||||
"200":
|
||||
description: 调栏成功
|
||||
schema:
|
||||
$ref: '#/definitions/controller.Response'
|
||||
summary: 群内调栏
|
||||
tags:
|
||||
- 猪群管理
|
||||
/api/v1/pig-houses:
|
||||
get:
|
||||
description: 获取所有猪舍的列表
|
||||
|
||||
Reference in New Issue
Block a user