| | |
| | | } |
| | | operation.ToLocationID = first.Id |
| | | operation.BaseOperationType = constvar.BaseOperationTypeOutgoing |
| | | operation.ReceiverName = req.Addressee |
| | | operation.ReceiverPhone = req.Phone |
| | | operation.ReceiverAddr = req.Address |
| | | operation.Source = req.Source |
| | | if req.DeliverType == 1 { |
| | | for _, product := range req.ProductList { |
| | | var detail models.OperationDetails |
| | |
| | | detail.ProductId = product.Id |
| | | amount, _ := decimal.NewFromString(product.Amount) |
| | | detail.Amount = amount |
| | | details = append(details, &detail) |
| | | newOperation.Details = append(newOperation.Details, &detail) |
| | | operations = append(operations, &newOperation) |
| | | } |