| | |
| | | // @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 |
| | |
| | | "data": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/models.MonthStats" |
| | | "$ref": "#/definitions/models.WarehouseMonthStats" |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | }, |
| | | "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": { |
| | |
| | | "data": { |
| | | "type": "array", |
| | | "items": { |
| | | "$ref": "#/definitions/models.MonthStats" |
| | | "$ref": "#/definitions/models.WarehouseMonthStats" |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | }, |
| | | "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": { |
| | |
| | | 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: |
| | |
| | | - properties: |
| | | data: |
| | | items: |
| | | $ref: '#/definitions/models.MonthStats' |
| | | $ref: '#/definitions/models.WarehouseMonthStats' |
| | | type: array |
| | | type: object |
| | | summary: 仓库月度统计库存报表 |
| | |
| | | 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 |
| | | } |