删除原有食物逻辑和模型

新增原料和营养价值表和原料库存日志和营养表定义
This commit is contained in:
2025-11-18 22:22:31 +08:00
parent 200a358933
commit e1399be538
15 changed files with 289 additions and 1898 deletions

View File

@@ -56,13 +56,13 @@ const docTemplate = `{
},
{
"enum": [
"Debug",
"Info",
"Warn",
"Error",
"DPanic",
"Panic",
"Fatal"
"debug",
"info",
"warn",
"error",
"dpanic",
"panic",
"fatal"
],
"type": "string",
"x-enum-varnames": [
@@ -172,13 +172,13 @@ const docTemplate = `{
},
{
"enum": [
"Debug",
"Info",
"Warn",
"Error",
"DPanic",
"Panic",
"Fatal"
"debug",
"info",
"warn",
"error",
"dpanic",
"panic",
"fatal"
],
"type": "string",
"x-enum-varnames": [
@@ -453,13 +453,13 @@ const docTemplate = `{
},
{
"enum": [
"Debug",
"Info",
"Warn",
"Error",
"DPanic",
"Panic",
"Fatal"
"debug",
"info",
"warn",
"error",
"dpanic",
"panic",
"fatal"
],
"type": "string",
"x-enum-varnames": [
@@ -740,13 +740,13 @@ const docTemplate = `{
"parameters": [
{
"enum": [
"Debug",
"Info",
"Warn",
"Error",
"DPanic",
"Panic",
"Fatal"
"debug",
"info",
"warn",
"error",
"dpanic",
"panic",
"fatal"
],
"type": "string",
"x-enum-varnames": [
@@ -1719,85 +1719,6 @@ const docTemplate = `{
}
}
},
"/api/v1/monitor/feed-usage-records": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "根据提供的过滤条件,分页获取饲料使用记录",
"produces": [
"application/json"
],
"tags": [
"数据监控"
],
"summary": "获取饲料使用记录列表",
"parameters": [
{
"type": "string",
"name": "end_time",
"in": "query"
},
{
"type": "integer",
"name": "feed_formula_id",
"in": "query"
},
{
"type": "integer",
"name": "operator_id",
"in": "query"
},
{
"type": "string",
"name": "order_by",
"in": "query"
},
{
"type": "integer",
"name": "page",
"in": "query"
},
{
"type": "integer",
"name": "page_size",
"in": "query"
},
{
"type": "integer",
"name": "pen_id",
"in": "query"
},
{
"type": "string",
"name": "start_time",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/controller.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/dto.ListFeedUsageRecordResponse"
}
}
}
]
}
}
}
}
},
"/api/v1/monitor/medication-logs": {
"get": {
"security": [
@@ -1905,6 +1826,7 @@ const docTemplate = `{
},
{
"enum": [
7,
-1,
0,
1,
@@ -1914,12 +1836,12 @@ const docTemplate = `{
5,
-1,
5,
6,
7
6
],
"type": "integer",
"format": "int32",
"x-enum-varnames": [
"_numLevels",
"DebugLevel",
"InfoLevel",
"WarnLevel",
@@ -1929,8 +1851,7 @@ const docTemplate = `{
"FatalLevel",
"_minLevel",
"_maxLevel",
"InvalidLevel",
"_numLevels"
"InvalidLevel"
],
"name": "level",
"in": "query"
@@ -2588,159 +2509,6 @@ const docTemplate = `{
}
}
},
"/api/v1/monitor/raw-material-purchases": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "根据提供的过滤条件,分页获取原料采购记录",
"produces": [
"application/json"
],
"tags": [
"数据监控"
],
"summary": "获取原料采购记录列表",
"parameters": [
{
"type": "string",
"name": "end_time",
"in": "query"
},
{
"type": "string",
"name": "order_by",
"in": "query"
},
{
"type": "integer",
"name": "page",
"in": "query"
},
{
"type": "integer",
"name": "page_size",
"in": "query"
},
{
"type": "integer",
"name": "raw_material_id",
"in": "query"
},
{
"type": "string",
"name": "start_time",
"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.ListRawMaterialPurchaseResponse"
}
}
}
]
}
}
}
}
},
"/api/v1/monitor/raw-material-stock-logs": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "根据提供的过滤条件,分页获取原料库存日志",
"produces": [
"application/json"
],
"tags": [
"数据监控"
],
"summary": "获取原料库存日志列表",
"parameters": [
{
"type": "string",
"name": "end_time",
"in": "query"
},
{
"type": "string",
"name": "order_by",
"in": "query"
},
{
"type": "integer",
"name": "page",
"in": "query"
},
{
"type": "integer",
"name": "page_size",
"in": "query"
},
{
"type": "integer",
"name": "raw_material_id",
"in": "query"
},
{
"type": "integer",
"name": "source_id",
"in": "query"
},
{
"type": "string",
"name": "source_type",
"in": "query"
},
{
"type": "string",
"name": "start_time",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/controller.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/dto.ListRawMaterialStockLogResponse"
}
}
}
]
}
}
}
}
},
"/api/v1/monitor/sensor-data": {
"get": {
"security": [
@@ -5645,49 +5413,6 @@ const docTemplate = `{
}
}
},
"dto.FeedFormulaDTO": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
}
}
},
"dto.FeedUsageRecordDTO": {
"type": "object",
"properties": {
"amount": {
"type": "number"
},
"feed_formula": {
"$ref": "#/definitions/dto.FeedFormulaDTO"
},
"feed_formula_id": {
"type": "integer"
},
"id": {
"type": "integer"
},
"operator_id": {
"type": "integer"
},
"pen": {
"$ref": "#/definitions/dto.PenDTO"
},
"pen_id": {
"type": "integer"
},
"recorded_at": {
"type": "string"
},
"remarks": {
"type": "string"
}
}
},
"dto.HistoricalAlarmDTO": {
"type": "object",
"properties": {
@@ -5782,20 +5507,6 @@ const docTemplate = `{
}
}
},
"dto.ListFeedUsageRecordResponse": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.FeedUsageRecordDTO"
}
},
"pagination": {
"$ref": "#/definitions/dto.PaginationDTO"
}
}
},
"dto.ListHistoricalAlarmResponse": {
"type": "object",
"properties": {
@@ -5951,34 +5662,6 @@ const docTemplate = `{
}
}
},
"dto.ListRawMaterialPurchaseResponse": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.RawMaterialPurchaseDTO"
}
},
"pagination": {
"$ref": "#/definitions/dto.PaginationDTO"
}
}
},
"dto.ListRawMaterialStockLogResponse": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.RawMaterialStockLogDTO"
}
},
"pagination": {
"$ref": "#/definitions/dto.PaginationDTO"
}
}
},
"dto.ListSensorDataResponse": {
"type": "object",
"properties": {
@@ -6216,17 +5899,6 @@ const docTemplate = `{
}
}
},
"dto.PenDTO": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
}
}
},
"dto.PenResponse": {
"type": "object",
"properties": {
@@ -6733,75 +6405,6 @@ const docTemplate = `{
}
}
},
"dto.RawMaterialDTO": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
}
}
},
"dto.RawMaterialPurchaseDTO": {
"type": "object",
"properties": {
"amount": {
"type": "number"
},
"created_at": {
"type": "string"
},
"id": {
"type": "integer"
},
"purchase_date": {
"type": "string"
},
"raw_material": {
"$ref": "#/definitions/dto.RawMaterialDTO"
},
"raw_material_id": {
"type": "integer"
},
"supplier": {
"type": "string"
},
"total_price": {
"type": "number"
},
"unit_price": {
"type": "number"
}
}
},
"dto.RawMaterialStockLogDTO": {
"type": "object",
"properties": {
"change_amount": {
"type": "number"
},
"happened_at": {
"type": "string"
},
"id": {
"type": "integer"
},
"raw_material_id": {
"type": "integer"
},
"remarks": {
"type": "string"
},
"source_id": {
"type": "integer"
},
"source_type": {
"$ref": "#/definitions/models.StockLogSourceType"
}
}
},
"dto.ReclassifyPenToNewBatchRequest": {
"type": "object",
"required": [
@@ -8140,13 +7743,13 @@ const docTemplate = `{
"models.SeverityLevel": {
"type": "string",
"enum": [
"Debug",
"Info",
"Warn",
"Error",
"DPanic",
"Panic",
"Fatal"
"debug",
"info",
"warn",
"error",
"dpanic",
"panic",
"fatal"
],
"x-enum-varnames": [
"DebugLevel",
@@ -8158,25 +7761,6 @@ const docTemplate = `{
"FatalLevel"
]
},
"models.StockLogSourceType": {
"type": "string",
"enum": [
"采购入库",
"饲喂出库",
"变质出库",
"售卖出库",
"杂用领取",
"手动盘点"
],
"x-enum-varnames": [
"StockLogSourcePurchase",
"StockLogSourceFeeding",
"StockLogSourceDeteriorate",
"StockLogSourceSale",
"StockLogSourceMiscellaneous",
"StockLogSourceManual"
]
},
"models.TaskType": {
"type": "string",
"enum": [
@@ -8185,6 +7769,7 @@ const docTemplate = `{
"下料",
"全量采集",
"告警通知",
"通知刷新",
"设备阈值检查",
"区域阈值检查"
],
@@ -8194,6 +7779,7 @@ const docTemplate = `{
"TaskTypeAreaCollectorThresholdCheck": "区域阈值检查任务",
"TaskTypeDeviceThresholdCheck": "设备阈值检查任务",
"TaskTypeFullCollection": "新增的全量采集任务",
"TaskTypeNotificationRefresh": "通知刷新任务",
"TaskTypeReleaseFeedWeight": "下料口释放指定重量任务",
"TaskTypeWaiting": "等待任务"
},
@@ -8203,6 +7789,7 @@ const docTemplate = `{
"下料口释放指定重量任务",
"新增的全量采集任务",
"告警通知任务",
"通知刷新任务",
"设备阈值检查任务",
"区域阈值检查任务"
],
@@ -8212,6 +7799,7 @@ const docTemplate = `{
"TaskTypeReleaseFeedWeight",
"TaskTypeFullCollection",
"TaskTypeAlarmNotification",
"TaskTypeNotificationRefresh",
"TaskTypeDeviceThresholdCheck",
"TaskTypeAreaCollectorThresholdCheck"
]
@@ -8249,6 +7837,7 @@ const docTemplate = `{
"type": "integer",
"format": "int32",
"enum": [
7,
-1,
0,
1,
@@ -8258,10 +7847,10 @@ const docTemplate = `{
5,
-1,
5,
6,
7
6
],
"x-enum-varnames": [
"_numLevels",
"DebugLevel",
"InfoLevel",
"WarnLevel",
@@ -8271,8 +7860,7 @@ const docTemplate = `{
"FatalLevel",
"_minLevel",
"_maxLevel",
"InvalidLevel",
"_numLevels"
"InvalidLevel"
]
}
},

View File

@@ -48,13 +48,13 @@
},
{
"enum": [
"Debug",
"Info",
"Warn",
"Error",
"DPanic",
"Panic",
"Fatal"
"debug",
"info",
"warn",
"error",
"dpanic",
"panic",
"fatal"
],
"type": "string",
"x-enum-varnames": [
@@ -164,13 +164,13 @@
},
{
"enum": [
"Debug",
"Info",
"Warn",
"Error",
"DPanic",
"Panic",
"Fatal"
"debug",
"info",
"warn",
"error",
"dpanic",
"panic",
"fatal"
],
"type": "string",
"x-enum-varnames": [
@@ -445,13 +445,13 @@
},
{
"enum": [
"Debug",
"Info",
"Warn",
"Error",
"DPanic",
"Panic",
"Fatal"
"debug",
"info",
"warn",
"error",
"dpanic",
"panic",
"fatal"
],
"type": "string",
"x-enum-varnames": [
@@ -732,13 +732,13 @@
"parameters": [
{
"enum": [
"Debug",
"Info",
"Warn",
"Error",
"DPanic",
"Panic",
"Fatal"
"debug",
"info",
"warn",
"error",
"dpanic",
"panic",
"fatal"
],
"type": "string",
"x-enum-varnames": [
@@ -1711,85 +1711,6 @@
}
}
},
"/api/v1/monitor/feed-usage-records": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "根据提供的过滤条件,分页获取饲料使用记录",
"produces": [
"application/json"
],
"tags": [
"数据监控"
],
"summary": "获取饲料使用记录列表",
"parameters": [
{
"type": "string",
"name": "end_time",
"in": "query"
},
{
"type": "integer",
"name": "feed_formula_id",
"in": "query"
},
{
"type": "integer",
"name": "operator_id",
"in": "query"
},
{
"type": "string",
"name": "order_by",
"in": "query"
},
{
"type": "integer",
"name": "page",
"in": "query"
},
{
"type": "integer",
"name": "page_size",
"in": "query"
},
{
"type": "integer",
"name": "pen_id",
"in": "query"
},
{
"type": "string",
"name": "start_time",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/controller.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/dto.ListFeedUsageRecordResponse"
}
}
}
]
}
}
}
}
},
"/api/v1/monitor/medication-logs": {
"get": {
"security": [
@@ -1897,6 +1818,7 @@
},
{
"enum": [
7,
-1,
0,
1,
@@ -1906,12 +1828,12 @@
5,
-1,
5,
6,
7
6
],
"type": "integer",
"format": "int32",
"x-enum-varnames": [
"_numLevels",
"DebugLevel",
"InfoLevel",
"WarnLevel",
@@ -1921,8 +1843,7 @@
"FatalLevel",
"_minLevel",
"_maxLevel",
"InvalidLevel",
"_numLevels"
"InvalidLevel"
],
"name": "level",
"in": "query"
@@ -2580,159 +2501,6 @@
}
}
},
"/api/v1/monitor/raw-material-purchases": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "根据提供的过滤条件,分页获取原料采购记录",
"produces": [
"application/json"
],
"tags": [
"数据监控"
],
"summary": "获取原料采购记录列表",
"parameters": [
{
"type": "string",
"name": "end_time",
"in": "query"
},
{
"type": "string",
"name": "order_by",
"in": "query"
},
{
"type": "integer",
"name": "page",
"in": "query"
},
{
"type": "integer",
"name": "page_size",
"in": "query"
},
{
"type": "integer",
"name": "raw_material_id",
"in": "query"
},
{
"type": "string",
"name": "start_time",
"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.ListRawMaterialPurchaseResponse"
}
}
}
]
}
}
}
}
},
"/api/v1/monitor/raw-material-stock-logs": {
"get": {
"security": [
{
"BearerAuth": []
}
],
"description": "根据提供的过滤条件,分页获取原料库存日志",
"produces": [
"application/json"
],
"tags": [
"数据监控"
],
"summary": "获取原料库存日志列表",
"parameters": [
{
"type": "string",
"name": "end_time",
"in": "query"
},
{
"type": "string",
"name": "order_by",
"in": "query"
},
{
"type": "integer",
"name": "page",
"in": "query"
},
{
"type": "integer",
"name": "page_size",
"in": "query"
},
{
"type": "integer",
"name": "raw_material_id",
"in": "query"
},
{
"type": "integer",
"name": "source_id",
"in": "query"
},
{
"type": "string",
"name": "source_type",
"in": "query"
},
{
"type": "string",
"name": "start_time",
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"allOf": [
{
"$ref": "#/definitions/controller.Response"
},
{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/dto.ListRawMaterialStockLogResponse"
}
}
}
]
}
}
}
}
},
"/api/v1/monitor/sensor-data": {
"get": {
"security": [
@@ -5637,49 +5405,6 @@
}
}
},
"dto.FeedFormulaDTO": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
}
}
},
"dto.FeedUsageRecordDTO": {
"type": "object",
"properties": {
"amount": {
"type": "number"
},
"feed_formula": {
"$ref": "#/definitions/dto.FeedFormulaDTO"
},
"feed_formula_id": {
"type": "integer"
},
"id": {
"type": "integer"
},
"operator_id": {
"type": "integer"
},
"pen": {
"$ref": "#/definitions/dto.PenDTO"
},
"pen_id": {
"type": "integer"
},
"recorded_at": {
"type": "string"
},
"remarks": {
"type": "string"
}
}
},
"dto.HistoricalAlarmDTO": {
"type": "object",
"properties": {
@@ -5774,20 +5499,6 @@
}
}
},
"dto.ListFeedUsageRecordResponse": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.FeedUsageRecordDTO"
}
},
"pagination": {
"$ref": "#/definitions/dto.PaginationDTO"
}
}
},
"dto.ListHistoricalAlarmResponse": {
"type": "object",
"properties": {
@@ -5943,34 +5654,6 @@
}
}
},
"dto.ListRawMaterialPurchaseResponse": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.RawMaterialPurchaseDTO"
}
},
"pagination": {
"$ref": "#/definitions/dto.PaginationDTO"
}
}
},
"dto.ListRawMaterialStockLogResponse": {
"type": "object",
"properties": {
"list": {
"type": "array",
"items": {
"$ref": "#/definitions/dto.RawMaterialStockLogDTO"
}
},
"pagination": {
"$ref": "#/definitions/dto.PaginationDTO"
}
}
},
"dto.ListSensorDataResponse": {
"type": "object",
"properties": {
@@ -6208,17 +5891,6 @@
}
}
},
"dto.PenDTO": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
}
}
},
"dto.PenResponse": {
"type": "object",
"properties": {
@@ -6725,75 +6397,6 @@
}
}
},
"dto.RawMaterialDTO": {
"type": "object",
"properties": {
"id": {
"type": "integer"
},
"name": {
"type": "string"
}
}
},
"dto.RawMaterialPurchaseDTO": {
"type": "object",
"properties": {
"amount": {
"type": "number"
},
"created_at": {
"type": "string"
},
"id": {
"type": "integer"
},
"purchase_date": {
"type": "string"
},
"raw_material": {
"$ref": "#/definitions/dto.RawMaterialDTO"
},
"raw_material_id": {
"type": "integer"
},
"supplier": {
"type": "string"
},
"total_price": {
"type": "number"
},
"unit_price": {
"type": "number"
}
}
},
"dto.RawMaterialStockLogDTO": {
"type": "object",
"properties": {
"change_amount": {
"type": "number"
},
"happened_at": {
"type": "string"
},
"id": {
"type": "integer"
},
"raw_material_id": {
"type": "integer"
},
"remarks": {
"type": "string"
},
"source_id": {
"type": "integer"
},
"source_type": {
"$ref": "#/definitions/models.StockLogSourceType"
}
}
},
"dto.ReclassifyPenToNewBatchRequest": {
"type": "object",
"required": [
@@ -8132,13 +7735,13 @@
"models.SeverityLevel": {
"type": "string",
"enum": [
"Debug",
"Info",
"Warn",
"Error",
"DPanic",
"Panic",
"Fatal"
"debug",
"info",
"warn",
"error",
"dpanic",
"panic",
"fatal"
],
"x-enum-varnames": [
"DebugLevel",
@@ -8150,25 +7753,6 @@
"FatalLevel"
]
},
"models.StockLogSourceType": {
"type": "string",
"enum": [
"采购入库",
"饲喂出库",
"变质出库",
"售卖出库",
"杂用领取",
"手动盘点"
],
"x-enum-varnames": [
"StockLogSourcePurchase",
"StockLogSourceFeeding",
"StockLogSourceDeteriorate",
"StockLogSourceSale",
"StockLogSourceMiscellaneous",
"StockLogSourceManual"
]
},
"models.TaskType": {
"type": "string",
"enum": [
@@ -8177,6 +7761,7 @@
"下料",
"全量采集",
"告警通知",
"通知刷新",
"设备阈值检查",
"区域阈值检查"
],
@@ -8186,6 +7771,7 @@
"TaskTypeAreaCollectorThresholdCheck": "区域阈值检查任务",
"TaskTypeDeviceThresholdCheck": "设备阈值检查任务",
"TaskTypeFullCollection": "新增的全量采集任务",
"TaskTypeNotificationRefresh": "通知刷新任务",
"TaskTypeReleaseFeedWeight": "下料口释放指定重量任务",
"TaskTypeWaiting": "等待任务"
},
@@ -8195,6 +7781,7 @@
"下料口释放指定重量任务",
"新增的全量采集任务",
"告警通知任务",
"通知刷新任务",
"设备阈值检查任务",
"区域阈值检查任务"
],
@@ -8204,6 +7791,7 @@
"TaskTypeReleaseFeedWeight",
"TaskTypeFullCollection",
"TaskTypeAlarmNotification",
"TaskTypeNotificationRefresh",
"TaskTypeDeviceThresholdCheck",
"TaskTypeAreaCollectorThresholdCheck"
]
@@ -8241,6 +7829,7 @@
"type": "integer",
"format": "int32",
"enum": [
7,
-1,
0,
1,
@@ -8250,10 +7839,10 @@
5,
-1,
5,
6,
7
6
],
"x-enum-varnames": [
"_numLevels",
"DebugLevel",
"InfoLevel",
"WarnLevel",
@@ -8263,8 +7852,7 @@
"FatalLevel",
"_minLevel",
"_maxLevel",
"InvalidLevel",
"_numLevels"
"InvalidLevel"
]
}
},

View File

@@ -432,34 +432,6 @@ definitions:
thresholds:
type: number
type: object
dto.FeedFormulaDTO:
properties:
id:
type: integer
name:
type: string
type: object
dto.FeedUsageRecordDTO:
properties:
amount:
type: number
feed_formula:
$ref: '#/definitions/dto.FeedFormulaDTO'
feed_formula_id:
type: integer
id:
type: integer
operator_id:
type: integer
pen:
$ref: '#/definitions/dto.PenDTO'
pen_id:
type: integer
recorded_at:
type: string
remarks:
type: string
type: object
dto.HistoricalAlarmDTO:
properties:
alarm_code:
@@ -521,15 +493,6 @@ definitions:
pagination:
$ref: '#/definitions/dto.PaginationDTO'
type: object
dto.ListFeedUsageRecordResponse:
properties:
list:
items:
$ref: '#/definitions/dto.FeedUsageRecordDTO'
type: array
pagination:
$ref: '#/definitions/dto.PaginationDTO'
type: object
dto.ListHistoricalAlarmResponse:
properties:
list:
@@ -630,24 +593,6 @@ definitions:
example: 100
type: integer
type: object
dto.ListRawMaterialPurchaseResponse:
properties:
list:
items:
$ref: '#/definitions/dto.RawMaterialPurchaseDTO'
type: array
pagination:
$ref: '#/definitions/dto.PaginationDTO'
type: object
dto.ListRawMaterialStockLogResponse:
properties:
list:
items:
$ref: '#/definitions/dto.RawMaterialStockLogDTO'
type: array
pagination:
$ref: '#/definitions/dto.PaginationDTO'
type: object
dto.ListSensorDataResponse:
properties:
list:
@@ -806,13 +751,6 @@ definitions:
total:
type: integer
type: object
dto.PenDTO:
properties:
id:
type: integer
name:
type: string
type: object
dto.PenResponse:
properties:
capacity:
@@ -1142,51 +1080,6 @@ definitions:
$ref: '#/definitions/dto.TaskResponse'
type: array
type: object
dto.RawMaterialDTO:
properties:
id:
type: integer
name:
type: string
type: object
dto.RawMaterialPurchaseDTO:
properties:
amount:
type: number
created_at:
type: string
id:
type: integer
purchase_date:
type: string
raw_material:
$ref: '#/definitions/dto.RawMaterialDTO'
raw_material_id:
type: integer
supplier:
type: string
total_price:
type: number
unit_price:
type: number
type: object
dto.RawMaterialStockLogDTO:
properties:
change_amount:
type: number
happened_at:
type: string
id:
type: integer
raw_material_id:
type: integer
remarks:
type: string
source_id:
type: integer
source_type:
$ref: '#/definitions/models.StockLogSourceType'
type: object
dto.ReclassifyPenToNewBatchRequest:
properties:
pen_id:
@@ -2159,13 +2052,13 @@ definitions:
- SensorTypeWeight
models.SeverityLevel:
enum:
- Debug
- Info
- Warn
- Error
- DPanic
- Panic
- Fatal
- debug
- info
- warn
- error
- dpanic
- panic
- fatal
type: string
x-enum-varnames:
- DebugLevel
@@ -2175,22 +2068,6 @@ definitions:
- DPanicLevel
- PanicLevel
- FatalLevel
models.StockLogSourceType:
enum:
- 采购入库
- 饲喂出库
- 变质出库
- 售卖出库
- 杂用领取
- 手动盘点
type: string
x-enum-varnames:
- StockLogSourcePurchase
- StockLogSourceFeeding
- StockLogSourceDeteriorate
- StockLogSourceSale
- StockLogSourceMiscellaneous
- StockLogSourceManual
models.TaskType:
enum:
- 计划分析
@@ -2198,6 +2075,7 @@ definitions:
- 下料
- 全量采集
- 告警通知
- 通知刷新
- 设备阈值检查
- 区域阈值检查
type: string
@@ -2207,6 +2085,7 @@ definitions:
TaskTypeAreaCollectorThresholdCheck: 区域阈值检查任务
TaskTypeDeviceThresholdCheck: 设备阈值检查任务
TaskTypeFullCollection: 新增的全量采集任务
TaskTypeNotificationRefresh: 通知刷新任务
TaskTypeReleaseFeedWeight: 下料口释放指定重量任务
TaskTypeWaiting: 等待任务
x-enum-descriptions:
@@ -2215,6 +2094,7 @@ definitions:
- 下料口释放指定重量任务
- 新增的全量采集任务
- 告警通知任务
- 通知刷新任务
- 设备阈值检查任务
- 区域阈值检查任务
x-enum-varnames:
@@ -2223,6 +2103,7 @@ definitions:
- TaskTypeReleaseFeedWeight
- TaskTypeFullCollection
- TaskTypeAlarmNotification
- TaskTypeNotificationRefresh
- TaskTypeDeviceThresholdCheck
- TaskTypeAreaCollectorThresholdCheck
models.ValueDescriptor:
@@ -2248,6 +2129,7 @@ definitions:
- PlanTypeFilterSystem
zapcore.Level:
enum:
- 7
- -1
- 0
- 1
@@ -2258,10 +2140,10 @@ definitions:
- -1
- 5
- 6
- 7
format: int32
type: integer
x-enum-varnames:
- _numLevels
- DebugLevel
- InfoLevel
- WarnLevel
@@ -2272,7 +2154,6 @@ definitions:
- _minLevel
- _maxLevel
- InvalidLevel
- _numLevels
info:
contact:
email: divano@example.com
@@ -2353,13 +2234,13 @@ paths:
type: boolean
- description: 按告警严重性等级过滤
enum:
- Debug
- Info
- Warn
- Error
- DPanic
- Panic
- Fatal
- debug
- info
- warn
- error
- dpanic
- panic
- fatal
in: query
name: level
type: string
@@ -2430,13 +2311,13 @@ paths:
type: integer
- description: 按告警等级过滤
enum:
- Debug
- Info
- Warn
- Error
- DPanic
- Panic
- Fatal
- debug
- info
- warn
- error
- dpanic
- panic
- fatal
in: query
name: level
type: string
@@ -2612,13 +2493,13 @@ paths:
type: integer
- description: 按告警等级过滤
enum:
- Debug
- Info
- Warn
- Error
- DPanic
- Panic
- Fatal
- debug
- info
- warn
- error
- dpanic
- panic
- fatal
in: query
name: level
type: string
@@ -2798,13 +2679,13 @@ paths:
parameters:
- description: 按告警严重性等级过滤
enum:
- Debug
- Info
- Warn
- Error
- DPanic
- Panic
- Fatal
- debug
- info
- warn
- error
- dpanic
- panic
- fatal
in: query
name: level
type: string
@@ -3333,51 +3214,6 @@ paths:
summary: 获取设备命令日志列表
tags:
- 数据监控
/api/v1/monitor/feed-usage-records:
get:
description: 根据提供的过滤条件,分页获取饲料使用记录
parameters:
- in: query
name: end_time
type: string
- in: query
name: feed_formula_id
type: integer
- in: query
name: operator_id
type: integer
- in: query
name: order_by
type: string
- in: query
name: page
type: integer
- in: query
name: page_size
type: integer
- in: query
name: pen_id
type: integer
- in: query
name: start_time
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/controller.Response'
- properties:
data:
$ref: '#/definitions/dto.ListFeedUsageRecordResponse'
type: object
security:
- BearerAuth: []
summary: 获取饲料使用记录列表
tags:
- 数据监控
/api/v1/monitor/medication-logs:
get:
description: 根据提供的过滤条件,分页获取用药记录
@@ -3434,6 +3270,7 @@ paths:
name: end_time
type: string
- enum:
- 7
- -1
- 0
- 1
@@ -3444,12 +3281,12 @@ paths:
- -1
- 5
- 6
- 7
format: int32
in: query
name: level
type: integer
x-enum-varnames:
- _numLevels
- DebugLevel
- InfoLevel
- WarnLevel
@@ -3460,7 +3297,6 @@ paths:
- _minLevel
- _maxLevel
- InvalidLevel
- _numLevels
- enum:
- 邮件
- 企业微信
@@ -3846,93 +3682,6 @@ paths:
summary: 获取计划执行日志列表
tags:
- 数据监控
/api/v1/monitor/raw-material-purchases:
get:
description: 根据提供的过滤条件,分页获取原料采购记录
parameters:
- in: query
name: end_time
type: string
- in: query
name: order_by
type: string
- in: query
name: page
type: integer
- in: query
name: page_size
type: integer
- in: query
name: raw_material_id
type: integer
- in: query
name: start_time
type: string
- in: query
name: supplier
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/controller.Response'
- properties:
data:
$ref: '#/definitions/dto.ListRawMaterialPurchaseResponse'
type: object
security:
- BearerAuth: []
summary: 获取原料采购记录列表
tags:
- 数据监控
/api/v1/monitor/raw-material-stock-logs:
get:
description: 根据提供的过滤条件,分页获取原料库存日志
parameters:
- in: query
name: end_time
type: string
- in: query
name: order_by
type: string
- in: query
name: page
type: integer
- in: query
name: page_size
type: integer
- in: query
name: raw_material_id
type: integer
- in: query
name: source_id
type: integer
- in: query
name: source_type
type: string
- in: query
name: start_time
type: string
produces:
- application/json
responses:
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/controller.Response'
- properties:
data:
$ref: '#/definitions/dto.ListRawMaterialStockLogResponse'
type: object
security:
- BearerAuth: []
summary: 获取原料库存日志列表
tags:
- 数据监控
/api/v1/monitor/sensor-data:
get:
description: 根据提供的过滤条件,分页获取传感器数据