From f27251d88f2468e7e7e0884e2248cbf9bd09f72c Mon Sep 17 00:00:00 2001 From: zhangqian <zhangqian@123.com> Date: 星期四, 21 三月 2024 11:32:16 +0800 Subject: [PATCH] crm发货补充出货目的位置 --- service/operation.go | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/service/operation.go b/service/operation.go index dd5a9ea..5d7304b 100644 --- a/service/operation.go +++ b/service/operation.go @@ -42,6 +42,10 @@ } operations := make([]*models.Operation, 0, len(outputList)) for _, output := range outputList { + location, err := models.NewLocationSearch().SetType(int(constvar.LocationTypeCustomer)).First() + if err != nil { + return err + } details := make([]*models.OperationDetails, 0, len(output.Products)) for _, product := range output.Products { details = append(details, &models.OperationDetails{ @@ -49,6 +53,7 @@ ProductId: product.ProductID, Amount: product.Amount, FromLocationID: output.LocationID, + ToLocationID: location.Id, }) } if opTypeMap[output.WarehouseID] == nil { -- Gitblit v1.8.0