| | |
| | | resp := new(response.LocationForms) |
| | | resp.Amount = amount.Amount |
| | | resp.LocationId = amount.LocationId |
| | | resp.LocationName = amount.Location.Name |
| | | resp.LocationName = amount.Location.JointName |
| | | resp.ProduceId = amount.Product.ID |
| | | resp.ProductName = amount.Product.Name |
| | | resp.ProductTypeName = amount.ProductCategory.Name |
| | |
| | | } |
| | | |
| | | func (slf *LocationFormsService) BuildSearch(params request.GetLocationForms) (search *models.LocationProductAmountSearch, err error) { |
| | | ids := make([]int, 0) |
| | | ids := params.LocationIds |
| | | if params.LocationId != 0 { |
| | | ids = append(ids, params.LocationId) |
| | | } else { |
| | | } |
| | | if len(ids) == 0 { |
| | | //查询位置 |
| | | locations, err := models.NewLocationSearch().SetJointName(params.WareHouseCode).SetType(3).FindAll() |
| | | if err != nil { |