实现按原料是否有库存筛选

This commit is contained in:
2025-11-27 17:33:28 +08:00
parent e6b307b0dc
commit 3b12802900
7 changed files with 93 additions and 22 deletions

View File

@@ -3392,6 +3392,12 @@ const docTemplate = `{
],
"summary": "获取当前库存列表",
"parameters": [
{
"type": "boolean",
"description": "只查询有库存的原料",
"name": "has_stock",
"in": "query"
},
{
"type": "string",
"description": "排序字段, 例如 \"stock DESC\"",
@@ -3715,6 +3721,7 @@ const docTemplate = `{
},
{
"enum": [
7,
-1,
0,
1,
@@ -3724,12 +3731,12 @@ const docTemplate = `{
5,
-1,
5,
6,
7
6
],
"type": "integer",
"format": "int32",
"x-enum-varnames": [
"_numLevels",
"DebugLevel",
"InfoLevel",
"WarnLevel",
@@ -3739,8 +3746,7 @@ const docTemplate = `{
"FatalLevel",
"_minLevel",
"_maxLevel",
"InvalidLevel",
"_numLevels"
"InvalidLevel"
],
"name": "level",
"in": "query"
@@ -7267,6 +7273,10 @@ const docTemplate = `{
"type": "string",
"maxLength": 255
},
"max_addition_ratio": {
"description": "最大添加比例",
"type": "number"
},
"name": {
"description": "原料名称",
"type": "string",
@@ -8824,6 +8834,10 @@ const docTemplate = `{
"id": {
"type": "integer"
},
"max_addition_ratio": {
"description": "最大添加比例",
"type": "number"
},
"name": {
"type": "string"
},
@@ -9864,6 +9878,10 @@ const docTemplate = `{
"type": "string",
"maxLength": 255
},
"max_addition_ratio": {
"description": "最大添加比例",
"type": "number"
},
"name": {
"description": "原料名称",
"type": "string",
@@ -10586,6 +10604,7 @@ const docTemplate = `{
"type": "integer",
"format": "int32",
"enum": [
7,
-1,
0,
1,
@@ -10595,10 +10614,10 @@ const docTemplate = `{
5,
-1,
5,
6,
7
6
],
"x-enum-varnames": [
"_numLevels",
"DebugLevel",
"InfoLevel",
"WarnLevel",
@@ -10608,8 +10627,7 @@ const docTemplate = `{
"FatalLevel",
"_minLevel",
"_maxLevel",
"InvalidLevel",
"_numLevels"
"InvalidLevel"
]
}
},

View File

@@ -3384,6 +3384,12 @@
],
"summary": "获取当前库存列表",
"parameters": [
{
"type": "boolean",
"description": "只查询有库存的原料",
"name": "has_stock",
"in": "query"
},
{
"type": "string",
"description": "排序字段, 例如 \"stock DESC\"",
@@ -3707,6 +3713,7 @@
},
{
"enum": [
7,
-1,
0,
1,
@@ -3716,12 +3723,12 @@
5,
-1,
5,
6,
7
6
],
"type": "integer",
"format": "int32",
"x-enum-varnames": [
"_numLevels",
"DebugLevel",
"InfoLevel",
"WarnLevel",
@@ -3731,8 +3738,7 @@
"FatalLevel",
"_minLevel",
"_maxLevel",
"InvalidLevel",
"_numLevels"
"InvalidLevel"
],
"name": "level",
"in": "query"
@@ -7259,6 +7265,10 @@
"type": "string",
"maxLength": 255
},
"max_addition_ratio": {
"description": "最大添加比例",
"type": "number"
},
"name": {
"description": "原料名称",
"type": "string",
@@ -8816,6 +8826,10 @@
"id": {
"type": "integer"
},
"max_addition_ratio": {
"description": "最大添加比例",
"type": "number"
},
"name": {
"type": "string"
},
@@ -9856,6 +9870,10 @@
"type": "string",
"maxLength": 255
},
"max_addition_ratio": {
"description": "最大添加比例",
"type": "number"
},
"name": {
"description": "原料名称",
"type": "string",
@@ -10578,6 +10596,7 @@
"type": "integer",
"format": "int32",
"enum": [
7,
-1,
0,
1,
@@ -10587,10 +10606,10 @@
5,
-1,
5,
6,
7
6
],
"x-enum-varnames": [
"_numLevels",
"DebugLevel",
"InfoLevel",
"WarnLevel",
@@ -10600,8 +10619,7 @@
"FatalLevel",
"_minLevel",
"_maxLevel",
"InvalidLevel",
"_numLevels"
"InvalidLevel"
]
}
},

View File

@@ -416,6 +416,9 @@ definitions:
description: 描述
maxLength: 255
type: string
max_addition_ratio:
description: 最大添加比例
type: number
name:
description: 原料名称
maxLength: 100
@@ -1446,6 +1449,9 @@ definitions:
type: string
id:
type: integer
max_addition_ratio:
description: 最大添加比例
type: number
name:
type: string
raw_material_nutrients:
@@ -2160,6 +2166,9 @@ definitions:
description: 描述
maxLength: 255
type: string
max_addition_ratio:
description: 最大添加比例
type: number
name:
description: 原料名称
maxLength: 100
@@ -2731,6 +2740,7 @@ definitions:
- PlanTypeFilterSystem
zapcore.Level:
enum:
- 7
- -1
- 0
- 1
@@ -2741,10 +2751,10 @@ definitions:
- -1
- 5
- 6
- 7
format: int32
type: integer
x-enum-varnames:
- _numLevels
- DebugLevel
- InfoLevel
- WarnLevel
@@ -2755,7 +2765,6 @@ definitions:
- _minLevel
- _maxLevel
- InvalidLevel
- _numLevels
info:
contact:
email: divano@example.com
@@ -4793,6 +4802,10 @@ paths:
get:
description: 获取所有原料的当前库存列表,支持分页和过滤。
parameters:
- description: 只查询有库存的原料
in: query
name: has_stock
type: boolean
- description: 排序字段, 例如 "stock DESC"
in: query
name: order_by
@@ -4985,6 +4998,7 @@ paths:
name: end_time
type: string
- enum:
- 7
- -1
- 0
- 1
@@ -4995,12 +5009,12 @@ paths:
- -1
- 5
- 6
- 7
format: int32
in: query
name: level
type: integer
x-enum-varnames:
- _numLevels
- DebugLevel
- InfoLevel
- WarnLevel
@@ -5011,7 +5025,6 @@ paths:
- _minLevel
- _maxLevel
- InvalidLevel
- _numLevels
- enum:
- 邮件
- 企业微信