From cdbdde21488beb0cca5527c94b5321f04a915e11 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期二, 02 七月 2024 14:43:16 +0800 Subject: [PATCH] update doc --- controllers/report_forms_controller.go | 2 models/warehouse_month_stats.go | 4 docs/swagger.yaml | 62 +++++++++++++++ docs/docs.go | 86 +++++++++++++++++++++ docs/swagger.json | 86 +++++++++++++++++++++ 5 files changed, 234 insertions(+), 6 deletions(-) diff --git a/controllers/report_forms_controller.go b/controllers/report_forms_controller.go index afe8111..1fdb840 100644 --- a/controllers/report_forms_controller.go +++ b/controllers/report_forms_controller.go @@ -444,7 +444,7 @@ // @Produce application/json // @Param object body request.GetMonthStats true "鏌ヨ鍙傛暟" // @Param Authorization header string true "token" -// @Success 200 {object} util.ResponseList{data=[]models.MonthStats} "鎴愬姛" +// @Success 200 {object} util.ResponseList{data=[]models.WarehouseMonthStats} "鎴愬姛" // @Router /api-wms/v1/forms/warehouseMonthStats [post] func (slf ReportFormsController) WarehouseMonthStats(c *gin.Context) { var params request.GetMonthStats diff --git a/docs/docs.go b/docs/docs.go index 7310db0..709fcde 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -1334,7 +1334,7 @@ "data": { "type": "array", "items": { - "$ref": "#/definitions/models.MonthStats" + "$ref": "#/definitions/models.WarehouseMonthStats" } } } @@ -5661,6 +5661,90 @@ } } }, + "models.WarehouseMonthStats": { + "type": "object", + "properties": { + "amount": { + "description": "鏈熸湯缁撲綑鏁伴噺", + "type": "number" + }, + "beginAmount": { + "description": "鏈熷垵鏁伴噺", + "type": "number" + }, + "createTime": { + "type": "string" + }, + "date": { + "description": "鏃ユ湡 2024-04", + "type": "string" + }, + "id": { + "type": "integer" + }, + "inputAmount": { + "description": "鍏ュ簱鏁伴噺", + "type": "number" + }, + "inputItems": { + "description": "鍏ュ簱鏄庣粏", + "type": "array", + "items": { + "$ref": "#/definitions/models.WarehouseStatsItems" + } + }, + "outputAmount": { + "description": "鍑哄簱鏁伴噺", + "type": "number" + }, + "outputItems": { + "description": "鍑哄簱鏄庣粏", + "type": "array", + "items": { + "$ref": "#/definitions/models.WarehouseStatsItems" + } + }, + "productId": { + "description": "浜у搧id", + "type": "string" + }, + "productName": { + "description": "浜у搧鍚嶇О", + "type": "string" + }, + "salePrice": { + "description": "閿�鍞崟浠�", + "type": "number" + }, + "unit": { + "description": "鍗曚綅", + "type": "string" + }, + "updateTime": { + "type": "string" + }, + "warehouseId": { + "description": "浠撳簱ID", + "type": "integer" + } + } + }, + "models.WarehouseStatsItems": { + "type": "object", + "properties": { + "amount": { + "description": "鏁伴噺", + "type": "number" + }, + "name": { + "description": "鍏ュ簱鏉ユ簮锛屽嚭搴撳幓澶�", + "type": "string" + }, + "warehouseMonthStatsId": { + "type": "integer" + } + } + }, "request.AddAttribute": { "type": "object", "properties": { diff --git a/docs/swagger.json b/docs/swagger.json index eb8f26a..0f87c8f 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -1323,7 +1323,7 @@ "data": { "type": "array", "items": { - "$ref": "#/definitions/models.MonthStats" + "$ref": "#/definitions/models.WarehouseMonthStats" } } } @@ -5650,6 +5650,90 @@ } } }, + "models.WarehouseMonthStats": { + "type": "object", + "properties": { + "amount": { + "description": "鏈熸湯缁撲綑鏁伴噺", + "type": "number" + }, + "beginAmount": { + "description": "鏈熷垵鏁伴噺", + "type": "number" + }, + "createTime": { + "type": "string" + }, + "date": { + "description": "鏃ユ湡 2024-04", + "type": "string" + }, + "id": { + "type": "integer" + }, + "inputAmount": { + "description": "鍏ュ簱鏁伴噺", + "type": "number" + }, + "inputItems": { + "description": "鍏ュ簱鏄庣粏", + "type": "array", + "items": { + "$ref": "#/definitions/models.WarehouseStatsItems" + } + }, + "outputAmount": { + "description": "鍑哄簱鏁伴噺", + "type": "number" + }, + "outputItems": { + "description": "鍑哄簱鏄庣粏", + "type": "array", + "items": { + "$ref": "#/definitions/models.WarehouseStatsItems" + } + }, + "productId": { + "description": "浜у搧id", + "type": "string" + }, + "productName": { + "description": "浜у搧鍚嶇О", + "type": "string" + }, + "salePrice": { + "description": "閿�鍞崟浠�", + "type": "number" + }, + "unit": { + "description": "鍗曚綅", + "type": "string" + }, + "updateTime": { + "type": "string" + }, + "warehouseId": { + "description": "浠撳簱ID", + "type": "integer" + } + } + }, + "models.WarehouseStatsItems": { + "type": "object", + "properties": { + "amount": { + "description": "鏁伴噺", + "type": "number" + }, + "name": { + "description": "鍏ュ簱鏉ユ簮锛屽嚭搴撳幓澶�", + "type": "string" + }, + "warehouseMonthStatsId": { + "type": "integer" + } + } + }, "request.AddAttribute": { "type": "object", "properties": { diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 253cd0b..8285221 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -1272,6 +1272,66 @@ description: 搴撳瓨浣嶇疆 type: string type: object + models.WarehouseMonthStats: + properties: + amount: + description: 鏈熸湯缁撲綑鏁伴噺 + type: number + beginAmount: + description: 鏈熷垵鏁伴噺 + type: number + createTime: + type: string + date: + description: 鏃ユ湡 2024-04 + type: string + id: + type: integer + inputAmount: + description: 鍏ュ簱鏁伴噺 + type: number + inputItems: + description: 鍏ュ簱鏄庣粏 + items: + $ref: '#/definitions/models.WarehouseStatsItems' + type: array + outputAmount: + description: 鍑哄簱鏁伴噺 + type: number + outputItems: + description: 鍑哄簱鏄庣粏 + items: + $ref: '#/definitions/models.WarehouseStatsItems' + type: array + productId: + description: 浜у搧id + type: string + productName: + description: 浜у搧鍚嶇О + type: string + salePrice: + description: 閿�鍞崟浠� + type: number + unit: + description: 鍗曚綅 + type: string + updateTime: + type: string + warehouseId: + description: 浠撳簱ID + type: integer + type: object + models.WarehouseStatsItems: + properties: + amount: + description: 鏁伴噺 + type: number + name: + description: 鍏ュ簱鏉ユ簮锛屽嚭搴撳幓澶� + type: string + warehouseMonthStatsId: + type: integer + type: object request.AddAttribute: properties: dataType: @@ -3149,7 +3209,7 @@ - properties: data: items: - $ref: '#/definitions/models.MonthStats' + $ref: '#/definitions/models.WarehouseMonthStats' type: array type: object summary: 浠撳簱鏈堝害缁熻搴撳瓨鎶ヨ〃 diff --git a/models/warehouse_month_stats.go b/models/warehouse_month_stats.go index ae73de2..d0c43d0 100644 --- a/models/warehouse_month_stats.go +++ b/models/warehouse_month_stats.go @@ -22,10 +22,10 @@ EndAmount decimal.Decimal `json:"amount" gorm:"type:decimal(30,10);not null;comment:鏁伴噺"` //鏈熸湯缁撲綑鏁伴噺 InputAmount decimal.Decimal `json:"inputAmount" gorm:"type:decimal(30,10);not null;comment:鏁伴噺"` //鍏ュ簱鏁伴噺 - InputItems []*WarehouseStatsItems `json:"inputMoreUnitsArr"` //鍏ュ簱鏄庣粏 + InputItems []*WarehouseStatsItems `json:"inputItems"` //鍏ュ簱鏄庣粏 OutputAmount decimal.Decimal `json:"outputAmount" gorm:"type:decimal(30,10);not null;comment:鏁伴噺"` //鍑哄簱鏁伴噺 - OutputItems []*WarehouseStatsItems `json:"outputMoreUnitsArr"` //鍑哄簱鏄庣粏 + OutputItems []*WarehouseStatsItems `json:"outputItems"` //鍑哄簱鏄庣粏 Date string `json:"date" gorm:"index;type:varchar(255); not null;default ''"` //鏃ユ湡 2024-04 } -- Gitblit v1.8.0