| | |
| | | Where("wms_operation.base_operation_type in (?)", []constvar.BaseOperationType{constvar.BaseOperationTypeOutgoing, constvar.BaseOperationTypeInternal, constvar.BaseOperationTypeDisuse}). |
| | | Where("wms_operation.status in (?)", []constvar.OperationStatus{constvar.OperationStatus_Ready, constvar.OperationStatus_Finish}) |
| | | if len(locationIds) > 0 { |
| | | dbIn.Where("wms_operation.to_location_id in (?)", locationIds) |
| | | dbOut.Where("wms_operation.from_location_id in (?)", locationIds) |
| | | dbIn.Where("wms_operation_details.to_location_id in (?)", locationIds) |
| | | dbOut.Where("wms_operation_details.from_location_id in (?)", locationIds) |
| | | } |
| | | if len(productIds) > 0 { |
| | | dbIn.Where("wms_operation_details.product_id in (?)", productIds) |
| | |
| | | for _, amount := range amounts { |
| | | var resp response.LocationForms |
| | | resp.Amount = amount.Amount |
| | | resp.LocationId = amount.LocationId |
| | | resp.LocationName = amount.Location.Name |
| | | resp.ProduceId = amount.Product.ID |
| | | resp.ProductName = amount.Product.Name |