From 73b6baf6af3d88cdcb0e2df7932a9bd96b0b85c5 Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期一, 01 七月 2024 22:32:34 +0800 Subject: [PATCH] 月度统计出入库按类型汇总报表定时任务和手动跑任务接口 --- request/product_request.go | 62 ++++++++++++++++++++++++++++++ 1 files changed, 61 insertions(+), 1 deletions(-) diff --git a/request/product_request.go b/request/product_request.go index c4b8cae..e9e10a1 100644 --- a/request/product_request.go +++ b/request/product_request.go @@ -1,11 +1,71 @@ package request +import ( + "github.com/shopspring/decimal" + "wms/constvar" +) + type GetProductList struct { PageInfo - KeyWord string `json:"keyWord"` + KeyWord string `json:"keyWord"` + CategoryId int `json:"categoryId"` } type QueryOperationList struct { PageInfo ProductId string `json:"productId"` } + +type AddDisuse struct { + ProductId string `json:"productId"` + //ProductName string `json:"productName"` + Amount decimal.Decimal `json:"amount"` + FromLocationId int `json:"fromLocationId"` + ToLocationId int `json:"toLocationId"` + SourceNumber string `json:"sourceNumber"` + //Unit string `json:"unit"` + Number string `json:"number"` +} + +type QueryDisuseList struct { + PageInfo + Number string `json:"number"` +} + +type UpdateDisuse struct { + Id int `json:"id"` + ProductId string `json:"productId"` + Amount decimal.Decimal `json:"amount"` + FromLocationId int `json:"fromLocationId"` + ToLocationId int `json:"toLocationId"` + SourceNumber string `json:"sourceNumber"` + Number string `json:"number"` + Status constvar.OperationStatus `json:"status"` + OperationDate string `json:"operationDate"` + BaseOperationType constvar.BaseOperationType `json:"baseOperationType"` +} + +type QueryOperationHistory struct { + PageInfo + ProductId string `json:"productId"` + LocationId int `json:"locationId"` +} + +type ProductStatistics struct { + TotalAmount decimal.Decimal `gorm:"column:total_amount"` + BaseOperationType constvar.BaseOperationType `gorm:"column:base_operation_type"` //鍩虹浣滀笟绫诲瀷 +} + +type ProductStatisticsAmount struct { + ProductId string `gorm:"column:product_id"` + TotalAmount decimal.Decimal `gorm:"column:total_amount"` +} + +type UnitDict struct { + Name string `gorm:"unique;type:varchar(191);not null;comment:鍚嶇О" json:"name"` + IsDefault bool `gorm:"type:tinyint(1);comment:鏄惁榛樿" json:"isDefault"` +} + +type SaveUnitDict struct { + Data []*UnitDict `json:"data"` +} -- Gitblit v1.8.0