| | |
| | | "wms/models" |
| | | "wms/request" |
| | | "wms/response" |
| | | "wms/service" |
| | | ) |
| | | |
| | | type LocationProductAmountController struct { |
| | |
| | | if params.Page*params.PageSize > 0 { |
| | | search.Orm = search.Orm.Offset((params.Page - 1) * params.PageSize).Limit(params.PageSize) |
| | | } |
| | | if err := search.Orm.Order("wms_location_product_amount.updated_at desc").Find(&records).Error; err != nil && !errors.Is(err, gorm.ErrRecordNotFound) { |
| | | if err := search.Orm.Order("wms_location_product_amount.updated_at desc").Find(&records).Error; err != nil { |
| | | util.ResponseFormat(c, code.RequestError, fmt.Errorf("find count err: %v", err)) |
| | | return |
| | | } |
| | |
| | | }); err != nil { |
| | | return err |
| | | } |
| | | |
| | | service.AddNewLocationReportRecord(locAmount.Id) |
| | | return nil |
| | | } |
| | | |